[gdal-dev] Unknown file type

Greg Ederer greg at ergonosis.com
Fri Jan 9 14:26:56 EST 2009


Hi Frank,

I see:

   <GeoTransform>440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0</ 
GeoTransform>

given as an example in the Virtual Format Tutorial.  And, I have been  
looking at the GDAL Data Model documentation trying to figure out how  
to compute these values for my input files.  The docs say:

<begin docs>
Affine GeoTransform
GDAL datasets have two ways of describing the relationship between  
raster positions (in pixel/line coordinates) and georeferenced  
coordinates. The first, and most commonly used is the affine transform  
(the other is GCPs).

The affine transform consists of six coefficients returned by  
GDALDataset::GetGeoTransform() which map pixel/line coordinates into  
georeferenced space using the following relationship:

     Xgeo = GT(0) + Xpixel*GT(1) + Yline*GT(2)
     Ygeo = GT(3) + Xpixel*GT(4) + Yline*GT(5)

In case of north up images, the GT(2) and GT(4) coefficients are zero,  
and the GT(1) is pixel width, and GT(5) is pixel height. The  
(GT(0),GT(3)) position is the top left corner of the top left pixel of  
the raster.

Note that the pixel/line coordinates in the above are from (0.0,0.0)  
at the top left corner of the top left pixel to  
(width_in_pixels,height_in_pixels) at the bottom right corner of the  
bottom right pixel. The pixel/line location of the center of the top  
left pixel would therefore be (0.5,0.5).
</end docs>

But, I'm still unsure how to compute the required values.  The docs  
don't give units for GT(1) and GT(5), and for GT(0) and GT(3).  My  
data have a resolution of 0.1 deg lat X 0.1 deg lon, and the upper  
left lat/lon is 40N,20W.  Could you give me some pointers on how to  
compute the transform values?

Thanks, again!

Greg

On Jan 9, 2009, at 10:45 AM, Frank Warmerdam wrote:

> Greg Ederer wrote:
>> Metadata:
>>  AREA_OR_POINT=Area
>> Image Structure Metadata:
>>  INTERLEAVE=BAND
>> Corner Coordinates:
>> Upper Left  (    0.0,    0.0)
>> Lower Left  (    0.0,  801.0)
>> Upper Right (  751.0,    0.0)
>> Lower Right (  751.0,  801.0)
>> Center      (  375.5,  400.5)
>> Band 1 Block=751x2 Type=Float32, ColorInterp=Gray
>>  NoData Value=-999
>> However, when I attempt to load this GeoTIFF into GeoServer, my  
>> ultimate goal, I get:
>> class org.vfny.geoserver.global.ConfigurationException: Could not  
>> obtain a reader for the CoverageDataSet. Please check the  
>> CoverageDataSet configuration!
>> I have successfully loaded other GeoTIFFs into GeoServer that were  
>> prepared by another member of our team from the same raw binary  
>> data using IDL  So, I suspect that there is something amiss with my  
>> GeoTIFF.
>
> Greg,
>
> I notice you did not include a GeoTransform tag to indicate the  
> georeferenced
> location.  Without this you are not getting valid corner  
> coordninates and
> this may be what is preventing GeoServer from reading the file.
>
> Keep in mind that the origin in the geotransform should be the top  
> left corner
> of the top left pixel treated as an area.
>
> Best regards,
> -- 
> --------------------------------------- 
> +--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for  
> Rent
>



More information about the gdal-dev mailing list