Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Martin Desruisseaux <martin.desruisseaux@ge...>  20080828 16:06:10

Jan Jezek a écrit : > how is it possible to reach the goal that the .toWKT() will return the string including new parameters but just in case that such parameters were explicitly specified without changing the > Projection as such? Just to make sure that I get the big picture right, could you confirm me that in the current state, invoking ProjectedCRS.getBaseToCRS().getMathTransform().toWKT() on the CRS you created gives you a CONCAT_MT with 2 transforms, the first one containing a few elements like PARAMETER["elt_0_0", 0] and the second one containing the map projection parameters without the PARAMETER["X_Scale", ...] parameters? Martin 
From: Jan Jezek <h.jezek@ce...>  20080826 09:18:14

Hi all, According to question in users list (below)  I would like to fix the Krovak projection to be compatible with ESRI definition. Problem is that ESRI definition is solving the axis swapping by defining the X_scale, Y_Scale and XY_Plane_Rotation parameters like this: PARAMETER["X_Scale",1.0], PARAMETER["Y_Scale”,1.0], PARAMETER["XY_Plane_Rotation",90.0] The meaning in geotools meaner of such parameters is the same (in the case of Krovak) as using AXIS["x", EAST], AXIS["y", NORTH], instead of EPSG default AXIS["x", WEST], AXIS["y", SOUTH], I can fix it by handling ESRI parameters directly in Krovak.transformNormalized method but maybe it can by solved more generally on higher level. Any idea on that? Thank you in advanced, Jan. ______________________________________________________________ > Od: xhavelka@... > Komu: geotoolsgt2users@... > Datum: 26.08.2008 08:20 > Předmět: Re: [Geotoolsgt2users] Geotools cannot parse EPSG:102067 from esri.properties > >Hello Jan, > >is something new with EPSG:102067? > > >Jaroslav > >View this message in context: http://www.nabble.com/GeotoolscannotparseEPSG%3A102067fromesri.propertiestp18338972p19156407.html >Sent from the geotoolsgt2users mailing list archive at Nabble.com. > > > >This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >Build the coolest Linux based applications with Moblin SDK & win great prizes >Grand prize is a trip for two to an Open Source event anywhere in the world >http://moblincontest.org/redirect.php?banner_id=100&url=/ >_______________________________________________ >Geotoolsgt2users mailing list >Geotoolsgt2users@... >https://lists.sourceforge.net/lists/listinfo/geotoolsgt2users > 
From: Martin Desruisseaux <martin.desruisseaux@ge...>  20080826 14:06:26

Jan Jezek a écrit : > According to question in users list (below)  I would like to fix the Krovak projection to be compatible with ESRI definition. Problem is that ESRI definition is solving the axis swapping by defining the X_scale, Y_Scale and XY_Plane_Rotation parameters like this: > > PARAMETER["X_Scale",1.0], > PARAMETER["Y_Scale”,1.0], > PARAMETER["XY_Plane_Rotation",90.0] > > (...snip...) > > I can fix it by handling ESRI parameters directly in Krovak.transformNormalized method but maybe it can by solved more generally on higher level. > > Any idea on that? It would be better to left the Krovak projection unchanged, and handle that as an affine transform to be concatenated to the Krovak projection. The advantage is that if further affine transform concatenations are needed (e.g. additional axis changes, unit conversions, etc.), GeoTools know how to concatenate that efficiently with an other affine transform, while it would not known how to concatenate that with the handling code inside the Krovak projection. We would need new code (something independant of Krovak projection) which creates an AffineTransform2D instance from the above "X_Scale", "Y_Scale" and "XY_Plane_Rotation" parameters. This affine transform would then be concatenated to the MapProjection (any projection, not limited to Krovak) using ConcatenatedTransform.create(theProjection, theAffineTransform). This work could be done inside MapProjection.Provider directly. We would need to rename createMathTransform as createMapProjection for all MapProjection.Provider, then implement a new createMathTransform method which create the affine transform, invoke createMapProjection and do the concatenation. Martin 
From: Jan Jezek <h.jezek@ce...>  20080827 10:41:33

Hi Martin, thanks for quick and clear answer. I'm almost done with that. Just one question: The concatenated transformation takes effect when I do CRS.findMathTransoform(...) that is good. If I try to to convert the CRS back to wkt I can not see new parameters and not even the the axis were changed (I think that ParserTest do same assertion). I changed MapProjection and Krovak classes but just its providers by adding new parameters to Korvak.Provider ParameterDescriptorGroup and the ParameterDescriptor variables to MapProjection.AbstractProvider. The concatenation is made as you suggest in Provider.createMathTransform. Can I ask you how is it possible to reach the goal that the .toWKT() will return the string including new parameters but just in case that such parameters were explicitly specified without changing the Projection as such? Thanks a lot. Best regards, Jan. ______________________________________________________________ > Od: martin.desruisseaux@... > Komu: Jan Jezek <h.jezek@...> > CC: geotoolsdevel <geotoolsdevel@...>, xhavelka@... > Datum: 26.08.2008 16:06 > Předmět: Re: [Geotoolsdevel] ESRI Axis definition issue > >Jan Jezek a écrit : >> According to question in users list (below)  I would like to fix the Krovak projection to be compatible with ESRI definition. Problem is that ESRI definition is solving the axis swapping by defining the X_scale, Y_Scale and XY_Plane_Rotation parameters like this: >> > PARAMETER["X_Scale",1.0], > PARAMETER["Y_Scale”,1.0], >> PARAMETER["XY_Plane_Rotation",90.0] >> > (...snip...) >> > I can fix it by handling ESRI parameters directly in Krovak.transformNormalized method but maybe it can by solved more generally on higher level. > > Any idea on that? > > >It would be better to left the Krovak projection unchanged, and handle that as an affine transform to be concatenated to the Krovak projection. The advantage is that if further affine transform concatenations are needed (e.g. additional axis changes, unit conversions, etc.), GeoTools know how to concatenate that efficiently with an other affine transform, while it would not known how to concatenate that with the handling code inside the Krovak projection. > >We would need new code (something independant of Krovak projection) which creates an AffineTransform2D instance from the above "X_Scale", "Y_Scale" and "XY_Plane_Rotation" parameters. This affine transform would then be concatenated to the MapProjection (any projection, not limited to Krovak) using ConcatenatedTransform.create(theProjection, theAffineTransform). This work could be done inside MapProjection.Provider directly. We would need to rename createMathTransform as createMapProjection for all MapProjection.Provider, then implement a new createMathTransform method which create the affine transform, invoke createMapProjection and do the concatenation. > > Martin > > 
From: Martin Desruisseaux <martin.desruisseaux@ge...>  20080828 16:06:10

Jan Jezek a écrit : > how is it possible to reach the goal that the .toWKT() will return the string including new parameters but just in case that such parameters were explicitly specified without changing the > Projection as such? Just to make sure that I get the big picture right, could you confirm me that in the current state, invoking ProjectedCRS.getBaseToCRS().getMathTransform().toWKT() on the CRS you created gives you a CONCAT_MT with 2 transforms, the first one containing a few elements like PARAMETER["elt_0_0", 0] and the second one containing the map projection parameters without the PARAMETER["X_Scale", ...] parameters? Martin 
From: Jan Jezek <h.jezek@ce...>  20080829 10:07:31

Hi Martin, > >Just to make sure that I get the big picture right, could you confirm me >that in the current state, invoking > > ProjectedCRS.getBaseToCRS().getMathTransform().toWKT() > >on the CRS you created gives you a CONCAT_MT with 2 transforms, the first >one containing a few elements like PARAMETER["elt_0_0", 0] and the second >one containing the map projection parameters without the >PARAMETER["X_Scale", ...] parameters? > yes  System.out.println(((ProjectedCRS)CRS.parseWKT(prj)).getConversionFromBase().getMathTransform()); gives: CONCAT_MT[PARAM_MT["Krovak", PARAMETER["semi_major", 6377397.155], PARAMETER["semi_minor", 6356078.962818189], PARAMETER["latitude_of_center", 49.5], PARAMETER["longitude_of_center", 24.833333333333332], PARAMETER["azimuth", 30.28813975277778], PARAMETER["pseudo_standard_parallel_1", 78.5], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0]], PARAM_MT["Affine", PARAMETER["num_row", 3], PARAMETER["num_col", 3], PARAMETER["elt_0_0", 0.00000000000000006123], PARAMETER["elt_0_1", 1.0], PARAMETER["elt_1_0", 1.0], PARAMETER["elt_1_1", 0.00000000000000006123]]] But CRS.parseWKT(prj) doesn't give the affine transform but just this: PROJCS["SJTSK_Krovak_East_North", GEOGCS["GCS_S_JTSK", DATUM["D_S_JTSK", SPHEROID["Bessel_1841", 6377397.155, 299.1528128]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], PROJECTION["Krovak"], PARAMETER["latitude_of_center", 49.5], PARAMETER["longitude_of_center", 24.833333333333332], PARAMETER["azimuth", 30.28813975277778], PARAMETER["pseudo_standard_parallel_1", 78.5], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH]] The original wkt is: String prj = new String( "PROJCS[\"SJTSK_Krovak_East_North\", \n" + "GEOGCS[\"GCS_S_JTSK\",DATUM[\"D_S_JTSK\",\n" + "SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],\n" + "PRIMEM[\"Greenwich\",0.0],\n"+ "UNIT[\"Degree\",0.0174532925199433]],\n"+ "PROJECTION[\"Krovak\"],\n" + "PARAMETER[\"Pseudo_Standard_Parallel_1\",78.5],\n" + "PARAMETER[\"Scale_Factor\",0.9999],\n" + "PARAMETER[\"Azimuth\",30.28813975277778],\n" + "PARAMETER[\"Longitude_Of_Center\",24.83333333333333],\n" + "PARAMETER[\"Latitude_Of_Center\",49.5],\n"+ "PARAMETER[\"X_Scale\",1.0],\n"+ "PARAMETER[\"Y_Scale\",1.0],\n" + "PARAMETER[\"XY_Plane_Rotation\",90.0],\n" + "AXIS[\"x\", EAST], \n" + "AXIS[\"y\", NORTH], \n" + "UNIT[\"Meter\",1.0]]"); 
Sign up for the SourceForge newsletter:
No, thanks