I've submittet a pull request.

The test failed before and passes now, so it should be quite focused.

Regards and thanks,

Peter

On 09/12/2012 12:20 PM, Andrea Aime wrote:
On Wed, Sep 12, 2012 at 11:38 AM, Peter Hopfgartner <peter.hopfgart...@r3-gis.com <mailto:peter.hopfgart...@r3-gis.com>> wrote:

    In GeoServer, nightly build of August, 13, When I try to reproject a
    vector layer from EPSG:25832 TO EPSG:31251, I get an exception like:
      Process failed during execution
    java.lang.IllegalArgumentException: Could not create math transform

    The same runs fine if I transform into a number of other CRSs, like
    EPSG:4326, EPSG:900913, etc.

    What's it, that I'm messing up, here?


Sigh, back in GeoTools ReprojectingFeatureCollection is eatin the original exception at line
131

The reason why it's throwin an exception is that a few lines ago the code is not asking for
a lenient transformation, and the referencing code throws this:

  public static void main(String[] args) throws Exception {
CRS.findMathTransform(CRS.decode("EPSG:25832"), CRS.decode("EPSG:31251"));
    }

Exception in thread "main" org.opengis.referencing.operation.OperationNotFoundException: Bursa wolf parameters required. at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1082) at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:1175) at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:892) at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperationStep(DefaultCoordinateOperationFactory.java:945) at org.geotools.referencing.operation.DefaultCoordinateOperationFactory.createOperation(DefaultCoordinateOperationFactory.java:282) at org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:256)
at org.geotools.referencing.CRS.findMathTransform(CRS.java:1150)
at org.geotools.referencing.CRS.findMathTransform(CRS.java:1118)
at Transform.main(Transform.java:7)

The code should simply be:
CRS.findMathTransform(CRS.decode("EPSG:25832"), CRS.decode("EPSG:31251"), true );

instead. The fix is easy, but someone has to write a test before it can be committed.
Do you have a checkout of GeoTools and time to look into it?

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 962313
mob:   +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------



--
Peter Hopfgartner
web  : http://www.r3-gis.com

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to