Skip to content

Commit

Permalink
Merge pull request #51 from fabianazioti/feature/50
Browse files Browse the repository at this point in the history
Fixing wfs datasource names
  • Loading branch information
raphaelrpl authored Apr 9, 2021
2 parents b80687f + d165132 commit 8e8429c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions wlts/datasources/wfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,18 @@ def organize_trajectory(self, result, obs, geom_flag, geom_property, classificat
feature_id = result['properties'][obs["class_property"]]

ds_class = classification_class.get_class_ds()
if classification_class.get_class_system() is None:

if classification_class.get_classification_system_name() is None:
class_info = ds_class.get_classe(feature_id,
classification_class.get_value(),
classification_class.get_class_property_value(),
classification_class.get_class_property_name(),
classification_class.get_name())
classification_class.get_property_name())
else:
class_info = ds_class.get_classe(feature_id,
classification_class.get_value(),
classification_class.get_class_property_value(),
classification_class.get_class_property_name(),
classification_class.get_name(),
class_system=classification_class)
classification_class.get_property_name(),
class_system=classification_class.get_classification_system_name())
trj = dict()
trj["class"] = class_info
trj["date"] = str(obs_info)
Expand Down Expand Up @@ -249,7 +249,7 @@ def get_trajectory(self, **kwargs):
"""Return a trajectory observation of this datasource."""
invalid_parameters = set(kwargs) - {"feature_name", "temporal",
"x", "y", "obs", "geom_property",
"classification_class", "start_date", "end_date", "classification_class",
"classification_class", "start_date", "end_date",
"geometry_flag"}
if invalid_parameters:
raise AttributeError('invalid parameter(s): {}'.format(invalid_parameters))
Expand Down Expand Up @@ -288,11 +288,11 @@ def get_trajectory(self, **kwargs):

if retval is not None:
for i in retval:
trj.append(self.organize_trajectory(i, kwargs['obs'],
kwargs['geometry_flag'],
(kwargs['geom_property'])['srid'],
kwargs['classification_class'],
kwargs['temporal']))
trj.append(self.organize_trajectory(result=i, obs=kwargs['obs'],
geom_flag=kwargs['geometry_flag'],
geom_property=(kwargs['geom_property'])['srid'],
classification_class=kwargs['classification_class'],
temporal=kwargs['temporal']))

return trj

Expand Down

0 comments on commit 8e8429c

Please sign in to comment.