On Fri, Jun 13, 2014 at 10:36 PM, Eric W. Anderson <ander...@cs.cmu.edu>
wrote:
> Hi All,
>
> 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. The 3D -> 2D path is normally supported, but the 2D -> 3D never is as
far as I remember.
That said, if all you want is adding an extra static ordinate, it should
not be too hard to do it yourself.
I guess it could be interesting to have some tooling in geotools that given
a 2D geometry and a helper object, would add the 3rd ordinate, where the
helper might look like:
interface ElevationProvider() {
double getElevation(DirectPosition2D pos);
}
which then the client would implement in different ways, e.g., fixed value,
or DEM sampling.
As usual, it's a matter of one having enough time/funding to discuss the
evolution in the dev mailing list,
implement it, and merge it.
Cheers
Andrea
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users