mfbonfigli / gocesiumtiler

A Cesium.js point cloud 3D tiles generator from LAS files written in Golang
GNU Lesser General Public License v3.0
169 stars 36 forks source link

Question about the implementation of `ConvertToWGS84Cartesian` #34

Closed unageek closed 2 months ago

unageek commented 1 year ago

Why does the function ConvertToWGS84Cartesian not directly convert the source coordinates to EPSG:4978?

BTW, I think this comment should refer to EPSG:4978 instead of EPSG:4326:

https://github.com/mfbonfigli/gocesiumtiler/blob/baf6afe8e759ec09ffbc5c635f39477b3e356bbb/internal/converters/coordinate/proj4_coordinate_converter/proj4_coordinate_converter.go#L122-L123

mfbonfigli commented 1 year ago

Good catch on the comment. As for the request, I don't remember exactly the details but if I'm not wrong the projection library I'm using did not like very much some direct conversions to 4978 without this intermediate step in particular when the source SRID is "2D" in scope (4978 is a 3D CS and proxying through the 4326 which is 2D helps).

mfbonfigli commented 2 months ago

Closing this issue as stale. Also the function has been refactored in the new version of the code for v2. Feel free to create a new issue if anything new pops up!