GeoTiff reader cannot handle used defined GCS ---------------------------------------------
Key: GEOT-3596 URL: http://jira.codehaus.org/browse/GEOT-3596 Project: GeoTools Issue Type: Bug Affects Versions: 2.7.1 Reporter: Andrea Aime Assignee: Daniele Romagnoli Fix For: 2.7.2 I had a gif image + tfw + prj and converted it to a tiff using the following: gdal_translate -srcwin 50 50 50 50 -a_srs /home/aaime/devel/git-gt/modules/plugin/imagemosaic/src/test/resources/org/geotools/gce/imagemosaic/test-data/index/passA2006128211927.prj /home/aaime/devel/git-gt/modules/plugin/imagemosaic/src/test/resources/org/geotools/gce/imagemosaic/test-data/index/passA2006128211927.gif /tmp/palette.tiff -co compress=deflate Basically what I needed was a small sample paletted image that I derived from that world to image passing the prj file as -a_srs argument. The resulting tiff, attached, cannot be opened by out tiff reader because it uses a "user defined gcs" instead of a projected or geographic crs. Code in GeotiffMetadata2crs: {code} switch (getGeoKeyAsInt(GeoTiffConstants.GTModelTypeGeoKey, metadata)) { case GeoTiffPCSCodes.ModelTypeProjected: return createProjectedCoordinateSystem(metadata); case GeoTiffGCSCodes.ModelTypeGeographic: return createGeographicCoordinateSystem(metadata); default: throw new UnsupportedOperationException( "GeoTiffMetadata2CRSAdapter::createCoordinateSystem:Only Geographic & Projected Systems are supported. "); } {code} The prj file contents are: {code} PROJCS["Albers Equal Area", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]], PROJECTION["Albers Equal Area", AUTHORITY["EPSG","9822"]], PARAMETER["central_meridian", -96.0], PARAMETER["latitude_of_origin", 37.5], PARAMETER["standard_parallel_1", 29.833333333333336], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], PARAMETER["standard_parallel_2", 45.833333333333336], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","41111"]] {code} In my case I can work around the issue by specifying the official epsg code in gdal_translate instead, but it would be good to at least know how much effort is involved in supporting user defined gcs in the reader (there is also a GS user stumbling into this limitation). -- 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 ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel