geojson-to-gml
I wrote a lightweight javascript module to translate GeoJSON to GML 3 or 2. This helps newer web GIS tools talk to older tools that rely on OGC GML, i.e. GeoServer.
GeoJSON and GML are common formats for GIS data. GeoJSON was standardized between 2007-8, while the OGC has maintained GML since the ’90s. The two formats generational differences show, and it can be difficult to translate between the two of them.
OpenLayers and Leaflet-WFST can translate GeoJSON to GML. Both are full-fledged web GIS tools. This is only a string formatting library to translate GeoJSON to GML so that it should plug-and-play in any context.
| GeoJSON to GML-2 | Git Repo | NPM package |
| GeoJSON to GML-3 | Git Repo | NPM package |