Skip to content

Commit

Permalink
remove geom_geohex commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfisher-geo committed Jul 10, 2024
1 parent 430fedf commit 23234ae
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 32 deletions.
12 changes: 0 additions & 12 deletions stac_fastapi/core/stac_fastapi/core/extensions/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ class EsAsyncAggregationClient(AsyncBaseAggregationClient):
"data_type": "frequency_distribution",
"frequency_distribution_data_type": "string",
},
# {
# "name": "geometry_geohex_grid_frequency",
# "data_type": "frequency_distribution",
# "frequency_distribution_data_type": "string",
# },
{
"name": "geometry_geotile_grid_frequency",
"data_type": "frequency_distribution",
Expand Down Expand Up @@ -485,12 +480,6 @@ async def aggregate(
self.MAX_GEOHASH_PRECISION,
)

# geometry_geohex_grid_frequency_precision = self.extract_precision(
# aggregate_request.geometry_geohex_grid_frequency_precision,
# 0,
# self.MAX_GEOHEX_PRECISION
# )

geometry_geotile_grid_precision = self.extract_precision(
aggregate_request.geometry_geotile_grid_frequency_precision,
0,
Expand All @@ -506,7 +495,6 @@ async def aggregate(
centroid_geohex_grid_precision,
centroid_geotile_grid_precision,
geometry_geohash_grid_precision,
# geometry_geohex_grid_precision,
geometry_geotile_grid_precision,
)
except Exception as error:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ async def aggregate(
centroid_geohex_grid_precision: int,
centroid_geotile_grid_precision: int,
geometry_geohash_grid_precision: int,
# geometry_geohex_grid_precision: int,
geometry_geotile_grid_precision: int,
ignore_unavailable: Optional[bool] = True,
):
Expand Down Expand Up @@ -705,7 +704,6 @@ async def aggregate(
k: v for k, v in agg_2_es.items() if k in aggregations
}

# centroid
if "centroid_geohash_grid_frequency" in aggregations:
search_body["aggregations"]["centroid_geohash_grid_frequency"] = {
"geohash_grid": {
Expand All @@ -730,7 +728,6 @@ async def aggregate(
}
}

# geometry
if "geometry_geohash_grid_frequency" in aggregations:
search_body["aggregations"]["geometry_geohash_grid_frequency"] = {
"geohash_grid": {
Expand All @@ -739,14 +736,6 @@ async def aggregate(
}
}

# if "geometry_geohex_grid_frequency" in aggregations:
# search_body["aggregations"]["geometry_geohex_grid_frequency"] = {
# "geohex_grid": {
# "field": "geometry",
# "precision": geometry_geohex_grid_precision,
# }
# }

if "geometry_geotile_grid_frequency" in aggregations:
search_body["aggregations"]["geometry_geotile_grid_frequency"] = {
"geotile_grid": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ async def aggregate(
centroid_geohex_grid_precision: int,
centroid_geotile_grid_precision: int,
geometry_geohash_grid_precision: int,
# geometry_geohex_grid_precision: int,
geometry_geotile_grid_precision: int,
ignore_unavailable: Optional[bool] = True,
):
Expand Down Expand Up @@ -769,14 +768,6 @@ async def aggregate(
}
}

# if "geometry_geohex_grid_frequency" in aggregations:
# search_body["aggregations"]["geometry_geohex_grid_frequency"] = {
# "geohex_grid": {
# "field": "geometry",
# "precision": geometry_geohex_grid_precision,
# }
# }

if "geometry_geotile_grid_frequency" in aggregations:
search_body["aggregations"]["geometry_geotile_grid_frequency"] = {
"geotile_grid": {
Expand Down

0 comments on commit 23234ae

Please sign in to comment.