Andrea you are a champion! I will be more than happy to check this over when I
get to a computer (in a couple days!)
I was happy assuming 0 for the WGS84 to WGS84_3D transform (i.e. assume sea
level).
For the specific case of a BBox transform of WGS84 to WGS84_3D I was tempted to
consider a min/max range of elevation (as the goal is to produce a bounds).
--
Jody Garnett
On Monday, 24 December 2012 at 3:26 AM, Andrea Aime wrote:
> Hi,
> I see that Jody is busy adding ad hoc code in GeoTools and GeoServer to handle
> a case of transforming from 2d to 3d coordinates.
>
> While not 100% correct, the transformation is unfortunately require as we try
> to
> handle rendering 3d data over a 2d surface, since that often/always requires
> also building the reverse transformation (2d -> 3d), either to compute the
> size
> of a pixel in source coordinates (for generalization), or pinpoint where a
> clicked pixel lives in source coordinates (to query the clicked feature).
>
> Instead of sprinkling around ad-hoc changes I'd say it's better to allow a 2d
> to 3d
> transformation, making the elevation be 0 in the target result.
>
> The attached patch goes into that direction, Jody, could you give it a shot
> and see
> if that works?
>
> The patch for the moment uses the "lenient datum shift" flag to be activated,
> basically, if we say that transforming datums even if we have no bursa wolf
> params around is ok, then it's also ok to go from 2d to 3d without throwing
> an exception (which is of course illogical in general)
>
> In fact the flag would have to be renamed to just "lenient transform"...
>
> Alternatively, we could just decide that there is no need to throw exceptions
> when
> hopping from 2d to 3d, in the end of the day, 2d is like having the
> coordinates
> on the flat plane, so at 0 elevation.
> On the other side, null is not 0, and on 2d, we really don't know what the
> elevation
> is.
>
> Suggestions, opinions?
>
> Cheers
> Andrea
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it 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
>
> -------------------------------------------------------
>
>
> Attachments:
> - 3dTo2d.patch
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel