Skip to content

Geomangler is a utility library to process and transform geodata

License

Notifications You must be signed in to change notification settings

afogelberg/geomangler

Repository files navigation

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

  • 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.

About

Geomangler is a utility library to process and transform geodata

Resources

License

Stars

Watchers

Forks

Packages

No packages published