1.11.1 • Published 4 years ago

ginkgoch-geom v1.11.1

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

Ginkgoch Geometries for Node.js

This project provides the basic functions for geometries.

  1. Construct Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection with will defined APIs.
  2. Calculate geometry self information such as area, perimeter etc.
  3. Converts geometry format between wkt, wkb, json and Ginkgoch geometry classes.
  4. Support popular geo-spatial analyzing methods.

Install

yarn add ginkgoch-geom

Docs

Visit https://ginkgoch.github.io/node-geom for detail.

Demo

Full demo, please play on RunKit at: https://runkit.com/ginkgoch/geometry-demo

This is about how to use ginkgoch-geom library to create your own geometries and convert to various formats. The first on is about location. I will create a point that is located to a city in LA. It is easy to convert to GeoJSON format.

const geom = require("ginkgoch-geom")
const point = new geom.Point(-119.698189, 34.420830);
point.toJSON();

geom demo simple point

Except point, it is also allow to create other geometries such as line, polygon or multi-point, multi-line, multi-polygon etc.

const getJSON = require("async-get-json");

const geomURL = 'https://github.com/ginkgoch/map-data-demo/raw/master/json/geometries.json';
const geomJson = (await getJSON(geomURL));
geom.FeatureCollection.create(geomJson).toJSON();

geom demo various geometries

For more demos about converting to well-known text (WKT), well-known binary (WKB) or spatial analyzing, please try on RunKit directly. If anything interesting, feel free to contact me with ginkgoch@outlook.com, I'm glad to help.

The is the low-level library in my mapping echo system. Please watch me on github for more function with map support on Node.js.

Happy Mapping!

1.11.1

4 years ago

1.11.0

4 years ago

1.10.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.8

5 years ago

1.7.7

5 years ago

1.7.6

5 years ago

1.7.5

5 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago