Skip to content

Commit 52f7d1c

Browse files
committed
Added h3_3 to layers
1 parent dd5c27d commit 52f7d1c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/catalog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def build_collection(self, layer_objs: List[dict]):
141141

142142
# Append layer id column
143143
layer_id_col = Column(name="layer_id", type="text", description="layer_id")
144+
h3_3_col = Column(name="h3_3", type="integer", description="h3_3")
144145
columns.append(layer_id_col)
146+
columns.append(h3_3_col)
145147

146148
# Loop through attributes and create column objects
147149
for k in obj["attribute_mapping"]:
@@ -173,7 +175,7 @@ def build_collection(self, layer_objs: List[dict]):
173175
geom_col = None
174176

175177
# Append ID column
176-
id_col = Column(name="id", description="id", type="integer")
178+
id_col = Column(name="id", description="id", type="uuid")
177179
columns.append(id_col)
178180

179181
# Define collection

src/exts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def get_mvt_point(
382382
# Build the custom column selection query
383383
select_unique_values = ""
384384
for column in self.table_columns:
385-
if column.name not in ["geom", "id", "layer_id"]:
385+
if column.name not in ["geom", "id", "layer_id", "h3_3"]:
386386
select_unique_values += (
387387
f"(ARRAY_AGG({column.description}))[1] AS {column.description}, "
388388
)
@@ -408,7 +408,7 @@ def get_mvt_point(
408408
q, p = render(
409409
f"""
410410
WITH clustered_points AS (
411-
SELECT (ARRAY_AGG(layer_id))[1] AS layer_id, {select_unique_values}, (ARRAY_AGG(id))[1] AS id, (ARRAY_AGG(geom))[1] AS geom
411+
SELECT (ARRAY_AGG(layer_id))[1] AS layer_id, {select_unique_values}, (ARRAY_AGG(id))[1] AS id, (ARRAY_AGG(h3_3))[1] AS h3_3, (ARRAY_AGG(geom))[1] AS geom
412412
:from_clause
413413
:where_clause
414414
AND cluster_keep = TRUE

0 commit comments

Comments
 (0)