Overview

The older OSM shapefile examples in the sibling workspace are a useful reminder that themed shapefiles remain common as an interchange format. The web map, however, usually wants something else:

Why it matters

When to use

Use this pattern when:

Inputs

Workflow and method

  1. Unpack Confirm .shp, .dbf, .shx, and projection metadata are present.
  2. Inspect Review CRS, geometry type, field names, and record counts.
  3. Normalize Rename fields, drop dead weight, and standardize types.
  4. Simplify Reduce geometry complexity where cartographically safe.
  5. Split Separate layers by use or zoom strategy.
  6. Package Export web-ready GeoJSON or vector tiles.
Layer type Suggested action
Administrative boundaries Keep attributes lean, preserve topology
Roads and lines Simplify carefully, keep class hierarchy
Large polygons Simplify by zoom target and preserve IDs
Dense points Cluster or thin for small-scale views

Suggested CLI layout

scripts/
  publishing/
    inspect_shapefile.js
    normalize_schema.js
    simplify_geometry.js
    build_tiles.js
data/
  incoming/
  staged/
  web/

QA checks

Outputs

Typical outputs:

Limitations

Some shapefiles are structurally messy enough that a quick pipeline will not save them. Broken geometries, weak CRS metadata, and overloaded attribute tables often require a dedicated cleaning pass before web packaging is safe.