This roadmap lists every FMG module (JavaScript) and its Python destination, along with outputs and verification.
-
New files:
py_fmg/__init__.pypy_fmg/config.pypy_fmg/db.pypy_fmg/models.pycli/main.pyimporters/postgis.py
-
Outputs: basic schema + CLI skeleton
- JS:
utils.js,random.js - Py:
py_fmg/utils.py,py_fmg/rng.py - Outputs: seeded RNG fixtures, math helpers
- Tests: parity with FMG sequences
- JS:
grid.js,mesh.js,relaxation.js - Py:
py_fmg/mesh.py,py_fmg/relax.py - Outputs: cells.geojson (polygons + neighbors)
- Preview:
cells.html
- JS:
heightmap.js - Py:
py_fmg/heightmap.py - Outputs: cells.geojson with
elevation - Preview:
heightmap.html
- JS:
ocean.js,coastline.js - Py:
py_fmg/watermask.py,py_fmg/coastline.py - Outputs: coastlines.geojson, updated cells
- Preview:
coast.html
- JS:
temperature.js,precipitation.js,biomes.js - Py:
py_fmg/temperature.py,py_fmg/precipitation.py,py_fmg/biomes.py - Outputs: cells.geojson with climate & biome props
- Preview:
biomes.html
- JS:
rivers.js - Py:
py_fmg/rivers.py - Outputs: rivers.geojson
- Preview:
rivers.html
- JS:
cultures.js,names-base.js,names-generator.js,burgs-and-castles.js - Py:
py_fmg/cultures.py,py_fmg/names.py,py_fmg/burgs.py - Outputs: burgs.geojson
- Preview:
burgs.html
- JS:
states-and-provinces.js,provinces-generator.js,borders.js - Py:
py_fmg/states.py,py_fmg/provinces.py,py_fmg/borders.py - Outputs: states.geojson, provinces.geojson, borders.geojson
- Preview:
states.html
- JS:
roads.js,routes.js,trade.js - Py:
py_fmg/routes.py,py_fmg/trade.py - Outputs: routes.geojson, sea_routes.geojson
- Preview:
routes.html
- JS:
regiments.js,markers.js - Py:
py_fmg/regiments.py,py_fmg/markers.py - Outputs: regiments.geojson, markers.geojson
- Preview:
military.html
- JS:
export.js - Py:
py_fmg/exporter.py - Outputs: per-map manifest.json listing all GeoJSON layers
- New in Python only
- Py:
importers/postgis.py - Reads GeoJSON into PostGIS tables with FK checks
- New in Python only
- Py:
cli/main.py,app/main.py - Commands:
generate,preview,import - API (optional):
POST /maps/generate
- New in Python only
- Template HTML with togglable layers
- Generated per stage and as
full_map.html
- Translate JS → Python module
- Write seeded parity tests
- Produce GeoJSON artifacts
- Generate Leaflet preview
- Validate geometry + schema
- Mark progress in
docs/porting-status.md