0.1.2 • Published 5 months ago

@envisim/geojson v0.1.2

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
5 months ago

npm package

@envisim/geojson

A TypeScript library that provides functionality for working with GeoJSON data.

Installation

npm install @envisim/geojson

Usage

Example of creating a GeoJSON Line feature:

import { Feature, LineString } from "@envisim/geojson";

// Create a LineString, from a vector of coordinates ([Longitude, Latitude] pairs)
const lineString = LineString.create([
  [10, 20],
  [10, 30],
]);

// Calculate the length of the linstering
lineString.length();

// Create properties for the feature
const properties = {
  value: 123,
};

// Create a Feature instance
const lineFeature = new Feature(lineString, properties);

// Get the measure of the geometry
lineFeature.measure();

See also

0.1.2

5 months ago

0.1.1

6 months ago

0.1.0

6 months ago