Wednesday, 25 October 2017

georeferencing - Can I define a transformation between 2D and 3D in Geotools?


I'm using Geotools, and I need to convert coordinates between 2D and 3D coordinate reference systems. I recognize that there's no universally-correct way to do this: 2D -> 3D means "making up" a Z coordinate, and 3D -> 2D means losing information. But, is there some way to teach Geotools that, in my particular context, I want to use a specific transformation. E.g.:


+-----+                 +-----+
| | --- Z = 15 ---> | |
| 2D | | 3D |
| | <-- drop Z ---- | |
+-----+ +-----+

I know I can transform any particular coordinate manually this way, but I'd like to integrate it so this Just Works. e.g. I can do CRS.findMathTranform(a, b) and if a is convertible to my 2D CRS, and my 3D CRS is convertible to b, it works.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...