3.0.0 • Published 2 months ago

geojson-to-gml-3 v3.0.0

Weekly downloads
38
License
SEE LICENSE IN ./...
Repository
github
Last release
2 months ago

geojson-to-gml-3

NPM Version

A package to translate geojson geometries to GML 3.2.1.

Installation

pnpm add geojson-to-gml-3
npm install geojson-to-gml-3
yarn add geojson-to-gml-3

Use

import type { Geometry } from 'geojson';
import gml from 'geojson-to-gml-3';
import { it, expect } from 'vitest';

it('can convert any geometry to GML', () => {
  const nullIsland: Geometry = {
    type: 'Point',
    coordinates: [0, 0],
  };
  // prettier-ignore
  expect(gml(nullIsland)()).toBe(''
    + `<gml:Point>`
    +   `<gml:pos>`
    +     `0 0`
    +   `</gml:pos>`
    + `</gml:Point>`
  );
});
import type { LineString } from 'geojson';
import { lineString } from 'geojson-to-gml-3';
import { it, expect } from 'vitest';

it('supports tree-shaking for slimmer builds', () => {
  const line: LineString = {
    type: 'LineString',
    coordinates: [
      [0, 0],
      [1, 1],
    ],
  };
  expect(lineString(line)()).toBe(''
    + `<gml:LineString>`
    +   `<gml:posList>`
    +     `0 0 1 1`
    +   `</gml:posList>`
    + `</gml:LineString>`
  );
});

License

geojson-to-gml-3 is free for noncommercial use or commercial use for a period of 30 days. For more details, see the license.


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.

3.0.0

2 months ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago