Issue Type: Bug Bug
Affects Versions: 9.0-M0
Assignee: Andrea Aime
Attachments: 3dTo2d.patch
Components: referencing, render
Created: 27/Dec/12 12:28 AM
Description:

From email:

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

Further:

Ah, and when transforming a 2d envelope to a 3d one we should make it so that the
3d one is encopassing all possible elevations instead (basically, same projection as the
2d one, but minZ = Double.NEGATIVE_INFINITY, maxZ = Double.POSITIVE_INFINITY

Cheers
Andrea

Project: GeoTools
Priority: Major Major
Reporter: Jody Garnett
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to