Issue Type: Bug Bug
Affects Versions: 8.0
Assignee: Andrea Aime
Attachments: bug.diff
Components: referencing
Created: 01/May/13 5:00 PM
Description:

Attempts to produce a RubberSheetTransform from some inputs can result in the triangles including a degenerate triangle with zero area that causes a SingularMatrixException when computing affine transforms. I will attempt to construct a unit test demonstrating the problem shortly but for my own notes the inputs looked like:

List<GroundControlPoint> gcps = Lists.newArrayList();
gcps.add( new GroundControlPoint(10.0, -30.0, 0.0, 0.0, 0.0));
gcps.add( new GroundControlPoint(11.0, -30.0, 0.0, 7000.0, 0.0));
gcps.add( new GroundControlPoint(11.0, -31.0, 0.0, 7000.0, 6000.0));

List<DirectPosition> corners = Lists.newArrayList();
corners.add(new DirectPosition2D(crs, -100000000.0, -100000000.0));
corners.add(new DirectPosition2D(crs, 100000000.0, -100000000.0));
corners.add(new DirectPosition2D(crs, 100000000.0, 100000000.0));
corners.add(new DirectPosition2D(crs, -100000000.0, 100000000.0));

My proposed solution (in the attached diff) is to just avoid adding degenerate triangles that produce the exception to the final set of triangles. A more subtle solution in the triangulator might also be possible.

Project: GeoTools
Priority: Minor Minor
Reporter: Frank Warmerdam
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
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to