geopandas / contextily

Context geo-tiles in Python
https://contextily.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
530 stars 83 forks source link

Add random user ID for Nominatim and allow arbitrary geocoder #164

Closed darribas closed 4 years ago

darribas commented 4 years ago

This addresses #44

jorisvandenbossche commented 4 years ago

It also seems that I made a small mistake in my PR (hidden by those failures), from the travis log:

                # Warp
                if (crs is not None) and (raster.crs != crs):
                    image, bounds, _ = _warper(
                        image, img_transform, raster.crs, crs, resampling
                    )
                image = image.transpose(1, 2, 0)
>               extent = bounds.left, bounds.right, bounds.bottom, bounds.top
E               UnboundLocalError: local variable 'bounds' referenced before assignment
contextily/plotting.py:190: UnboundLocalError

If not warping, we need to get the bounds from raster.bounds

jorisvandenbossche commented 4 years ago

OK, updated to only use the default contextily user agent for the actual Nominatim geocoder that is created as the default.