0.1.27 • Published 9 years ago

citygml-to-obj v0.1.27

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

CityGML to OBJ

Takes a CityGML file and creates an OBJ file for each building

Usage

bash:

npm install citygml-to-obj

javascript:

var citygml2obj = require("citygml-to-obj");

var options = {
  // Path to CityGML input file
  citygmlPath: "/path/to/some.gml",

  // Path to OBJ output directory
  objPath: "/path/for/obj/output/",

  // Used to project CityGML coords to WGS84
  // This projection is an example for the Berlin CityGML dataset
  proj4def: "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",

  // Overwrite existing OBJ files if they already exist
  overwrite: false,

  // API key for the Mapzen Valhalla elevation endpoint
  valhallaKey: "your_api_key"
};

citygml2obj(options, function(err) {
  if (err) {
    console.error(err);
  }

  console.log("Finished converting CityGML");
});

Example output

# Generated using the polygons-to-obj package
# Origin: (393408.81326613, 35.3899993896484, 5820431.70758075)

v 0 0 0
v 0.0007680089911445975 35.8840621565621 -0.0011349096894264221
v -1.3537642270093784 35.8840621565621 1.3126991000026464
v -1.3545322350109927 0 1.3138340096920729
# Etc...

f 5 3 4
f 3 5 2
f 10 8 9
f 8 10 7
# Etc...
0.1.27

9 years ago

0.1.26

9 years ago

0.1.25

9 years ago

0.1.24

9 years ago

0.1.22

9 years ago

0.1.21

9 years ago

0.1.20

9 years ago

0.1.19

9 years ago

0.1.18

9 years ago

0.1.17

9 years ago

0.1.16

9 years ago

0.1.15

9 years ago

0.1.14

9 years ago

0.1.13

9 years ago

0.1.12

9 years ago

0.1.11

9 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago