パッケージの詳細

@lykmapipo/geo-tools

lykmapipo300MIT0.7.27

Opinionated geo utilities for day to day development

lykmapipo, common, utils, helpers

readme

geo-tools

Build Status Dependencies Status Coverage Status GitHub License

Commitizen Friendly code style: prettier Code Style npm version

Opinionated geo utilities for day to day development

Requirements

Installation

npm install --save @lykmapipo/geo-tools

Usage

import {
  randomPosition,
  randomPoint,
  readShapefile,
  readGeoJSON
} from '@lykmapipo/geo-tools';

randomPosition()
//=> [-76.41031, 67.0704]

randomPoint()
//=> { type: 'Point', coordinates: [ -76.41031, 67.0704 ] }

readShapefile('data.shp', (error, { finished, feature, next }) => {
  // handle read errors
  if (error) {
    return done(error);
  } 
  // handle read finish
  if (finished) {
    return done();
  } 
  // process features
  // and request next chunk from stream
  processFeature(error => next(error));
});

readGeoJSON('data.geojson', (error, { finished, feature, next }) => {
  // handle read errors
  if (error) {
    return done(error);
  } 
  // handle read finish
  if (finished) {
    return done();
  } 
  // process features
  // and request next chunk from stream
  processFeature(error => next(error));
});

Environment

GEO_MAX_LENGTH=0.0001
GEO_MAX_ROTATION=0.39269908169872414
GEO_BBOX=-180,-90,180,90

Test

  • Clone this repository

  • Install all dependencies

npm install
  • Then run test
npm test

Contribute

It will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.

Licence

The MIT License (MIT)

Copyright (c) lykmapipo & Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

更新履歴

0.7.27 (2021-09-06)

Chores
  • deps: force latest version & audit fix (6504548c)
Documentation Changes
  • readme: update build status to travis.com (11dd5ec6)

0.7.26 (2021-08-09)

Chores
  • deps: force latest version & audit fix (d21f8854)
Documentation Changes

0.7.25 (2021-06-04)

Chores
  • deps: force latest version & audit fix (1dc9825e)

0.7.24 (2021-02-09)

Chores
  • deps: force latest version & audit fix (34426268)

0.7.23 (2021-01-04)

Chores
  • deps: force latest version & audit fix (3a8aa5a7)

0.7.22 (2020-12-25)

0.7.21 (2020-12-16)

Chores
  • deps: force latest version & audit fix (d2163fc1)

0.7.20 (2020-12-05)

Chores
  • deps: force latest version & audit fix (33a8e288)

0.7.19 (2020-11-12)

0.7.18 (2020-10-05)

Chores
  • deps: force latest version & audit fix (20a4e442)

0.7.17 (2020-09-23)

0.7.16 (2020-09-10)

Chores
  • deps: force latest version & audit fix (0119bcca)

0.7.15 (2020-09-02)

Chores
  • deps: force latest version & audit fix (9934b0b4)

0.7.14 (2020-08-19)

Chores
  • deps: force latest version & audit fix (0e1a6f61)

0.7.13 (2020-08-04)

Chores
  • deps: force latest version & audit fix (859760ce)

0.7.12 (2020-07-27)

Chores
  • deps: force latest version & audit fix (5f89e193)

0.7.11 (2020-07-20)

Chores
  • deps: force latest version & audit fix (e902ecaa)

0.7.10 (2020-07-12)

Chores
  • deps: force latest version & audit fix (1fd2af50)

0.7.9 (2020-07-08)

Chores
  • deps: force latest version & audit fix (018ce951)

0.7.8 (2020-07-01)

Chores
  • deps: force latest version & audit fix (f49a6b68)

0.7.7 (2020-06-25)

Chores
  • deps: force latest version & audit fix (e8e0a9d6)

0.7.6 (2020-06-16)

Chores
  • deps: force latest version & audit fix (324710de)

0.7.5 (2020-06-07)

Chores
  • deps: force latest version & audit fix (835427fe)

0.7.4 (2020-05-29)

Chores
  • deps: force latest version & audit fix (87ae2578)

0.7.3 (2020-05-14)

Chores
  • deps: force latest version & audit fix (2b5134dd)

0.7.2 (2020-05-09)

Chores
  • deps: force latest version & audit fix (3f01c152)

0.7.1 (2020-05-01)

Chores
  • deps: force latest version & audit fix (ffb532c3)

0.7.0 (2020-05-01)

Chores
  • deps: force latest version & audit fix (f510c6f4)
Refactors
  • use newer geojson-validation api (70dc98a2)

0.6.9 (2020-04-25)

Chores
  • deps: force latest version & audit fix (f68bb891)

0.6.8 (2020-04-15)

Chores
  • deps: force latest version & audit fix (6af0a2f6)

0.6.7 (2020-03-30)

Chores
  • deps: force latest version & audit fix (ad6113a1)

0.6.6 (2020-03-06)

Chores
  • deps: force latest version & audit fix (de70e0b5)

0.6.5 (2020-02-28)

Chores
  • deps: force latest version & audit fix (17676248)

0.6.4 (2020-02-16)

Chores
  • deps: force latest version & audit fix (5143f274)

0.6.3 (2020-02-04)

Chores
  • deps: force latest version & audit fix (a4af2faa)

0.6.2 (2020-01-22)

Chores
  • release: compile latest source (4779ccb9)

0.6.1 (2020-01-22)

Bug Fixes
  • seed: unmerge on read json file (30f1c966)

0.6.0 (2020-01-22)

Chores
  • deps: force latest version & audit fix (9650bd0a)
New Features

0.5.4 (2020-01-22)

Chores
  • deps: force latest version & audit fix (cc06b6e9)

0.5.3 (2020-01-16)

Chores
  • deps: force latest version & audit fix (4f9075ab)

0.5.2 (2020-01-14)

Chores
  • deps: force latest version & audit fix (67ebbc49)
Bug Fixes
  • use default geo bbox if non provided (7901cb24)

0.5.1 (2020-01-12)

Chores
  • deps: force latest version & audit fix (8ebf92dd)

0.5.0 (2020-01-05)

Chores
  • deps: force latest version & audit fix (11b500d3)
New Features
  • calculation:
    • compute centroid of feature (e4f4d8ac)
    • parse coordinate string to geometry (83b11eff)
Tests

0.4.2 (2019-12-16)

Bug Fixes
  • geometry: remove feature from validations (496d004e)

0.4.1 (2019-12-16)

Bug Fixes
  • geometry: excluse is feature checks (8d7607da)

0.4.0 (2019-12-16)

Chores
  • deps: force latest version & audit fix (8b6baffb)
New Features

0.3.0 (2019-12-06)

Chores
  • deps: force latest version & audit fix (97aacb28)
New Features
Refactors
  • read: support pass options to actual readers (d61add10)

0.2.2 (2019-12-05)

Chores
  • deps: force latest version & audit fix (17f4ffea)

0.2.1 (2019-12-03)

Chores
  • deps: force latest version & audit fix (202f1040)
Bug Fixes
  • read: improve control flow on shapefile read (9dfe3bee)

0.2.0 (2019-12-03)

Chores
  • deps: force latest version & audit fix (4b1d3667)
Documentation Changes
  • env: specify common settings (b4baf6ab)
New Features
  • validation:
    • normalize error object (a7f88e5f)
    • implement geojson types validate helpers (b4f325a6)
  • constant: extract common values (72d4162f)

0.1.0 (2019-11-29)

Chores
  • deps: force latest version & audit fix (6fad5fa9)
  • add package keywords (a1eaffba)
Documentation Changes
New Features
  • read:
    • implement shapefile read (f758f009)
    • implement geojson file read (4ed0a814)
    • define shapefile & geojson read contracts (232813bb)
  • random:
    • implement geometry collection generator (6b483913)
    • implement random geometry generator (62d9b1a8)
    • add multipolygon generator (ff52b63d)
    • implement multilinestring generator (55f505e6)
    • add random polygon generator (fffdb856)
    • generate random multipoints (d12c20f0)
    • add random positions helper (e764148b)
    • generate random line string (1309207d)
    • calculate next position from previos (2b3fbf08)
    • add random position helper (b80d3892)
    • implement random point generator (c8f512fb)
    • add random longitude & latitude generator (a9174925)
    • add helpers for geojson random types (2d7a13e1)
Refactors
Code Style Changes
  • read: improve example jsdocs (9e963bb8)