geoprior.scripts.plot_geo_cumulative#
Plot cumulative subsidence maps on satellite basemap + optional hotspots.
Layout#
The figure uses two rows by N columns, with Nansha on top and Zhongshan on the bottom. The first columns show 2022 observed and predicted cumulative maps, followed by forecast cumulative maps for later years.
Background and overlays#
Background:
Esri.WorldImagerysatellite tiles viacontextily.Foreground: PS points colored by cumulative subsidence (mm) since a baseline year, default 2020.
Optional overlay: hotspot points from the Fig. 6 hotspot CSV.
Cumulative definition#
This script always plots cumulative since start_year, but the input CSV can be:
--subsidence-kind=cumulative(default): values are already cumulative, so the script rebases them at the first year greater than or equal tostart_yearusingcum(t) = value(t) - value(first).--subsidence-kind=incrementorrate: values are yearly increments, so the script accumulates them usingcum(t) = sum_y increment(y).
CRS handling (lat/lon vs UTM)#
coord_x/coord_y may be:
lon/lat (degrees), treated as EPSG:4326
UTM (meters), treated as
EPSG:<utm_epsg>with default 32649
Auto-detection:
if
abs(x) <= 180andabs(y) <= 90, treat the coordinates as lon/latotherwise, treat them as UTM
You can override using –coords-mode and –utm-epsg.
Outputs#
Saves both PNG and PDF using –out (resolved under scripts/figs if relative).
Notes
Code style targets black+ruff with line length 62.
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- geoprior.scripts.plot_geo_cumulative.build_parser(*, prog=None)[source]#
- Parameters:
prog (str | None)
- Return type:
- geoprior.scripts.plot_geo_cumulative.build_city_panels(val_df, fut_df, *, start_year, year_val, years_forecast, subs_kind='cumulative')[source]#
- geoprior.scripts.plot_geo_cumulative.draw_city_row(*, axes, row_idx, city, panels_3857, col_keys, cmap, cum_tag, vmin, vmax, args, show_panel_titles, hotspots)[source]#