0.2.1 • Published 7 years ago

geojson-helpers v0.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Build Status Coverage Status npm version MIT licensed

GeoJSON Helpers

Helps read & write GeoJSON files based on RFC 7946 GeoJSON.

Install

$ npm install --save geojson-helpers

Quickstart

import geojson from 'geojson-helpers'

const featureCollection = geojson.readFileSync('places.geojson')
// <--Data processing-->
geojson.writeFileSync('new-places.geojson', featureCollection)

Features

  • Reads GeoJSON files
  • Writes GeoJSON files
  • Compact indentation, 1 line per feature (smallest file size possible)
  • Limits coordinates decimals to a maximum of 6
  • Does not include CRS

writeFileSync

Writes GeoJSON file

Parameters

  • path string
  • geojson FeatureCollection GeoJSON FeatureCollection
  • properties [Array<(string | number)>] Only include the following properties

readFileSync

Reads GeoJSON file

Parameters

  • path string File must be a GeoJSON FeatureCollection

Changelog

0.1.0 - 2016-11-09

Begining of project geojson-helpers.

  • readFileSync
  • writeFileSync
0.2.1

7 years ago

0.2.0

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago