Socket
Socket
Sign inDemoInstall

geojson2obj

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geojson2obj

Convert GeoJSON into Wavefront OBJ format


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

GeoJSON to OBJ

A converter from GeoJSON to Wavefront OBJ format.

hildedal-render

API

toObj(geojson, stream, options)

Converts the geojson to an OBJ, that is written to the stream.

Note that the geojson must be a Feature or FeatureCollection.

Available options:

  • featureBase: function f(feature) that returns the height of a feature's base; by default, a function that always returns 0.
  • featureHeight: function f(feature) that returns the height of a feature; by default, a function that returns 10 for polygons and 0.3 for linestrings.
  • lineWidth: for line geometries, returns the width of the generated geometry; defaults to 2.
  • featureName: a function f(feature) that returns the OBJ group name used for a feature; by default a function that numbers the features
  • featureMaterial: a function f(feature) that returns the name of the material for a feature; if undefined, the material is not changed for this feature; see mtllib option below
  • coordToPoint a function f(coordinate) that returns the OBJ vertex point (X and Z) for a GeoJSON coordinate, needed to convert from GeoJSON's WGS84 coordinates to a cartesian coordinate; see the findLocalProj method below
  • mtllib a string or array of paths that will be added as material libraries to the resulting OBJ

Keywords

FAQs

Package last updated on 11 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc