Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skalt/geojson-to-gml-3.2.1
A node module to convert geojson geometries to GML 3.2.1
https://github.com/skalt/geojson-to-gml-3.2.1
geolocation geoserver gml nodejs xml
Last synced: 3 months ago
JSON representation
A node module to convert geojson geometries to GML 3.2.1
- Host: GitHub
- URL: https://github.com/skalt/geojson-to-gml-3.2.1
- Owner: SKalt
- License: gpl-3.0
- Created: 2017-05-15T20:11:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-07T18:19:47.000Z (10 months ago)
- Last Synced: 2024-09-20T14:09:54.040Z (4 months ago)
- Topics: geolocation, geoserver, gml, nodejs, xml
- Language: JavaScript
- Homepage:
- Size: 475 KB
- Stars: 16
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# geojson-to-gml-3
[![npm version](https://badge.fury.io/js/geojson-to-gml-3.svg)](https://badge.fury.io/js/geojson-to-gml-3)
![Build Status](https://img.shields.io/travis/SKalt/geojson-to-gml-3.2.1/master.svg)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](./API.md)
## ContributeContributions are welcome! Please submit issues, reference them in your PR, and
make sure to add tests for any contributions you make.