Skip to content

Commit

Permalink
fix isochrone issue by no longer using st exterior ring which failed …
Browse files Browse the repository at this point in the history
…without the concave hull

closes #24
  • Loading branch information
mmorley0395 committed Apr 25, 2024
1 parent 56b812d commit c9e7fe5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lts_island_connectivity/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def __handle_parking_lots(self):
OR b.lu15subn = 'Transportation: Facility')
)
UPDATE {join_table} AS b
SET geom = st_makepolygon(st_exteriorring(ST_Union(a.geom, b.geom)))
SET geom = ST_Union(a.geom, b.geom)
from proximate_lu_and_touching a
where b.id = {self.study_segment_id}
Expand All @@ -438,8 +438,7 @@ def __create_isochrone(self, travel_time: int = 15):
"""

try:
self.db.execute(
f"""
sql = f"""
alter table {self.network_type}.user_isochrones
add column if not exists miles FLOAT;
insert into {self.network_type}.user_isochrones
Expand Down Expand Up @@ -472,7 +471,7 @@ def __create_isochrone(self, travel_time: int = 15):
WHERE (select seg_name from arrays) = '{self.segment_name}';
"""
)
self.db.execute(sql)
except OperationalError:
print(
f"failed to create isochrone for this segment, {self.segment_name} for some reason."
Expand Down

0 comments on commit c9e7fe5

Please sign in to comment.