Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting CRS from EPSG:31256 to EPSG:4978 generates incorrect tiles #150

Open
gafert opened this issue Jul 5, 2023 · 1 comment
Open

Comments

@gafert
Copy link

gafert commented Jul 5, 2023

When converting a 3D City Database with EPSG:31256 to 3D tiles for cesium with EPSG:497 the postion on the globe is incorrect. Also the normals (not sure about that) and the positions are flipped.

I used the following command:

citygml-tiler -i CityTilerDBConfig.yml --type building --crs_in EPSG:31256 --crs_out EPSG:4978

The data I used is from https://www.wien.gv.at/ma41datenviewer/public/start.aspx called
"Generalisiertes Dachmodell (LOD2.1)" in the EPSG:31256 format, as is the database.

I followed the guide at https://github.com/VCityTeam/py3dtilers/blob/master/docs/Doc/cityGML_to_3DTiles_example.md

Here is an example image rendered in CesiumJS:

image

Also: I tried another way to change the CRS described at the bottom of this page: https://3dcitydb-docs.readthedocs.io/en/latest/impexp/import.html. Altough the reprojected mesh is a bit buggy its at least at the right postion. I guess there are multiple ways to reproject at this is using a lower resolution algorithm. At least I know the data is correct.

Is there any way to to reproject the cityGML correctly?

@andreiveselov
Copy link
Contributor

Could it be due to the fact that EPSG:31256 is using different axis order, i.e. X and Y axis are swapped.? https://spatialreference.org/ref/epsg/31256/html/
Might need to debug reprojection code if this is the case. I belive, pyproj should be able to handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants