pyWPS with access to a GeoTIFF via rasterstats/rasterio

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pyWPS with access to a GeoTIFF via rasterstats/rasterio

dhohls
Hi

I am wondering if anyone has experience in accessing and extracting data from a GeoTIFF via the rasterstats/rasterio libraries?

The standalone code I have work fine when I run it from the console, but when called as part of a pyWPS process, it seems to hang at the point where rasterio tries to read the file - specifically, the call that rasterstats makes to rasterio is:

        new_array = self.src.read(
                self.band, window=win, boundless=True, masked=masked)

Unfortunately, the relevant rasterio code for file reads is in a compiled Cython file, so we cannot trace into it to find exactly where it is hanging.

I have checked that an ordinary Python file routine can open & read that same file from within the pyWPS code, so it is not a file access or permission problem.

Any help with this, or suggestions from similar experiences, is appreciated!

Thanks
Derek


This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.
_______________________________________________
pywps-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pywps-dev
Reply | Threaded
Open this post in threaded view
|

Re: pyWPS with access to a GeoTIFF via rasterstats/rasterio

Jachym Cepicky
Hi

how does your self.src look like? how did you get it? can you please pass longer snippet of code?

Thanks

J

út 16. 5. 2017 v 15:37 odesílatel Derek Hohls <[hidden email]> napsal:
Hi

I am wondering if anyone has experience in accessing and extracting data from a GeoTIFF via the rasterstats/rasterio libraries?

The standalone code I have work fine when I run it from the console, but when called as part of a pyWPS process, it seems to hang at the point where rasterio tries to read the file - specifically, the call that rasterstats makes to rasterio is:

        new_array = self.src.read(
                self.band, window=win, boundless=True, masked=masked)

Unfortunately, the relevant rasterio code for file reads is in a compiled Cython file, so we cannot trace into it to find exactly where it is hanging.

I have checked that an ordinary Python file routine can open & read that same file from within the pyWPS code, so it is not a file access or permission problem.

Any help with this, or suggestions from similar experiences, is appreciated!

Thanks
Derek


This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

Please consider the environment before printing this email.
_______________________________________________
pywps-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pywps-dev

_______________________________________________
pywps-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pywps-dev