Should custom CRSs round bounding box/topleftcorner coordinates? #102
AndrewAnnex
started this conversation in
General
Replies: 1 comment 2 replies
-
@AndrewAnnex could you share an example how you're seeing the behaviour 🙏 Going back and forth from geographic to projected is really hard and should be avoided when we can. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In planetcantile, I am defining a large collection of custom TMS specs for a collection of polar stereographic and equirectangular projections that use the maximal lat/lon bounds for the projections (whole hemisphere for polar projections and whole globe for equirectangular codes).
For the polar projections (which are in meters) in particular, I end up with inconsistent small floating point issues for the bounding boxes and topLeftCorner for the grids because the projections do not have defined origins other than 0,0. This results in ugly floating point numbers like
-2.957163900508831e-11
which are the results of transforming the bounds in geodetic coordinates to the projection coordinates in pyproj. I am not sureI think it could make sense to always round values close to 0, but it may also make sense to round all coordinates to integers or to a specified precision by the user, as in my equirectangular projections I also get a large number of decimal numbers that probably aren't needed always.
Beta Was this translation helpful? Give feedback.
All reactions