cityjson / cjio

CityJSON/io: Python CLI to process and manipulate CityJSON files
MIT License
126 stars 32 forks source link

Keep global coordinates for STL #181

Open ThomasPe opened 10 months ago

ThomasPe commented 10 months ago

Is your feature request related to a problem? Please describe. I'm trying to bring together meshes from terrain (Geotiff) and cities (CityJSON). To align them properly it would be great to have both meshes in their UTM coordinates which is currently not possible with cjio since everything gets calculated from 0/0 if I see it correctly.

Describe the solution you'd like An option / parameter to skip the translate to minx,miny part.

hugoledoux commented 10 months ago

No, CityJSON files can use any CRS (that has en EPSG code). The 0/0 you mention is based on the "transformation" used to compress the data, see these: https://www.cityjson.org/specs/2.0.0/#referencesystem-crs + https://www.cityjson.org/specs/2.0.0/#transform-object

However, GeoTIFF is not a mesh but a raster format, which is not supported by CityJSON. You would need to convert the terrain to a TIN first, startinpy can help you with this partly and it exports to CityJSON directly.