geomangler

1.4.1 • Public • Published

Geomangler

Geomangler is a utility library to process and transform geodata in Node.js. It can also be used as a geospatial server with the built in express server. Supported formats are csv, GeoJSON, TopoJSON, gml, json, PostGIS, SQL Server among others.

Installing

Git and Node.js (6 or higher) is required.

npm install geomangler

or

  1. Clone the repository: git clone https://github.com/afogelberg/geomangler.git
  2. Install with npm: npm install

Getting started

It's easy to get started. Just require geomangler and start to mangle your geodata, as in this example.

const gm = require('geomangler');

gm.add('geojson', 'in file name');
gm.buffer(5);
gm.save('geojson', 'out file name', {
  path: './',
  epsgCode: 'EPSG:3010'
});

Using Geomangler as a server

Geomangler can also be used as a server, for example like this.

const gm = require('geomangler');
const gmscript = require('./scripts/gmscript');

const server = gm.server({
  port: '3011'
});

server.post('/geomangler', gmscript);

Api reference

General

  • add - add source from file.
  • db - create a db connection.
  • read - read features from a format.
  • save - save source to file.
  • server - start/use an express server.
  • write - write features in a format.

Manglers

Helpers

install

npm i geomangler

Downloadsweekly downloads

8

version

1.4.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability