tudelft3d / azul

3D city model viewer for Mac
GNU General Public License v3.0
96 stars 14 forks source link

Add support for CRS #6

Open liberostelios opened 5 years ago

liberostelios commented 5 years ago

It would be useful to add support for CRS when reading a CityJSON (or CityGML) file.

This is really important in cases where horizontal and vertical coordinates are using different units, for instance EPSG:4979 where X and Y are in degrees and Z is in meters (also related to issue #4).

hugoledoux commented 5 years ago

While that doesn’t solve the issue fully, you can use ’cjio reproject’ on CityJSON files before it’s implemented.

liberostelios commented 5 years ago

That's true. I already did that, but it's kind of a mess to try and find an appropriate projection for the dataset.

agilliland commented 5 years ago

selfishly I would also like to see CRS support added in, but I fully understand that the app is much simpler without it and it could be a pain to add in and maintain.

I'm curious if instead of fully trying to support CRS identification and transformation if it's perhaps possible to support a basic transform of just the Z value of each coordinate? I would imagine this being a setting applied by choice after a file is opened similar to the way show edges or show bounding box are applied.

For example, in the case of EPSG:4979 where X and Y are in degrees and Z is in meters, to transform the Z into degrees so that Azul will render everything properly you simply do Z/111139.0 which converts meters to degrees. Maybe there is an easy way to expose something like this so that users put in a coefficient and the Z coordinates are transformed?

Just thinking out loud.