Skip to content

Commit

Permalink
refactor(Attributes): tile cache type is no longer needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gtempus committed Jan 18, 2024
1 parent f2b4d76 commit 44db630
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/crud/async_db/vector_tiles/nasa_viirs_fire_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def get_aggregated_tile(
"""

columns: List[ColumnClause] = list()
attributes: List[str] = await get_attributes(SCHEMA, version, None)
attributes: List[str] = await get_attributes(SCHEMA, version)
for attribute in attributes:
columns.append(db.column(attribute))

Expand Down
2 changes: 1 addition & 1 deletion app/crud/sync_db/tile_cache_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_latest_versions() -> List[Dict[str, str]]:
return latest_versions


async def get_attributes(dataset, version, asset_type):
async def get_attributes(dataset, version):
# TODO: fetch the correct one for the current implementation
# needs changes to data-api to assure dynamic vector tile caches
# also have the implementation parameter in the creation options
Expand Down
5 changes: 1 addition & 4 deletions app/routes/dynamic_vector_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from ..crud.async_db.vector_tiles.filters import geometry_filter
from ..crud.sync_db.tile_cache_assets import get_attributes
from ..models.enumerators.geostore import GeostoreOrigin
from ..models.enumerators.tile_caches import TileCacheType
from ..models.types import Bounds
from ..responses import VectorTileResponse
from . import dynamic_vector_tile_cache_version_dependency, vector_xyz
Expand Down Expand Up @@ -61,9 +60,7 @@ async def dynamic_vector_tile(
if geom_filter is not None:
filters.append(geom_filter)

attributes: List[str] = await get_attributes(
dataset, version, TileCacheType.dynamic_vector_tile_cache
)
attributes: List[str] = await get_attributes(dataset, version)

# if no attributes specified get all feature info fields
if not include_attribute:
Expand Down

0 comments on commit 44db630

Please sign in to comment.