Issue Type: Bug Bug
Assignee: Jody Garnett
Components: api
Created: 28/Nov/12 6:08 AM
Description:

Now that I have ReferencedEnvelope3D coming out of Oracle - I can watch geoserver break, and trace the breakage back into GeoTools.

The following code from GeoServer shows the problem:

if (!CRS.equalsIgnoreMetadata(DefaultGeographicCRS.WGS84, declaredCRS)) {
                // transform
                try {
                    ReferencedEnvelope bounds = ReferencedEnvelope.reference(nativeBounds, declaredCRS);
                    return bounds.transform(DefaultGeographicCRS.WGS84, true);
                } catch (Exception e) {
                    throw (IOException) new IOException("transform error").initCause(e);
                }
            } else {
                return new ReferencedEnvelope(nativeBounds, DefaultGeographicCRS.WGS84);
            }

In the above code we need to rust referenced envelope to do the right thing.


The method ReferenceEnvelope3D.transform( CoordinateReferenceSystem, boolean, int ) has the following:

final ReferencedEnvelope3D target = new ReferencedEnvelope3D(transformed);
        final MathTransform transform = operation.getMathTransform();
        JTS.transform(this, target, transform, numPointsForTransformation);
        //smuggle back third coordinate
        target.expandToInclude(0,0,this.minz);
        target.expandToInclude(0,0,this.maxz);

Trouble is it has not checked that the CoordinateReferenceSystem "transformed" is actually 3D. So it is failing when we try and transform to DefaultGeographicCRS.WGS84.

Environment: Oracle 11g XE
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
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to