Is there a JavaScript parser to obtain GeoJSON from GML?

I have found only Python and OGR solutions.

2 Answers 2


I'd use the OpenLayers Format readers and writers.

GML reader here http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GML-js.html

GeoJSON writer here http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GeoJSON-js.html

May be overkill to just convert from GML to GeoJSON, but OpenLayers API are widely used and tested, and also easy to extend.

Also, you could create a small OpenLayers build with just those classes and their dependencies.


I think this project may helps you. https://github.com/highsource/ogc-schemas.

It is based on Node.js environment. but if you want to make use of it in client side, it is possible with Browserify(http://browserify.org/)

  • Any advice on using jsonix and ogc-schemas, without running a bit of Java ? Commented Jun 12, 2018 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.