AcadGIS 0.1.4 — layer gallery (manual check)¶
Every layer we built, each on the region that shows it best, eye-catching colours, fully commented. 10 layer functions in 0.1.4:
| # | function | what | region here |
|---|---|---|---|
| 1 | plot + highlight_style |
styled admin map, highlight a region | 🇧🇷 Brazil |
| 2 | add_basemap / add_satellite |
XYZ tiles (6 styles) | 🇦🇪 Dubai |
| 3 | add_topography |
DEM hillshade + hypsometry | 🇨🇭 Swiss Alps |
| 4 | add_landcover |
ESA WorldCover 10 m (curated) | 🇨🇭 Switzerland |
| 5 | add_ndvi |
Sentinel-2 NDVI (curated) | 🇪🇬 Nile / Luxor |
| 6 | add_raster (rgb) |
any GeoTIFF — true colour | 🇮🇹 Venice |
| 7 | add_layer |
any vector (poly/line/point) + labels | 🇯🇵 Japan |
| 8 | add_cities |
Natural Earth places, ranked | 🇪🇺 Europe |
| 9 | add_roads |
OpenStreetMap roads | 🇫🇷 Paris |
Continuous & categorical add_raster are also exercised by §3–5 (which call it internally). Network is needed for §2–6, §8–9. Only import acadgis as agis is needed (§6 adds rioxarray/requests for the demo fetch).
Bonus — 🇧🇩 Bangladesh field-research set (§10–13): your-own-data raster (numpy → GeoTIFF), categorical with custom classes, study sites over satellite, and a composed divisions + rivers + cities map.
In [1]:
Copied!
import acadgis as agis
print("AcadGIS", agis.__version__)
import acadgis as agis
print("AcadGIS", agis.__version__)
AcadGIS 0.1.4
1 · plot() + highlight_style — 🇧🇷 Brazil¶
In [2]:
Copied!
# plot() + highlight_style — Brazil (big, colourful states).
br = agis.load_boundaries("Brazil", "state") # 27 states (GADM adm1)
agis.plot(
br,
palette="vibrant", # eye-catching qualitative palette
title="Brazil — states (Amazonas highlighted)",
highlight="Amazonas", # name (or a list of names)
highlight_style="overlay", # fill · overlay · rect · circle
highlight_color="#ffd000", highlight_edge="#b30000",
highlight_alpha=0.45, highlight_width=2.2,
graticule={"grid": True, "sides": "lb", "grid_alpha": 0.25, "fontsize": 7},
north_arrow={"style": "rose"}, scale_bar={"style": "double"},
figsize=(9, 9),
)
agis.show()
# plot() + highlight_style — Brazil (big, colourful states).
br = agis.load_boundaries("Brazil", "state") # 27 states (GADM adm1)
agis.plot(
br,
palette="vibrant", # eye-catching qualitative palette
title="Brazil — states (Amazonas highlighted)",
highlight="Amazonas", # name (or a list of names)
highlight_style="overlay", # fill · overlay · rect · circle
highlight_color="#ffd000", highlight_edge="#b30000",
highlight_alpha=0.45, highlight_width=2.2,
graticule={"grid": True, "sides": "lb", "grid_alpha": 0.25, "fontsize": 7},
north_arrow={"style": "rose"}, scale_bar={"style": "double"},
figsize=(9, 9),
)
agis.show()
2 · add_basemap / add_satellite — 🇦🇪 Dubai¶
In [3]:
Copied!
# add_satellite — Palm Jumeirah, Dubai (iconic from space).
DUBAI = (55.10, 25.05, 55.185, 25.135) # (minx, miny, maxx, maxy)
fig, ax = agis.plt.subplots(figsize=(9, 8))
ax.set_xlim(DUBAI[0], DUBAI[2]); ax.set_ylim(DUBAI[1], DUBAI[3])
agis.add_satellite(ax) # = add_basemap(style="satellite")
ax.set_title("add_satellite — Palm Jumeirah, Dubai", fontsize=12, fontweight="bold")
ax.set_xticks([]); ax.set_yticks([]); agis.show()
# add_satellite — Palm Jumeirah, Dubai (iconic from space).
DUBAI = (55.10, 25.05, 55.185, 25.135) # (minx, miny, maxx, maxy)
fig, ax = agis.plt.subplots(figsize=(9, 8))
ax.set_xlim(DUBAI[0], DUBAI[2]); ax.set_ylim(DUBAI[1], DUBAI[3])
agis.add_satellite(ax) # = add_basemap(style="satellite")
ax.set_title("add_satellite — Palm Jumeirah, Dubai", fontsize=12, fontweight="bold")
ax.set_xticks([]); ax.set_yticks([]); agis.show()
In [4]:
Copied!
# All six basemap styles over the same spot.
styles = ["satellite", "osm", "light", "dark", "terrain", "toner"]
fig, axes = agis.plt.subplots(2, 3, figsize=(13, 7))
for sty, ax in zip(styles, axes.ravel()):
ax.set_xlim(DUBAI[0], DUBAI[2]); ax.set_ylim(DUBAI[1], DUBAI[3])
agis.add_basemap(ax, style=sty)
ax.set_title(sty, fontsize=9, fontweight="bold"); ax.set_xticks([]); ax.set_yticks([])
fig.suptitle("add_basemap — 6 tile styles", fontsize=13, fontweight="bold")
agis.show()
# All six basemap styles over the same spot.
styles = ["satellite", "osm", "light", "dark", "terrain", "toner"]
fig, axes = agis.plt.subplots(2, 3, figsize=(13, 7))
for sty, ax in zip(styles, axes.ravel()):
ax.set_xlim(DUBAI[0], DUBAI[2]); ax.set_ylim(DUBAI[1], DUBAI[3])
agis.add_basemap(ax, style=sty)
ax.set_title(sty, fontsize=9, fontweight="bold"); ax.set_xticks([]); ax.set_yticks([])
fig.suptitle("add_basemap — 6 tile styles", fontsize=13, fontweight="bold")
agis.show()
3 · add_topography — 🇨🇭 Swiss Alps¶
In [5]:
Copied!
# add_topography — Swiss Alps (dramatic relief).
ALPS = (7.55, 45.85, 8.25, 46.45) # Jungfrau / Interlaken
fig, ax = agis.plt.subplots(figsize=(9, 8))
ax.set_xlim(ALPS[0], ALPS[2]); ax.set_ylim(ALPS[1], ALPS[3])
agis.add_topography(
ax, area=ALPS,
cmap="terrain", hillshade=True, # hypsometric tint + shaded relief
colorbar=True, colorbar_label="Elevation (m)",
max_size=900, # DEM resolution cap (speed vs detail)
)
ax.set_title("add_topography — Swiss Alps (Jungfrau)", fontsize=12, fontweight="bold")
agis.show()
# add_topography — Swiss Alps (dramatic relief).
ALPS = (7.55, 45.85, 8.25, 46.45) # Jungfrau / Interlaken
fig, ax = agis.plt.subplots(figsize=(9, 8))
ax.set_xlim(ALPS[0], ALPS[2]); ax.set_ylim(ALPS[1], ALPS[3])
agis.add_topography(
ax, area=ALPS,
cmap="terrain", hillshade=True, # hypsometric tint + shaded relief
colorbar=True, colorbar_label="Elevation (m)",
max_size=900, # DEM resolution cap (speed vs detail)
)
ax.set_title("add_topography — Swiss Alps (Jungfrau)", fontsize=12, fontweight="bold")
agis.show()