Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skalt/geojson-to-gml-2.1.2
A lightweight javascript module to translate GeoJSON to GML 2.1.2
https://github.com/skalt/geojson-to-gml-2.1.2
geoserver gis gml nodejs xml
Last synced: 6 days ago
JSON representation
A lightweight javascript module to translate GeoJSON to GML 2.1.2
- Host: GitHub
- URL: https://github.com/skalt/geojson-to-gml-2.1.2
- Owner: SKalt
- License: gpl-3.0
- Created: 2017-04-28T03:31:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T23:02:38.000Z (over 7 years ago)
- Last Synced: 2025-01-14T23:33:31.138Z (30 days ago)
- Topics: geoserver, gis, gml, nodejs, xml
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A package to translate geojson geometries to GML 2.1.2.
___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.
Copyright (c) 2012 Open Geospatial Consortium
## Functions
-
Point(coords, srsName) ⇒string
-
converts a geojson geometry Point to gml
-
LineString(coords, srsName) ⇒string
-
converts a geojson geometry LineString to gml
-
LinearRing(coords, srsName) ⇒string
-
converts a geojson geometry ring in a polygon to gml
-
Polygon(coords, srsName) ⇒string
-
converts a geojson geometry Polygon to gml
-
_multi(geom, name, srsName, memberPrefix) ⇒string
-
Handles multigeometries or geometry collections
-
MultiPoint(coords, srsName) ⇒string
-
converts a geojson geometry MultiPoint to gml
-
MultiLineString(coords, srsName) ⇒string
-
converts a geojson geometry MultiLineString to gml
-
MultiPolygon(coords, srsName) ⇒string
-
converts a geojson geometry MultiPolygon to gml
-
GeometryCollection(geoms, srsName) ⇒string
-
converts a geojson geometry GeometryCollection to gml MultiGeometry
-
geomToGml(geom, srsName) ⇒string
-
Translate geojson to gml 2.1.2 for any geojson geometry type
## Point(coords, srsName) ⇒ string
converts a geojson geometry Point to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<number>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## LineString(coords, srsName) ⇒ string
converts a geojson geometry LineString to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<Array.<number>>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## LinearRing(coords, srsName) ⇒ string
converts a geojson geometry ring in a polygon to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<Array.<number>>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## Polygon(coords, srsName) ⇒ string
converts a geojson geometry Polygon to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<Array.<Array.<number>>>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## _multi(geom, name, srsName, memberPrefix) ⇒ string
Handles multigeometries or geometry collections
**Kind**: global function
**Returns**: string
- a string of gml describing the input multigeometry
**Throws**:
- Error
will throw an error if a member geometry is supplied without a `type` attribute
| Param | Type | Description |
| --- | --- | --- |
| geom | Object
| a geojson geometry object |
| name | string
| the name of the multigeometry, e.g. 'MultiPolygon' |
| srsName | string
\| undefined
| a string specifying the SRS |
| memberPrefix | string
| the prefix of a gml member tag |
## MultiPoint(coords, srsName) ⇒ string
converts a geojson geometry MultiPoint to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
**See**
- _multi
- Point
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<Array.<number>>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## MultiLineString(coords, srsName) ⇒ string
converts a geojson geometry MultiLineString to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
**See**
- _multi
- LineString
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<Array.<Array.<number>>>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## MultiPolygon(coords, srsName) ⇒ string
converts a geojson geometry MultiPolygon to gml
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
**See**
- _multi
- Polygon
| Param | Type | Description |
| --- | --- | --- |
| coords | Array.<Array.<Array.<Array.<number>>>>
| the coordinates member of the geometry |
| srsName | string
\| undefined
| a string specifying SRS |
## GeometryCollection(geoms, srsName) ⇒ string
converts a geojson geometry GeometryCollection to gml MultiGeometry
**Kind**: global function
**Returns**: string
- a string of gml describing the input GeometryCollection
**See**: _multi
| Param | Type | Description |
| --- | --- | --- |
| geoms | Array.<Object>
| an array of geojson geometry objects |
| srsName | string
\| undefined
| a string specifying SRS |
## geomToGml(geom, srsName) ⇒ string
Translate geojson to gml 2.1.2 for any geojson geometry type
**Kind**: global function
**Returns**: string
- a string of gml describing the input geometry
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| geom | Object
| | a geojson geometry object |
| srsName | string
\| undefined
| "EPSG:4326"
| a string specifying SRS |