Skip to content

Find the smallest geofabrik extract which contains a given Polygon.

License

Notifications You must be signed in to change notification settings

BikeCitizens/geofabrik-extracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finds the smallest geofarbik extract which contains a given Polygon.

Usage

Preparations:

npm install # installs dependencies
npm run preprocess # downloads geofabrik metadata and creates a file "geofabrik.geojson" with all extract bounds
npm run browser # optional, browserifies the module ("findExtract.js")

API:

findExtract(polygon, geofabrik)

Returns the name of the smallest (by area) geofabrik extract that still fully contains the polygon (supplied as a GeoJSON feature). Requires the data from geofabrik.geojson as the second parameter (run npm run preprocess to generate it).

About

Find the smallest geofabrik extract which contains a given Polygon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published