Skip to content

Commit

Permalink
Merge pull request #49 from fabianazioti/feature/48
Browse files Browse the repository at this point in the history
fixing get trajectory when not found data ref #48
  • Loading branch information
raphaelrpl authored Apr 7, 2021
2 parents eeb2c5b + bc5d25e commit b80687f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ steps:

- name: docker-registry
image: plugins/docker
network_mode: bridge
settings:
repo: registry.dpi.inpe.br/${DRONE_REPO}
registry: registry.dpi.inpe.br
auto_tag: true
username:
from_secret: registry_user
password:
from_secret: registry_pass
auto_tag: true
registry: registry.dpi.inpe.br
repo: registry.dpi.inpe.br/${DRONE_REPO}
custom_dns: 150.163.2.4
17 changes: 10 additions & 7 deletions wlts/datasources/wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,14 @@ def get_trajectory(self, **kwargs):
(kwargs['grid'])['row'],
kwargs['time'], kwargs['x'], kwargs['y'])

trj = self.organize_trajectory(result=image_infos, time=kwargs['time'],
classification_class=kwargs['classification_class'],
geom=Point(kwargs['x'], kwargs['y']),
geom_flag=kwargs['geometry_flag'],
temporal=kwargs['temporal']
)
if image_infos is not None:
trj = self.organize_trajectory(result=image_infos, time=kwargs['time'],
classification_class=kwargs['classification_class'],
geom=Point(kwargs['x'], kwargs['y']),
geom_flag=kwargs['geometry_flag'],
temporal=kwargs['temporal']
)

return trj
return trj

return image_infos
15 changes: 10 additions & 5 deletions wlts/datasources/wfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,14 @@ def get_trajectory(self, **kwargs):

trj = list()

for i in retval:
trj.append(self.organize_trajectory(i, kwargs['obs'], kwargs['geometry_flag'],
(kwargs['geom_property'])['srid'], kwargs['classification_class'],
kwargs['temporal']))
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']))

return trj
return trj

return retval

0 comments on commit b80687f

Please sign in to comment.