generate triangulated meshes from shapefiles and geojson
npm install earth-meshgenerate triangulated meshes from shapefiles and geojson
``
usage: earth-mesh FILE {OPTIONS}
-i --iformat Input format: zip, json
Reads from stdin when FILE is "-" or not provided.
`
` js
var createMesh = require('earth-mesh')
var fs = require('fs')
var file = process.argv[2]
var geodata = JSON.parse(fs.readFileSync(file,'utf8'))
var mesh = createMesh(geodata)
console.log(JSON.stringify(mesh))
`
` js
var createMesh = require('earth-mesh')
var shp = require('shpjs')
var fs = require('fs')
var file = process.argv[2]
var geodata = shp.parseZip(fs.readFileSync(file,'utf8'))
var mesh = createMesh(geodata)
console.log(JSON.stringify(mesh))
`
` js`
var createMesh = require('earth-mesh')
Create a simplicial complex mesh from some geojson-formatted data.
To get the library:
``
npm install earth-mesh
To get the command:
```
npm install -g earth-mesh
BSD