Overpass Extractor Client for Node.js
Install
npm install [--save] overpass-extractor
Usage
npm test.js route=road
Constant & Variables
const overpassQuery = ;const Point = ;const overpassExtractor = ; var Relation = ;var fs = ;var Way = ;
Overpass Query
overpassQuery ;
Overpass Extractor
overpassExtractor;overpassExtractor;overpassExtractor;overpassExtractor;
Query Methods
overpassQuery.generalQuery(mapFeatureString)
Executes the query, returns a Promise that, when resolved, gives the GeoJson.
mapFeatureString
defines a pair key=value, like route=road, (you can find OSM:MapFeatures) .
overpassExtractor.relationFeatureExtractor(overpassTurbo);
Manage the GeoJson. Instantiate a new Relation feature that you can manage with its own methods. Return a promise with a Json of Javascript Class.
overpassTurbo
is a GeoJson get by query overpass service.
overpassExtractor.wayFeatureExtractor(overpassTurbo);
Manage the GeoJson. Instantiate a new Way feature that you can manage with its own methods. Return a promise with a Json of Javascript Class.
overpassTurbo
is a GeoJson get by query overpass service.
overpassExtractor.pointFeatureExtractor(overpassTurbo);
Manage the GeoJson. Instantiate a new Point feature that you can manage with its own methods. Return a promise with a Json of Javascript Class.
overpassTurbo
is a GeoJson get by query overpass service.
overpassExtractor.setRelated(results[0],results[1]);
Manage two GeoJsons. Relate a OSM relation with a OSM way. Return a Json of Javascript Class.
results[0]
is a Json managed by a feature extractor.results[1]
is a Json managed by a feature extractor.