![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
query-geo-boundary
Advanced tools
A Node.js module to query the geo (administrative area) boundary from OSM nominatim and/or overpass (with a RegExp & Map based XML parser & geojson builder for geo boundary re-construction, 3X faster than <a href="https://github.com/tyrasd/osmtogeo
A Node.js library to query the geo (administrative area) boundary from OSM nominatim and/or overpass.
const queryGeoBoundary = require('query-geo-boundary');
queryGeoBoundary(`${geo_name}`).then(boundaries => {
// your post-processing here
}).catch(err => {
// your error handling here
});
Prototype: queryGeoBoundary(geoName, options)
geoName
: name of the geo you want to obtain its boundaryoptions
: optional. only support source
option right now, you can use {source: 'overpass'}
to mandata it to go through overpass service (very slow, and has concurrency limitation), by default (and highly-recommended) it will use openstreetmap nominatim service.Return: an array of osm places with boundary geojson (the place attributes include displayname, lat/lon, boundingbox, and the boundary geojson under "geojson"). A typical result is as below:
[{"place_id":"158973269",
"licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright",
"osm_type":"relation",
"osm_id":"3468769",
"boundingbox":["35.7163774","36.2834811","118.9952393","119.7232973"],"lat":"35.9989034","lon":"119.342173467495",
"display_name":"诸城市, 潍坊市, 山东省, 中国",
"class":"boundary",
"type":"administrative",
"importance":0.43599614036271,
"icon":"https://nominatim.openstreetmap.org/images/mapicons/poi_boundary_administrative.p.20.png",
"geojson":{"type":"Polygon","coordinates":[[[118.9952393,36.0120809],...,[118.9952393,36.0120809]]]}}]
Notice: 'coz it's very common for an administrative uint has the same name with the others, if you want to get the boundary of exactly that place, please supply as much as possible hierarchical adminstrative information in name, e.g., using "Ikeda, Hokkaido" rather than "Ikeda", or you can solve this kind of ambiguity by introducing human interference.
FAQs
A Node.js module to query the geo (administrative area) boundary from OSM nominatim and/or overpass (with a RegExp & Map based XML parser & geojson builder for geo boundary re-construction, 3X faster than <a href="https://github.com/tyrasd/osmtogeo
The npm package query-geo-boundary receives a total of 7 weekly downloads. As such, query-geo-boundary popularity was classified as not popular.
We found that query-geo-boundary demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.