Convert GeoJSON into Wavefront OBJ format
ISC License
A converter from GeoJSON to Wavefront OBJ format.
This project has been archived and is not maintained, since it's been a long time since I had reason to work on it.
There's a small command line example in the examples
directory, which you can use to try out the library.
Sample command line:
cd examples
./cli.js norway-coastline.geo.json
It should write an OBJ file to your stdout.
Converts the geojson
to an OBJ, that is written to the stream
.
When done, the callback is called; callback
is a normal Node.js callback
accepting an error as the first argument.
Note that the geojson
must be a Feature
or FeatureCollection
.
Available options:
featureBase
: function f(feature, callback)
that returns the height offeatureHeight
: function f(feature, callback)
that returns the height oflineWidth
: for line geometries, returns the width of the generatedfeatureName
: a function f(feature, callback)
that returns the OBJ groupfeatureMaterial
: a function f(feature, callback)
that returns the namemtllib
option belowcoordToPoint
a function f(coordinate)
that returns thefindLocalProj
method belowmtllib
a string or array of paths that will be added as material