Ciao Romeo, I might have misunderstood your writing, but I think you are mixing concepts here. The geotiff reader is able to create a geotiff by using the ModelTransformationTag or by using ModelPixelScale +ModelTiePoint. The problem here seems that you have geotiff with a CRS that is not supported/implemented, the best thing would be creating a jira for that with some sample data that we can use to reproduce the problem.
Simone. ------------------------------------------------------- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it http://simboss.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini ------------------------------------------------------- On Wed, Mar 11, 2009 at 4:56 PM, Romeo Ahohe <[email protected]> wrote: > Hi, > > I was using GeoTiffReader from GT2 to parse a GeoTiff file when I came > accross the exception at the end of this message. > Now, according to section 2.6.1 of the GeoTiff specification > (http://www.remotesensing.org/geotiff/spec/geotiff2.6.html#2.6), when the > ModelTransformationTag is not available > and there is a single ModelTiePoint, the transformation from between model > space and raster space can be derivied using the information from the tie > point and the ModelPixelScale data. > The matrix representing the transformation is shown at the aforementioned > link. > However, the method createUserDefinedProjectionParameter() in > GeoTiffMetadata2CRSAdapter.java is not creating the proper transformation > according that section of the GeoTiff specification. Instead, that method > is choking because no ProjCoordTransGeoKey is available in the GeoTiff file > even though there is sufficient information available for deriving what the > projection should be. > The simplest solution is to compute the matrix representation of the > user-defined transformation and create the proper ProjectionCRS object based > on that. > However, before I submit a patch, I need to know if I'm on the right path. > Am I missing anything from the specification ? > Thanks, > Romeo > org.geotools.data.DataSourceException: GEOTIFF Module Error Report > GeoTiffMetadata2CRSAdapter::createUserDefinedProjectionParameter(String > name):User defined projections must specify coordinate transformation code > in ProjCoordTransGeoKey > ModelPixelScaleTag: [0.0048042791094009985,0.004804279109400998,0.0] > ModelTiePointTag: (1 tie points) > TP #0: [0.0,0.0,0.0] -> [-2.760058348350874,8.505976163194468,0.0] > ModelTransformationTag: NOT AVAILABLE > GeoKey #1: Key = 1, Value = null > GeoKey #2: Key = 1024, Value = 1 > GeoKey #3: Key = 1025, Value = 1 > at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:256) > at GeoTiff.TiffTags$GetImageTask.displayImage(TiffTags.java:234) > at GeoTiff.TiffTags$GetImageTask.run(TiffTags.java:154) > at java.lang.Thread.run(Thread.java:637) > Caused by: org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffException: > GEOTIFF Module Error Report > GeoTiffMetadata2CRSAdapter::createUserDefinedProjectionParameter(String > name):User defined projections must specify coordinate transformation code > in ProjCoordTransGeoKey > ModelPixelScaleTag: [0.0048042791094009985,0.004804279109400998,0.0] > ModelTiePointTag: (1 tie points) > TP #0: [0.0,0.0,0.0] -> [-2.760058348350874,8.505976163194468,0.0] > ModelTransformationTag: NOT AVAILABLE > GeoKey #1: Key = 1, Value = null > GeoKey #2: Key = 1024, Value = 1 > GeoKey #3: Key = 1025, Value = 1 > at > org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createUserDefinedProjectionParameter(GeoTiffMetadata2CRSAdapter.java:1140) > at > org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createUserDefinedPCS(GeoTiffMetadata2CRSAdapter.java:695) > at > org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createProjectedCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:297) > at > org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:234) > at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:308) > at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:235) > ... 3 more > > ------------------------- > > This e-mail and any attachments may contain confidential material for the > sole use of the intended recipient. If you are not the intended recipient, > please be aware that any disclosure, copying, distribution or use of this > e-mail or any attachment is prohibited. If you have received this e-mail in > error, please contact the sender and delete all copies. > > Thank you for your cooperation > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Geotools-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
