Hi Frank,

Thanks you very much for your help. I think I'm close. I have created a .vrt file with:

<VRTDataset rasterXSize="751" rasterYSize="801">
  <SRS>
  GEOGCS[&quot;WGS 84&quot;,
    DATUM[&quot;WGS_1984&quot;,
        SPHEROID[&quot;WGS 84&quot;,6378137,298.2572235630016,
            AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],
        AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],
    PRIMEM[&quot;Greenwich&quot;,0],
    UNIT[&quot;degree&quot;,0.0174532925199433],
    AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]
  </SRS>
<VRTRasterBand dataType="Float32" band="1" subClass="VRTRawRasterBand"> <SourceFilename relativetoVRT="1">10day_precip.bin.1999121</ SourceFilename>
    <ImageOffset>0</ImageOffset>
    <PixelOffset>4</PixelOffset>
    <LineOffset>3004</LineOffset>
    <ByteOrder>LSB</ByteOrder>
    <NoDataValue>-999.0</NoDataValue>
  </VRTRasterBand>
</VRTDataset>


I then run:

gdal_translate -of GTiff 10day_precip.bin.1999121.vrt 10day_precip.bin.1999121.tif

and this produces a GeoTIFF, as expected.  Running:

  gdalinfo 10day_precip.bin.1999121.tif

gives:

Driver: GTiff/GeoTIFF
Files: 10day_precip.bin.1999121.tif
Size is 751, 801
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
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.

Here's the gdalinfo output for a GeoTIFF that loads properly:

Driver: GTiff/GeoTIFF
Files: /Users/gregederer/tmp/starspan_tests/rfe_2005_07_mm.tif
Size is 751, 801
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-20.050000000000001,40.049999999999997)
Pixel Size = (0.100000000000000,-0.100000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -20.0500000,  40.0500000) ( 20d 3'0.00"W, 40d 3'0.00"N)
Lower Left  ( -20.0500000, -40.0500000) ( 20d 3'0.00"W, 40d 3'0.00"S)
Upper Right (  55.0500000,  40.0500000) ( 55d 3'0.00"E, 40d 3'0.00"N)
Lower Right (  55.0500000, -40.0500000) ( 55d 3'0.00"E, 40d 3'0.00"S)
Center      (  17.5000000,  -0.0000000) ( 17d30'0.00"E,  0d 0'0.00"S)
Band 1 Block=751x2 Type=Float32, ColorInterp=Gray

Any further suggestions?

Thanks, again!

Greg


On Jan 8, 2009, at 11:56 AM, Frank Warmerdam wrote:

Greg Ederer wrote:
Hi,
I am a GDAL newbie. I just got handed a group of files with the following description:
description of the data
    1)  content:
rain == 10 day precipitation analysis by merging GTS gauge observations and 3 kinds of satellite estimates
                 (GPI,SSM/I, and AMSU)
     2)  coverage:
      -40.00S -- 40.00N Northward;
20.00W -- 55.00E Eastward 751 grid points in east - west direction
      801 grid points in south - north direction
  3)  resolution:
      0.1 deg lat x 0.1 deg lon
      dekad
  4)  missing values
      -999.0
I'd like to read and manipulate these files using GDAL. When I run gdalinfo, I get something like the following:
Macintosh-4:RFE_dekedal gregederer$ gdalinfo 10day_precip.bin.1999121
ERROR 4: `10day_precip.bin.1999121' not recognised as a supported file format.
gdalinfo failed - unable to open '10day_precip.bin.1999121'.
I suspect that GDAL requires some additional metadata in order to read these files. Any suggestions?

Greg,

Assuming this is a raw binary file you can write a VRT "raw" description
for it based on:


 http://www.gdal.org/gdal_vrttut.html

Read down in particular to the ".vrt Descriptions for Raw Files" section.

There are also several other methods for accomplishing something similar.

In your case I'd assume the file is 751x801 x 1band x Float32 with
ImageOffset=0, PixelOffset=4, LineOffset = 3004 and ByteOrder LSB.

Best regards,
--
--------------------------------------- +--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to