Skip to content

Commit 6c2feee

Browse files
authored
Use OpenStreetMap.HOT as default tiles (#221)
* Stamen to HOT * update tests * update notebooks * update crs definition
1 parent 58f9381 commit 6c2feee

11 files changed

+29266
-8753
lines changed

contextily/place.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Place(object):
3737
[Optional. Default: None]
3838
The amount to adjust a chosen zoom level if it is chosen automatically.
3939
source : xyzservices.providers object or str
40-
[Optional. Default: Stamen Terrain web tiles]
40+
[Optional. Default: OpenStreetMap Humanitarian web tiles]
4141
The tile source: web tile provider or path to local file. The web tile
4242
provider can be in the form of a :class:`xyzservices.TileProvider` object or a
4343
URL. The placeholders for the XYZ in the URL need to be `{x}`, `{y}`,
@@ -81,7 +81,7 @@ def __init__(
8181
):
8282
self.path = path
8383
if source is None:
84-
source = providers.Stamen.Terrain
84+
source = providers.OpenStreetMap.HOT
8585
self.source = source
8686
self.zoom_adjust = zoom_adjust
8787

contextily/plotting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def add_basemap(
4040
[Optional. Default='auto'] Level of detail for the basemap. If 'auto',
4141
it is calculated automatically. Ignored if `source` is a local file.
4242
source : xyzservices.TileProvider object or str
43-
[Optional. Default: Stamen Terrain web tiles]
43+
[Optional. Default: OpenStreetMap Humanitarian web tiles]
4444
The tile source: web tile provider, a valid input for a query of a
4545
:class:`xyzservices.TileProvider` by a name from ``xyzservices.providers`` or
4646
path to local file. The web tile provider can be in the form of a
@@ -123,7 +123,7 @@ def add_basemap(
123123
# Convert extent from `crs` into WM for tile query
124124
if crs is not None:
125125
left, right, bottom, top = _reproj_bb(
126-
left, right, bottom, top, crs, {"init": "epsg:3857"}
126+
left, right, bottom, top, crs, "epsg:3857"
127127
)
128128
# Download image
129129
image, extent = bounds2img(
@@ -202,7 +202,7 @@ def add_basemap(
202202

203203
# Add attribution text
204204
if source is None:
205-
source = providers.Stamen.Terrain
205+
source = providers.OpenStreetMap.HOT
206206
if isinstance(source, (dict, TileProvider)) and attribution is None:
207207
attribution = source.get("attribution")
208208
if attribution:

contextily/tile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def bounds2raster(
9797
path : str
9898
Path to raster file to be written
9999
source : xyzservices.TileProvider object or str
100-
[Optional. Default: Stamen Terrain web tiles]
100+
[Optional. Default: OpenStreetMap Humanitarian web tiles]
101101
The tile source: web tile provider or path to local file. The web tile
102102
provider can be in the form of a :class:`xyzservices.TileProvider` object or a
103103
URL. The placeholders for the XYZ in the URL need to be `{x}`, `{y}`,
@@ -190,7 +190,7 @@ def bounds2img(
190190
zoom : int
191191
Level of detail
192192
source : xyzservices.TileProvider object or str
193-
[Optional. Default: Stamen Terrain web tiles]
193+
[Optional. Default: OpenStreetMap Humanitarian web tiles]
194194
The tile source: web tile provider or path to local file. The web tile
195195
provider can be in the form of a :class:`xyzservices.TileProvider` object or a
196196
URL. The placeholders for the XYZ in the URL need to be `{x}`, `{y}`,
@@ -267,7 +267,7 @@ def bounds2img(
267267

268268
def _process_source(source):
269269
if source is None:
270-
provider = providers.Stamen.Terrain
270+
provider = providers.OpenStreetMap.HOT
271271
elif isinstance(source, str):
272272
provider = TileProvider(url=source, attribution="", name="url")
273273
elif not isinstance(source, dict):

docs/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies:
1313
- requests
1414
- joblib
1515
- xyzservices
16+
- geodatasets
1617
# doc dependencies
1718
- sphinx
1819
- numpydoc

notebooks/intro_guide.ipynb

Lines changed: 14377 additions & 3800 deletions
Large diffs are not rendered by default.

notebooks/places_guide.ipynb

Lines changed: 30 additions & 48 deletions
Large diffs are not rendered by default.

notebooks/providers_deepdive.ipynb

Lines changed: 14346 additions & 3748 deletions
Large diffs are not rendered by default.

notebooks/warping_guide.ipynb

Lines changed: 187 additions & 202 deletions
Large diffs are not rendered by default.

notebooks/working_with_local_file.ipynb

Lines changed: 0 additions & 612 deletions
This file was deleted.

notebooks/working_with_local_files.ipynb

Lines changed: 249 additions & 268 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)