Skip to content

SKalt/geojson-to-gml-3.2.1

Repository files navigation

geojson-to-gml-3

npm version Build Status

A package to translate geojson geometries to GML 3.2.1.


Geography Markup Language (GML) is an OGC Standard.

More information may be found at http://www.opengeospatial.org/standards/gml

The most current schema are available at http://schemas.opengis.net/ .


Policies, Procedures, Terms, and Conditions of OGC(r) are available at http://www.opengeospatial.org/ogc/legal/ .

OGC and OpenGIS are registered trademarks of Open Geospatial Consortium.

Installation

npm install geojson-to-gml-3

Use

// convert any geometry
import turf from '@turf/helpers';
import {geomToGml} from 'geojson-to-gml-3';
geomToGml(turf.point([0,0]).geometry);

// or for ultra-slim builds, import only what you need.
import {point, lineString, makeTranslator} from 'geojson-to-gml-3';
const geomToGml = makeTranslator({point, lineString});
// returns (geom, gmlId, params) => {
//  return {Point:point, LineString:lineString}[geom.type](geom, gmlId, params);
// }
geomToGml(turf.point([0,0]).geometry);
geomToGml(turf.linString([[0,0], [1,1]]));

For more details, see the API docs

Contribute

Contributions are welcome! Please submit issues, reference them in your PR, and make sure to add tests for any contributions you make.

About

A node module to convert geojson geometries to GML 3.2.1

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •