citygml4j / citygml-tools

Collection of tools for processing CityGML files
Apache License 2.0
124 stars 19 forks source link

Question: conversion of citygml with gfs file #43

Closed Marwa-AL closed 1 year ago

Marwa-AL commented 1 year ago

Hi all,

I am working with 3D building data from BayrenAtlas. The data are downloaded in tiles each tile has .gml and .gfs file. I converted the CityGML file to CityJSON for further analysis in Python. However, I noticed a scaling and shift in the data after starting the analysis.

Example: the actual surface area is 15 but I get an area of 15e-5. Also the vertices are shifted out of the geographical extent.

Do you have any idea what could be wrong? Is it possible that some data are missed during the conversion.

Thank you

clausnagel commented 1 year ago

Hi @Marwa-AL, can you please share a dataset and give an example for what you get and expect? Otherwise it's really hard to support you. And please first check whether you run into the same issue as described in #37.

Marwa-AL commented 1 year ago

Hi, You can download the tile (gml and gfs) from this google drive link: https://drive.google.com/drive/folders/1nq2ivspzEygZxP-H3gH5Llg02yCPqLG1?usp=share_link After converting to CityJSON. I am using cjio for processing. I am aware of the transformation which is happening and I am applying it to retrieve the correct coordinates. However, I am still observing the issue I described initially. Basically the surface are scaled down and shifted.

clausnagel commented 1 year ago

Try and convert to CityJSON 1.0 instead. In this conversion, do not transform the coordinates (so, do not use the --transform-ccordinates option).

> citygml-tools to-cityjson --cityjson-version=1.0 /your/CityGML/file.gml

This way, the resulting CityJSON output file will contain the original coordinates and not transformed ones. If there is still a shift, check #37.

Marwa-AL commented 1 year ago

It worked. Thank you very much.