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

Agrimonitor satellite images #379

Closed
BartvanMarrewijk opened this issue Aug 4, 2021 · 6 comments
Closed

Agrimonitor satellite images #379

BartvanMarrewijk opened this issue Aug 4, 2021 · 6 comments
Labels
Milestone

Comments

@BartvanMarrewijk
Copy link

Hello,

I am trying to get the satellite images of a specific region, but somehow the download satellite image function raises an error:

    `acq_from=1500336000
    acq_to = 1508976000
    img_type = ImageTypeEnum.GEOTIFF 
    preset = PresetEnum.NDVI
    sat = SatelliteEnum.LANDSAT_8.symbol
    results = mgr.search_satellite_imagery(pol_id, acq_from, acq_to, img_type=img_type, preset=preset,min_resolution=None,max_resolution=None, acquired_by=sat)
    satellite_images = [mgr.download_satellite_image(result) for result in results]
    `
Exception has occurred: NotFoundError
Unable to find the resource

However results is a list of 2. What am I doing wrong?

@csparpa csparpa added this to the 3.3.0 milestone Aug 22, 2021
@csparpa
Copy link
Owner

csparpa commented Aug 22, 2021

@studentWUR Hi, sorry for the late reply!

In order to debug this I need the precise definition of the geopolygon you run this image query upon - could you please provide it ?

Thanks

@sabahatijaz
Copy link

I am facing the same issue

@sabahatijaz
Copy link

coordinates":[[[-121.1958,37.6683],[-121.1779,37.6687],[-121.1773,37.6792],[-121.1958,37.6683]]]

csparpa added a commit that referenced this issue Sep 2, 2021
@csparpa
Copy link
Owner

csparpa commented Sep 2, 2021

@studentWUR @sabahatijaz I've submitted a possible fix with commit 099ef43

This needs extensive testing: I've done a bit, but please support me. You should ideally try to download TIFs, PNGs and tiles to check if everything is OK

WIll you please let me know? Thanks a lot!

PS: the issue here is that the OWM API changed the URLs they provide for the PNG and TIF images - they now return full URLs to the image resources (while they used to just return relative URL paths with respect to a fixed root URI)

@csparpa csparpa added bug and removed potential-bug labels Sep 4, 2021
@ratdriftbot
Copy link

#385 (comment)

@ratdriftbot
Copy link

help me pls with code((

@csparpa csparpa closed this as completed Feb 14, 2022
@csparpa csparpa mentioned this issue Feb 14, 2022
csparpa added a commit that referenced this issue Feb 14, 2022
# New features
[380](#380) Implemented [National Weather Alerts](https://openweathermap.org/api/one-call-api#listsource) support
[376](#376) Now PyOWM uses SQLite instead of files to internally store city data. `CityIDRegistry` interface has changed but in a retrocompatible way


# Chores
[381](#381) Now it is possible to specify how many times to retry an API call


# Bugfixes
[379](#379) Experimental fix for `404` errors on Agromonitor API satellite image search 
[387](#387) Fixed lat/lon swap bug on Airpollution API
[389](#389) Fixed wrong city name in City ID database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants