Topics

Rasterio 1.0.14


Madhav Desetty
 

Great! I am good for now through local rasterio 1.0.14 packaging but happy to test out GS support  again once rasterio 1.0.15 is out.


On Sun, Jan 27, 2019 at 6:15 PM Sean Gillies via Groups.Io <sean=mapbox.com@groups.io> wrote:
Yes, you are absolutely right. Google cloud support landed in master and I failed to cherry pick it before 1.0.14 as I'd intended. Sorry! I'm going to release a 1.0.15 to fix this tonight.

On Sun, Jan 27, 2019 at 3:09 PM <madhav@...> wrote:
@Sean
I think something is not right with the PyPI distribution of rasterio 1.0.14. I did pip install rasterio into a clean virtualenv and it installed rasterio. See the pip show rasterio output:

rio
---
Metadata-Version: 2.1
Name: rasterio
Version: 1.0.14
Summary: Fast and direct raster I/O for use with Numpy and SciPy
Author: Sean Gillies
Author-email: sean@...
Installer: pip
License: BSD
Location: /usr/local/lib/python2.7/dist-packages
Requires: cligj, snuggs, click, enum34, attrs, affine, numpy, click-plugins
Classifiers:
  Development Status :: 4 - Beta
  Intended Audience :: Developers
  Intended Audience :: Information Technology
  Intended Audience :: Science/Research
  License :: OSI Approved :: BSD License
  Programming Language :: C
  Programming Language :: Cython
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3.3
  Programming Language :: Python :: 3.4
....

However, when I look at site-packages at /usr/local/lib/python2.7/dist-packages/rasterio/ and code for path.py session.py there is no GSSession class or no gs:// paths in the remote schemes in path.py. I got around by git pull source from mapbox/rasterio and doing a local pip install -e . and the above code I pasted works. I don't know if something is wrong with PyPI package distribution. I am curious if others have had success with the latest rasterio 1.0.14 and the new features.
pip show rasterio

pip show rasterio



--
Sean Gillies



--
Madhav Desetty
Chief Software Architect
Airbus Aerial
(404) 918-0481


Sean Gillies
 

Yes, you are absolutely right. Google cloud support landed in master and I failed to cherry pick it before 1.0.14 as I'd intended. Sorry! I'm going to release a 1.0.15 to fix this tonight.


On Sun, Jan 27, 2019 at 3:09 PM <madhav@...> wrote:
@Sean
I think something is not right with the PyPI distribution of rasterio 1.0.14. I did pip install rasterio into a clean virtualenv and it installed rasterio. See the pip show rasterio output:

rio
---
Metadata-Version: 2.1
Name: rasterio
Version: 1.0.14
Summary: Fast and direct raster I/O for use with Numpy and SciPy
Author: Sean Gillies
Author-email: sean@...
Installer: pip
License: BSD
Location: /usr/local/lib/python2.7/dist-packages
Requires: cligj, snuggs, click, enum34, attrs, affine, numpy, click-plugins
Classifiers:
  Development Status :: 4 - Beta
  Intended Audience :: Developers
  Intended Audience :: Information Technology
  Intended Audience :: Science/Research
  License :: OSI Approved :: BSD License
  Programming Language :: C
  Programming Language :: Cython
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3.3
  Programming Language :: Python :: 3.4
....

However, when I look at site-packages at /usr/local/lib/python2.7/dist-packages/rasterio/ and code for path.py session.py there is no GSSession class or no gs:// paths in the remote schemes in path.py. I got around by git pull source from mapbox/rasterio and doing a local pip install -e . and the above code I pasted works. I don't know if something is wrong with PyPI package distribution. I am curious if others have had success with the latest rasterio 1.0.14 and the new features.
pip show rasterio

pip show rasterio



--
Sean Gillies


Madhav Desetty
 

@Sean
I think something is not right with the PyPI distribution of rasterio 1.0.14. I did pip install rasterio into a clean virtualenv and it installed rasterio. See the pip show rasterio output:

rio
---
Metadata-Version: 2.1
Name: rasterio
Version: 1.0.14
Summary: Fast and direct raster I/O for use with Numpy and SciPy
Home-page: https://github.com/mapbox/rasterio
Author: Sean Gillies
Author-email: sean@...
Installer: pip
License: BSD
Location: /usr/local/lib/python2.7/dist-packages
Requires: cligj, snuggs, click, enum34, attrs, affine, numpy, click-plugins
Classifiers:
  Development Status :: 4 - Beta
  Intended Audience :: Developers
  Intended Audience :: Information Technology
  Intended Audience :: Science/Research
  License :: OSI Approved :: BSD License
  Programming Language :: C
  Programming Language :: Cython
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3.3
  Programming Language :: Python :: 3.4
....

However, when I look at site-packages at /usr/local/lib/python2.7/dist-packages/rasterio/ and code for path.py session.py there is no GSSession class or no gs:// paths in the remote schemes in path.py. I got around by git pull source from mapbox/rasterio and doing a local pip install -e . and the above code I pasted works. I don't know if something is wrong with PyPI package distribution. I am curious if others have had success with the latest rasterio 1.0.14 and the new features.
pip show rasterio

pip show rasterio


Madhav Desetty
 

I setup rasterio 1.0.14 and try to do a rasterio.open with gs:// url and I get following error. I did set GOOGLE_APPLICATION_CREDENTIALS to json key file. What am I missing?

>>> import rasterio
>>> import rasterio as rio
>>> fp = rio.open("gs://pdd-stac/disasters/hurricane-harvey/0831/20170831_172754_101c_3b_Visual.tif")
Traceback (most recent call last):
  File "rasterio/_base.pyx", line 198, in rasterio._base.DatasetBase.__init__
  File "rasterio/_shim.pyx", line 64, in rasterio._shim.open_dataset
  File "rasterio/_err.pyx", line 205, in rasterio._err.exc_wrap_pointer
rasterio._err.CPLE_OpenFailedError: gs://pdd-stac/disasters/hurricane-harvey/0831/20170831_172754_101c_3b_Visual.tif: No such file or directory
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/madhavdesetty/.pyenv/versions/3.6.5/envs/venv365/lib/python3.6/site-packages/rasterio/env.py", line 421, in wrapper
    return f(*args, **kwds)
  File "/Users/madhavdesetty/.pyenv/versions/3.6.5/envs/venv365/lib/python3.6/site-packages/rasterio/__init__.py", line 216, in open
    s = DatasetReader(path, driver=driver, **kwargs)
  File "rasterio/_base.pyx", line 200, in rasterio._base.DatasetBase.__init__
rasterio.errors.RasterioIOError: gs://pdd-stac/disasters/hurricane-harvey/0831/20170831_172754_101c_3b_Visual.tif: No such file or directory
>>> rio.__version__
'1.0.14'
 
 


Madhav Desetty
 

Wow! This is awesome! I made similar changes to add GS support locally. I will pull 1.0.14 and see if all GCS related workflow works as expected in my Kubernetes cluster.

Thanks!

Madhav


Sean Gillies
 

Hi all,

Rasterio 1.0.14 is on PyPI now: https://pypi.org/project/rasterio/1.0.14/.

The changes are listed here: https://github.com/mapbox/rasterio/blob/master/CHANGES.txt#L4-L17. We've attempted to overhaul and improve the CRS class without breaking anything, Let me know if we've succeeded.

There are a couple changes in the OS X and Linux wheels. We now include GDAL 2.4.0 (skipping over 2.3.3) and have added HTTP/2 support.

--
Sean Gillies