GIS automation × Desktop tool × Open government data

Batch Thematic Map Export Tool

The tool exports thematic maps with a consistent layout for each district of a city. The user selects districts, layers and paper settings, and the tool exports the maps one by one according to the style configuration file. Each map is scaled to the extent of its district and includes a title, legend, scale bar and north arrow. This page uses urban planning and metro data published by the Taipei City Government.

6 layer typesLand use zones / roads / metro lines / district boundary / metro stations / public-facility site markers
4 layout elementsTitle / legend / scale bar / north arrow
4 districtsZhongzheng, Datong, Wanhua, Da’an (Taipei City)

Terms

Land use zones

Urban planning divides land into classes such as residential, commercial and industrial zones and park or school sites, shown as a polygon layer. Zone colors follow Annex 3 of the Ministry of the Interior’s Urban Plan Drawing and Document Guidelines.

Style configuration file

A YAML file records the color, line width and opacity of each layer type. All maps read the same configuration.

District extent

The outline of each district. At export, this extent plus a margin sets the display area of the map. District boundaries are dissolved from the Taipei neighborhood-boundary layer by district.

Problem

Before

  • Each map was exported from GIS software after adjusting the display extent, switching layers and setting the legend, and the same steps were repeated for every district.
  • Layer styles followed the operator’s manual settings at the time, so colors and line widths could differ between maps.
  • When the number of districts increased, the export time increased in proportion to the number of maps.

After

  • A graphical interface allows selecting multiple districts, ticking layers and choosing paper size and orientation. After the start button is pressed, the maps are exported one by one.
  • The styles of each layer type are written in the configuration file. Land use colors are set from the regulation annex, and all maps read the same specification.
  • Progress and a preview are shown during export, and the export can be cancelled midway. A portable version that needs no installation and runs offline is also provided.

Workflow

1Read the style fileThe color, line width and opacity of each layer type are loaded.
2Choose export settingsDistricts and layers are ticked in the interface, and paper size and orientation are selected.
3Scale to the district extentThe district outline plus a margin is used as the display extent of the map, and the scale is calculated.
4Add layout elementsA title, a legend listing only the layers that are switched on, a scale bar and a north arrow are placed.
5Export and report progressMaps are exported one by one with progress and a preview, and the user can cancel at any time.

Interactive demo: batch export

Batch thematic map exportMap data are open government data published by the Taipei City Government (sources below)

Districts to export (click a name to preview)

Layers

Paper

Layer style adjustment

Run

Not run yet.
    The preview is shown at the paper’s actual size. Scroll sideways when the window is narrower.
    Style configuration file (updates with the adjustments on the left)

    Before and after

    Drag the handle to compare the output for one district under two style files. Before is an older setting (thinner lines, paler zone colors, no metro station or facility markers); after is this page’s current style file. Both sides are actual output of this page’s code. Neither is a hand-drawn map or a mock-up.

    Before (older settings)After (current style file)
    Batch output (measured)—
    Four districts, A4 landscape, total time—
    Manual mapping timeNot measured
    The time is measured live on your device by this page (building the SVG only, without drawing it on screen and without the 550 ms pause that is shown for effect). It does not represent the export time of GIS software. No measurement of manual mapping exists, so no comparison figure is given and no hand-made map is shown. Changing one style file updates all four districts at once.

    Legal basis for zone colors

    The colors of land use zones and public-facility sites follow the R.G.B values in Annex 3 (Urban Plan Legends) to Point 7 of the Ministry of the Interior’s Urban Plan Drawing and Document Guidelines. The annex states that R.G.B values are the drawing-color basis for digital urban plan maps. Legends the annex does not define follow each urban plan’s own documents; this demo draws them in neutral grey and marks them in the legend.

    Source document: Ministry of the Interior, Urban Plan Drawing and Document Guidelines (都市計畫書圖製作要點), version of 29 January 2018 (ROC year 107). Point 7: “plan-map legends are as set out in Annex 3”. Point 6: “coloring should not be too dense and should be uniform”. Annex 3 PDF: https://www.rootlaw.com.tw/Attach/L-Doc/A040040101047600-1070129-7000-001.pdf (checked 2026-11-23). This is a republished copy. The original was not retrieved from the National Laws and Regulations Database or the Ministry’s own site, and whether a newer version exists has not been confirmed. The government-site R.G.B value is also applied to postal, telecom, medical and waterworks sites, because the annex’s notes state that these are included in government sites and may be labeled individually.

    Data sources and licenses

    DatasetProviderLicenseUpdate date and coordinate system
    Taipei City Urban Plan Land Use Zoning Map (detailed plan, polygons)
    https://data.gov.tw/dataset/156197
    Taipei City Government, Department of Urban DevelopmentOpen Government Data License, Version 1 (Taiwan)File "1150409細部計畫圖.zip"; DBF in the file dated 2026-04-09; dataset-page metadata updated 2026-10-13
    TWD97 TM2 (EPSG:3826; the file has no .prj, so it was inferred from the coordinate range)
    Taipei City Neighborhood Boundaries (dissolved into district boundaries)
    https://data.gov.tw/dataset/121424
    Taipei City Government, Department of Civil AffairsOpen Government Data License, Version 1 (Taiwan)DBF in the file dated 2026-09-21; dataset-page metadata updated 2026-10-13
    TWD97 TM2 (EPSG:3826; .prj included)
    Taipei Metropolitan Area Mass Rapid Transit System Route Map
    https://data.gov.tw/dataset/121208
    Taipei City Government, Department of Rapid Transit SystemsOpen Government Data License, Version 1 (Taiwan)Dataset-page metadata updated 2026-10-13; the file does not state a content date
    EPSG:3826 (declared in the file)
    Taipei Metropolitan Area Mass Rapid Transit System Station Points
    https://data.gov.tw/dataset/121140
    Taipei City Government, Department of Rapid Transit SystemsOpen Government Data License, Version 1 (Taiwan)Dataset-page metadata updated 2026-10-13; the file does not state a content date
    EPSG:3826 (declared in the file)
    All datasets are published on the Taiwan Open Government Data platform and were downloaded on 2026-11-23. Processing: coordinates stay in TWD97 TM2 (meters), geometry is simplified with a 2 m tolerance and rounded to whole meters, and only shapes in the Zhongzheng, Datong, Wanhua and Da’an districts are kept. The “roads” layer is the area the zoning map does not cover, which is mainly planned roads; it is an approximation derived from the zoning map and is not road-centerline data. Public-facility site markers are the centroids of school, park, government and market sites of 1,200 m² or more. The colors of metro lines and stations are data defaults; no rule was found. The maps on this page are a portfolio demonstration with no legal effect. Use the urban plan documents announced by the competent authority for actual zoning.

    Outcome and technology

    Consistent style

    Color, line width and opacity are kept in the configuration file, and a change in one place applies to all maps.

    Automatic layout elements

    Each map is scaled automatically to its district extent, the scale bar length is calculated, and the legend lists only the layers that are switched on and the zone classes that appear in that district.

    Offline use

    The portable version keeps the program and map data in one folder and runs on a computer without a network connection, with no installation.

    PythonQGIS (PyQGIS)geopandasYAML style configurationtkinterBatch exportOffline portable versionOpen government data