Skip to content

Commit

Permalink
parse storage crs in init
Browse files Browse the repository at this point in the history
  • Loading branch information
sjordan29 committed Sep 12, 2024
1 parent 2c61534 commit de49549
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pygeoapi/provider/xarray_.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ def __init__(self, provider_def):
data_to_open = self.data

self._data = open_func(data_to_open)
self._coverage_properties = self._get_coverage_properties(
provider_def
)
self.storage_crs = self._parse_storage_crs(provider_def)
self._coverage_properties = self._get_coverage_properties()

self.axes = [self._coverage_properties['x_axis_label'],
self._coverage_properties['y_axis_label'],
Expand Down Expand Up @@ -344,7 +343,7 @@ def gen_covjson(self, metadata, data, fields):

return cj

def _get_coverage_properties(self, provider_def: dict):
def _get_coverage_properties(self):
"""
Helper function to normalize coverage properties
:param provider_def: provider definition
Expand Down Expand Up @@ -409,7 +408,6 @@ def _get_coverage_properties(self, provider_def: dict):
}

# Update properties based on the xarray's CRS
self.storage_crs = self._parse_storage_crs(provider_def)
epsg_code = self.storage_crs.to_epsg()
LOGGER.debug(f'{epsg_code}')
if epsg_code == 4326 or self.storage_crs == 'OGC:CRS84':
Expand Down

0 comments on commit de49549

Please sign in to comment.