-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ixhlbxi edited this page Apr 13, 2026
·
2 revisions
Extract coordinate system metadata from CSLibrary XML files into CSV and JSON.
CS Extract parses OGC/MapGuide coordinate system XML files, pulling projected and geographic coordinate system definitions into structured, machine-readable formats. It requires only the Python standard library (3.6+) and produces two output files by default: a flat CSV and a nested JSON document.
| Page | Description |
|---|---|
| Usage | CLI options, parameter reference, and usage examples |
| Output Reference | CSV column and JSON key schemas with detailed field descriptions |
- Ensure Python 3.6 or later is installed.
- Clone the repository:
git clone https://github.com/ixhlbxi/CS_Extract.git cd CS_Extract - Run the extractor against a folder of CSLibrary XML files:
python cs_extract.py /path/to/CSLibrary
- Two files are created in the input folder:
coordinate_systems_extended.csvcoordinate_systems_extended.json
CS Extract processes every .xml file in the target folder and collects:
- ProjectedCoordinateSystem elements (State Plane, UTM, etc.)
- GeographicCoordinateSystem elements (lat/lon-based systems)
For each coordinate system it records the name, description, authority string, EPSG code, units, datum, and any additional parameter key-value pairs.
See the Output Reference for the full field-by-field breakdown.
| Requirement | Detail |
|---|---|
| Python | 3.6+ |
| Dependencies | None (standard library only: csv, json, argparse, xml.etree.ElementTree) |
| Input format | OGC/MapGuide CSLibrary XML (namespace http://www.osgeo.org/mapguide/coordinatesystem) |
GPL-3.0 -- see LICENSE.