0.1.1 • Published 6 years ago

geovector v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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

namedescription
coordinatescoordinates
projectionequal to EPSG code, like 4326
xmaxxmax in crs, which is often in longitude
xminxmin in crs, which is often in longitude
yminymin in crs, which is often in latitude
ymaxymax in crs, which is often in latitude