npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

geojson-to-gml-2

v2.1.0

Published

a package to translate geojson to gml 2.1.2

Downloads

59

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

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 |