Add world coordinates to regiment exports for GIS integration

Regiment CSV Export Enhancements:
- Add X_World (m) and Y_World (m) columns using meters per pixel conversion
- Include both current and base position world coordinates
- Rename existing coordinate columns to X_Pixel/Y_Pixel for clarity
- Add getMetersPerPixel() helper function supporting km, m, and miles units

GeoJSON Regiment Export:
- Create new saveGeoJsonRegiments() function in export.js
- Export regiments as Point features with Fantasy Map Cartesian coordinates
- Include all military unit data, state information, and position metadata
- Add regiments button to GeoJSON export UI section

This enables direct import of regiment data into QGIS using the custom
Fantasy Map Cartesian CRS with proper world coordinate positioning.
This commit is contained in:
barrulus 2025-08-17 19:30:25 +01:00
parent 83573c8936
commit 11977a42fc
3 changed files with 114 additions and 1 deletions

View file

@ -6052,6 +6052,7 @@
<button onclick="saveGeoJsonRivers()" data-tip="Download rivers data in GeoJSON format">rivers</button>
<button onclick="saveGeoJsonMarkers()" data-tip="Download markers data in GeoJSON format">markers</button>
<button onclick="saveGeoJsonBurgs()" data-tip="Download burgs data in GeoJSON format">burgs</button>
<button onclick="saveGeoJsonRegiments()" data-tip="Download regiments data in GeoJSON format">regiments</button>
</div>
<p>
GeoJSON format is used in GIS tools such as QGIS. Check out