Slide 1

Slide 1 text

CityGML on GDAL Stelios Vitalis 30/9/2018

Slide 2

Slide 2 text

• Random Geometry parsing • No hierarchy • Useless for CityGML 2 GML on GDAL < 2.2

Slide 3

Slide 3 text

GDAL 2.2.1

Slide 4

Slide 4 text

• New GMLAS driver (coexisting with previous GML) • Parses the whole schema (.xsd) • Creates layers for every entity type in the schema • Fills layers with the data found on the dataset (.gml) 4 GDAL 2.2.1

Slide 5

Slide 5 text

How to use? • On any GDAL tools or library, you just have to define the GMLAS prefix > ogrinfo GMLAS:/path/to/file.gml 5 GDAL 2.2.1

Slide 6

Slide 6 text

Requirements: • The file has to provide links to the schema definitions (the xsi:schemaLocation property on .gml header) • Otherwise, you have to provide them explicitly: ogrinfo GMLAS:input.gml -oo XSD=http://schemas.opengis.net/citygml/ landuse/1.0/landUse.xsd,http://schemas.opengis.net/citygml/ cityfurniture/1.0/cityFurniture.xsd,http://schemas.opengis.net/ citygml/texturedsurface/1.0/texturedSurface.xsd,http:// schemas.opengis.net/citygml/transportation/1.0/ transportation.xsd,http://schemas.opengis.net/citygml/building/1.0/ building.xsd,http://schemas.opengis.net/citygml/waterbody/1.0/ waterBody.xsd,http://schemas.opengis.net/citygml/relief/1.0/ relief.xsd,http://schemas.opengis.net/citygml/vegetation/1.0/ vegetation.xsd,http://schemas.opengis.net/citygml/cityobjectgroup/ 1.0/cityObjectGroup.xsd,http://schemas.opengis.net/citygml/generics/ 1.0/generics.xsd 6 GDAL 2.2.1

Slide 7

Slide 7 text

What can we do with it?

Slide 8

Slide 8 text

It’s GDAL so: • Use is as a library for any input • Use it with stand-alone tools like ogrinfo, ogr2ogr etc. 8 What can we do?

Slide 9

Slide 9 text

With ogr2ogr we can convert any (City)GML to any format. Successfully tried so far: • GeoJSON • Shapefile • PostGIS Probably, also, Oracle Spatial. 9 What can we do?

Slide 10

Slide 10 text

Can we create CityGMLs as well? • In theory yes! 10 What can we do?

Slide 11

Slide 11 text

Look at my (one and only) blogpost: https://3d.bk.tudelft.nl/svitalis/citygml/gdal/2017/07/24/messing-around-with-citygml-on-gdal-2.2.html 11 More information

Slide 12

Slide 12 text

CityGML on QGIS

Slide 13

Slide 13 text

• The GML Application Schema toolbox allows for import of GML files in QGIS 3 (to be released on November). https://github.com/BRGM/gml_application_schema_toolbox 13 CityGML on QGIS

Slide 14

Slide 14 text

https://github.com/BRGM/gml_application_schema_toolbox 14 CityGML on QGIS

Slide 15

Slide 15 text

https://github.com/BRGM/gml_application_schema_toolbox 15 CityGML on QGIS

Slide 16

Slide 16 text

Thank you!