Giter Club home page Giter Club logo

import_citygml's Introduction

Import CityGML

This is a Blender add-on to import geometry (only geometry) from 3D city models encoded in CityGML files. It was started by Dealga McArdle (zeffii) in 2015 as io_cityGML_basic add-on for Blender 2.7. In 2020, the add-on was updated for Blender 2.8 and 2.9 by ppaawweeuu. In 2023, the add-on was updated again by Simon Nieswand (nieswand).

Basic Functionality

This add-on imports geometry from CityGML file (or files) as one mesh/object (per file).

basic means basic :)

There can be much non-geometrical information in CityGML files, for example materials, textures, building part classifications (wall, roof, floor, furniture), number of floors, roof type, adresses, ocupancy and much more. Properties can be assigned to objects (building, road, tunnel) or parts (wall, roof), or geometry (solids, polygons, triangles). There is no limitation in amount of information stored in CityGML file and there was no intention to import more than geometry.

Installation

  1. Download repository as zip (through GitHub this can be done through the Clone or download > Download ZIP green button).

  2. Run Blender and go to Edit > Preferences > Add-ons and press the Install... button.

  3. Select the downloaded ZIP and press Install Add-on from File....

  4. Enable the add-on from the list, by ticking the empty box next to the add-on's name. (Optional: If this is an update, un-tick and tick the add-on to reload it!)

Features:

Menu

Import menu item (import CityGML .gml)

As One

Imports all geometry as one object

Multi-file

Single or multiply file import (multiple files = multiple objecs)

Names

Imported file name = object & mesh name

Options

Imported object are located in (0, 0, 0) (their origin) but mesh points can be for example x=12342222, y=23343322, z=23. City models can be huge. That is the reason why there are some problems in Blender with displaying geometry. It means problems with zooming, rotating, shadows, view clipping etc.

There are 3 workarounds:

  1. Origin Point

We can overwrite imported geometry origin point to be closer to Blender world origin (0, 0, 0).

CityGML files are readable in Notepad (Notepad++ is much better, especially for very big text files). We can find series of coordinates between <gml:posList> or <gml:pos> tags.

Below example when we could set import Origin Point x=750000, y=380000, z=0

  1. Import Scale

We can scale all imported geometry to be closer to World Origin.

  1. Recalculate View Clip End

When we work on big objects we need to change the view clipping range. This option can recalulate the view clip end based on the size of the imported geometry.

Other

Other features:

  • Imports into current collection
  • Imports <gml:posList> and lists of <gml:pos> tags
  • Imports ground triangles (if any)
  • Exception handling if GML file has no geometry & console progress info

Testing Datasets

Add-on was tested on files from polish geoportal.gov.pl

Here are some direct links to CityGML files for 3 cities:

Warszawa - map link / Warszawa CityGML LoD1 / Warszawa CityGML LoD2

Lublin - map link / Lublin CityGML LoD1 / Lublin CityGML LoD2

Krakrów - map link / Kraków CityGML LoD1 / Kraków CityGML LoD2

Add-on was also tested on other CityGML datasets from CityJSON.org site (for example New York).

Limitations

There is general issue with polygons with holes. Polygons in CityGML can be created by two (or more) rings. In that case inner ring is interpreted as void and is substracted from outer ring. Rules_for_Validating_GML_Geometries_in_CityGML.

Blender sees two coplanar faces with connected vericles.

import_citygml's People

Contributors

ppaawweeuu avatar nieswand avatar zeffii avatar

Stargazers

Bruno P. Kinoshita avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.