2.1.0 • Published 7 years ago

geojson-to-gml-2 v2.1.0

Weekly downloads
11
License
GPL-3.0
Repository
github
Last release
7 years ago

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

Kind: global function
Returns: string - a string of gml describing the input geometry

ParamTypeDescription
coordsArray.<number>the coordinates member of the geometry
srsNamestring | undefineda 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

ParamTypeDescription
coordsArray.<Array.<number>>the coordinates member of the geometry
srsNamestring | undefineda 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

ParamTypeDescription
coordsArray.<Array.<number>>the coordinates member of the geometry
srsNamestring | undefineda 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

ParamTypeDescription
coordsArray.<Array.<Array.<number>>>the coordinates member of the geometry
srsNamestring | undefineda 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
ParamTypeDescription
geomObjecta geojson geometry object
namestringthe name of the multigeometry, e.g. 'MultiPolygon'
srsNamestring | undefineda string specifying the SRS
memberPrefixstringthe 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
ParamTypeDescription
coordsArray.<Array.<number>>the coordinates member of the geometry
srsNamestring | undefineda 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
ParamTypeDescription
coordsArray.<Array.<Array.<number>>>the coordinates member of the geometry
srsNamestring | undefineda 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
ParamTypeDescription
coordsArray.<Array.<Array.<Array.<number>>>>the coordinates member of the geometry
srsNamestring | undefineda 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

ParamTypeDescription
geomsArray.<Object>an array of geojson geometry objects
srsNamestring | undefineda 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

ParamTypeDefaultDescription
geomObjecta geojson geometry object
srsNamestring | undefined"EPSG:4326"a string specifying SRS
2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago