Inconsistent CRS creation in GeoTiffWriterTest
----------------------------------------------

                 Key: GEOT-1261
                 URL: http://jira.codehaus.org/browse/GEOT-1261
             Project: GeoTools
          Issue Type: Bug
          Components: gc geotiff
    Affects Versions: 2.4.M2
            Reporter: Martin Desruisseaux


Since GEOT-1237 fix, we have a new test failure in {{GeoTiffWriterTest}}. The 
{{sourceCRS}} and {{targetCRS}} are no longer equal. The bug is subtle, since 
source and target WKT seem closely identical:

{code:none}
PROJCS["NAD27 / California zone VI", 
  GEOGCS["NAD27", 
    DATUM["North American Datum 1927", 
      SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, 
AUTHORITY["EPSG","7008"]], 
      TOWGS84[-4.2, 135.4, 181.9, 0.0, 0.0, 0.0, 0.0], 
      AUTHORITY["EPSG","6267"]], 
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
    UNIT["degree", 0.017453292519943295], 
    AXIS["Geodetic longitude", EAST], 
    AXIS["Geodetic latitude", NORTH], 
    AUTHORITY["EPSG","4267"]], 
  PROJECTION["Lambert Conic Conformal (2SP)", AUTHORITY["EPSG","9802"]], 
  PARAMETER["central_meridian", -116.25], 
  PARAMETER["latitude_of_origin", 32.166666666666664], 
  PARAMETER["standard_parallel_1", 33.88333333333333], 
  PARAMETER["false_easting", 609601.2192024385], 
  PARAMETER["false_northing", 0.0], 
  PARAMETER["standard_parallel_2", 32.78333333333333], 
  UNIT["m", 1.0], 
  AXIS["Easting", EAST], 
  AXIS["Northing", NORTH]]
{code}

Note the "metres" units, while we would expect feets units for this CRS. 
Inspection of {{ProjectedCRS.getConversionFromBase().getMathTransform()}} on 
{{sourceCRS}} show that this CRS is built with a concatenation involving a 
"metres to feet" affine transform, which is inconsistent with the {{UNIT["m", 
1.0]}} element above. The concequence is that 
{{CRS.findMathTransform(targetCRS, sourceCRS)}} produces the following math 
transform, while we would expect the identity transform:

{code:none}
PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 3.280833333333333], 
  PARAMETER["elt_1_1", 3.280833333333333]]
{code}

My question is: which code created the {{sourceCRS}}? If it is from a 
"standard" method from the referencing module, we have a bug that need to be 
fixed quickly. If it is some custom code in the GeoTIFF module, we may need to 
revisit the way this module handle CRS (it may be a more long-term task).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to