0.1.27 • Published 10 years ago

citygml-to-obj v0.1.27

Weekly downloads
3
License
MIT
Repository
github
Last release
10 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

10 years ago

0.1.26

10 years ago

0.1.25

10 years ago

0.1.24

10 years ago

0.1.22

10 years ago

0.1.21

10 years ago

0.1.20

10 years ago

0.1.19

10 years ago

0.1.18

10 years ago

0.1.17

10 years ago

0.1.16

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago