Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i.sentinel.download: various improvements #1044

Open
wants to merge 7 commits into
base: grass8
Choose a base branch
from

Conversation

ninsbl
Copy link
Member

@ninsbl ninsbl commented Mar 21, 2024

This PR adds:

  • a p-flag for displaying the query send to DHUS
  • support for multiple orbit numbers
  • better handling of ingestiondate in query
  • fix iloc-warnings from pandas
  • linting
  • improved projection of AOI coordinates

@ninsbl ninsbl added the enhancement New feature or request label Mar 21, 2024
Copy link
Contributor

@lucadelu lucadelu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did test but it looks good

# for details.
#
#############################################################################

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for changing header (comments to multi-line string)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pylint complained about missing module docstring. I am not sure if there is a prefered way for how the module header should be written. I happily change it back if that is prefered...


import grass.script as gs
from grass.pygrass.modules import Module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I prefer PyGRASS API. But what is the reason to use it on single place only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to pipe to stdin of m.proj and use the results in stdout at the same time, see:

coord_proj = Module(
"m.proj",
input="-",
flags="od",
stdin_="\n".join(coords),
stdout_=PIPE,
stderr_=PIPE,
)
poly += (", ").join(
[
" ".join(poly_coords.split("|")[0:2])
for poly_coords in coord_proj.outputs["stdout"]
.value.strip()
.split("\n")
]
) + "))"

I am not aware of how to do that in the script API, while I knoew it to work in pygrass. If you have a suggestion for how to do this, I am happy to adjust...

@ninsbl ninsbl requested a review from landam April 8, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants