0.1.1 • Published 6 years ago
geovector v0.1.1
geovector
Wrapper around GIS Vector Files, like GeoJSON, ESRIJSON, and Shapefile that provides a standard interface.
load from url on front-end
const parseGeoVector = require("geovector");
const url = 'https://s3.amazonaws.com/geovector/geojsons/madagascar.geojson';
fetch(url)
.then(response => response.json() )
.then(parseGeoVector)
.then(geovector => {
console.log("geovector:", geovector);
});
load from file on back-end
const parseGeoVector= require("geovector);
fs.readFile('/tmp/mexico.zip', (error, data) => {
const mexico = parseGeoVector(data);
console.log("mexico is:", mexico);
});
properties
name | description |
---|---|
coordinates | coordinates |
projection | equal to EPSG code, like 4326 |
xmax | xmax in crs, which is often in longitude |
xmin | xmin in crs, which is often in longitude |
ymin | ymin in crs, which is often in latitude |
ymax | ymax in crs, which is often in latitude |