diff --git a/src/crud/crud_catchment_area.py b/src/crud/crud_catchment_area.py index a619104..3d543c7 100644 --- a/src/crud/crud_catchment_area.py +++ b/src/crud/crud_catchment_area.py @@ -81,11 +81,13 @@ async def read_network( FROM point ), cells AS ( - SELECT h3_index + SELECT + basic.to_short_h3_6(h3_index::bigint) AS h3_6, + basic.to_short_h3_3(h3_lat_lng_to_cell(ST_Centroid(h3_geom)::point, 3)::bigint) AS h3_3 FROM buffer, LATERAL basic.fill_polygon_h3_6(buffer.geom) ) - SELECT basic.to_short_h3_3(h3_cell_to_parent(h3_index, 3)::bigint) AS h3_3, ARRAY_AGG(basic.to_short_h3_6(h3_index::bigint)) AS h3_6 + SELECT h3_3, ARRAY_AGG(h3_6) AS h3_6 FROM cells GROUP BY h3_3; """ diff --git a/src/schemas/catchment_area.py b/src/schemas/catchment_area.py index 4c18140..284fc09 100644 --- a/src/schemas/catchment_area.py +++ b/src/schemas/catchment_area.py @@ -76,6 +76,7 @@ "residential", "living_street", "trunk", + "unclassified", "parking_aisle", "driveway", "alley",