zh-CN Level 1 Rivers Map

Import easyclimate-map for loading China level 1 river boundary data, matplotlib.pyplot for plotting, and cartopy.crs for map projections. These libraries together support the retrieval and visualization of geographic data.

import easyclimate_map as eclmap
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

Line

Use easyclimate_map.get_zh_CN_river1(type="line") to retrieve the line-type GeoDataFrame of China’s level 1 rivers. This data includes river line segments and can be used to draw river courses.

zh_border_line = eclmap.get_zh_CN_nation(type = "line")
zh_river1_line = eclmap.get_zh_CN_river1(type = "line")
zh_river1_line
FNODE_ TNODE_ LPOLY_ RPOLY_ LENGTH HYD1_4M_ HYD1_4M_ID GBCODE NAME LEVEL_RIVE LEVEL_LAKE geometry
0 18 18 6 4 0.075 1 1359 23010 克鲁伦河 3 1 LINESTRING (117.75391 49.16444, 117.75777 49.1...
1 19 19 5 4 0.111 2 1359 23010 克鲁伦河 3 1 LINESTRING (117.71732 49.18985, 117.72263 49.1...
2 21 21 7 4 0.104 3 1359 23010 克鲁伦河 3 1 LINESTRING (117.00603 48.79309, 117.00961 48.7...
3 29 32 10 13 0.418 4 355 21011 乌加河(乌珠尔郭勒) 4 0 LINESTRING (107.79887 41.20994, 107.80186 41.2...
4 31 33 11 12 0.084 5 346 21011 黄河 1 0 LINESTRING (107.54871 41.2477, 107.5442 41.238...
... ... ... ... ... ... ... ... ... ... ... ... ...
835 708 708 525 488 0.078 836 4001 21011 西江干流水道(西海水道、磨刀门水道) 1 0 LINESTRING (113.35979 22.2463, 113.35568 22.24...
836 768 709 1 525 0.666 837 4001 21011 西江干流水道(西海水道、磨刀门水道) 1 0 LINESTRING (113.08278 22.75672, 113.08035 22.7...
837 710 709 525 1 0.020 838 9999 99300 NaN 0 0 LINESTRING (113.38125 22.22302, 113.40099 22.2...
838 682 710 525 1 1.249 839 4001 21011 西江干流水道(西海水道、磨刀门水道) 1 0 LINESTRING (112.7851 23.1414, 112.78567 23.138...
839 706 711 1 1 1.328 840 1220 21011 澜沧江 1 0 LINESTRING (100.60846 22.28732, 100.60873 22.2...

840 rows × 12 columns



Use GeoPandas’ plot() method for quick visualization of the river line. This step is for initial data inspection without custom projections.

zh_river1_line.plot()
plot zh CN river1
<Axes: >

Create a subplot with PlateCarree projection (central longitude 180°), set geographic extent [70-140°E, 0-50°N]. Add gridlines, coastlines, China’s national boundary line geometries (red lines, no fill), and level 1 river line geometries (blue lines, no fill). This step demonstrates advanced map projections and geometry overlays for rivers. Parameter Details:

  • set_extent: Defines the map display range.

  • gridlines: Adds latitude/longitude grid with labels.

  • coastlines: Draws global coastlines (50m resolution).

  • add_geometries: Overlays national boundaries with red edges, line width 0.3; overlays river geometries with blue edges, line width 0.3.

fig, ax = plt.subplots(subplot_kw={"projection": ccrs.PlateCarree(central_longitude=180)})

ax.set_extent([70, 140, 0, 50])
ax.gridlines(
    draw_labels=["left", "bottom"],
    color="grey",
    alpha=0.5, linestyle="--"
)
ax.coastlines(color="k", lw = 0.5, resolution = "50m")
ax.add_geometries(
    zh_border_line.geometry,
    crs = ccrs.PlateCarree(),
    facecolor = "none",
    edgecolor = "r",
    lw = 0.3
)
ax.add_geometries(
    zh_river1_line.geometry,
    crs = ccrs.PlateCarree(),
    facecolor = "none",
    edgecolor = "b",
    lw = 0.3
)
plot zh CN river1
<cartopy.mpl.feature_artist.FeatureArtist object at 0x7f299d69fc80>

Polygon

Use easyclimate_map.get_zh_CN_river1(type="polygon") to retrieve the polygon-type GeoDataFrame of China’s level 1 rivers. This data includes closed polygon areas for river representations and can be used for area filling (e.g., wide river sections).

zh_river1_polygon = eclmap.get_zh_CN_river1(type = "polygon")
zh_river1_polygon
AREA PERIMETER HYD1_4M_ HYD1_4M_ID GBCODE NAME LEVEL_LAKE CODE_LAKE geometry
0 0.012 0.892 2 3 79200 NaN 0 NaN POLYGON ((117.79163 49.50795, 117.78755 49.511...
1 0.000 0.099 3 4 23010 NaN 4 NaN POLYGON ((117.78146 49.50698, 117.78153 49.498...
2 0.266 4.434 4 1 23010 呼伦湖 1 L230 POLYGON ((117.68472 49.32042, 117.6921 49.3177...
3 0.000 0.111 5 9 79200 NaN 0 NaN POLYGON ((117.71732 49.18985, 117.72082 49.189...
4 0.000 0.075 6 9 79200 NaN 0 NaN POLYGON ((117.75391 49.16444, 117.75384 49.171...
... ... ... ... ... ... ... ... ... ...
545 0.000 0.106 547 9 79200 NaN 0 NaN POLYGON ((113.01131 22.8089, 113.00758 22.8087...
546 0.006 1.775 548 21012 21012 NaN 0 NaN POLYGON ((113.33783 22.80629, 113.34996 22.792...
547 0.000 0.063 549 9 79200 NaN 0 NaN POLYGON ((113.37049 22.77203, 113.36951 22.772...
548 0.000 0.069 550 9 79200 NaN 0 NaN POLYGON ((113.15995 22.73433, 113.15852 22.733...
549 0.001 0.129 551 9 79200 NaN 0 NaN POLYGON ((113.21917 22.7218, 113.21839 22.7202...

550 rows × 9 columns



Use GeoPandas’ plot() method for quick visualization of the river polygon. This step is for initial data inspection without custom projections.

zh_river1_polygon.plot()
plot zh CN river1
<Axes: >

Create a subplot with PlateCarree projection (central longitude 180°), set geographic extent [70-140°E, 0-50°N]. Add gridlines, coastlines, China’s national boundary line geometries (red lines, no fill), and level 1 river polygon geometries (blue fill, no edges). This step demonstrates area fill effects for rivers, suitable for highlighting water bodies or hydrological maps. Parameter Details:

  • Similar to above step, but with facecolor=”b” for area fill and edgecolor=”none” for no borders on rivers.

  • Applicable for overlaying other data layers, such as flow directions or precipitation distributions.

fig, ax = plt.subplots(subplot_kw={"projection": ccrs.PlateCarree(central_longitude=180)})

ax.set_extent([70, 140, 0, 50])
ax.gridlines(
    draw_labels=["left", "bottom"],
    color="grey",
    alpha=0.5, linestyle="--"
)
ax.coastlines(color="k", lw = 0.5, resolution = "50m")
ax.add_geometries(
    zh_border_line.geometry,
    crs = ccrs.PlateCarree(),
    facecolor = "none",
    edgecolor = "r",
    lw = 0.3
)
ax.add_geometries(
    zh_river1_polygon.geometry,
    crs = ccrs.PlateCarree(),
    facecolor = "b",
    edgecolor = "none",
    lw = 0.3
)
plot zh CN river1
<cartopy.mpl.feature_artist.FeatureArtist object at 0x7f299d43bcb0>

Total running time of the script: (0 minutes 5.696 seconds)