[GRASSLIST:3536] Re: script for importing Terra-ASTER data
michael.barton at asu.edu
Fri May 28 13:29:04 EDT 2004
I'm explaining this in some detail for the rest of the list as it is
very easy to run into this problem.
I had exactly this problem with the apparent 'lack' of GCP's. It
baffled me until I read the 'fine print' of how gdalwarp works with hdf
files. In you do a gdal-info on the file you will see what is going on.
The hdf file has 20 'subdatasets'. 14 of these subdatasets contain
image information. The other 6 contain the GCP's and related metadata.
As I did, you are trying to georeference subdataset 1. This is NOT
image band 1. This is the metadata and GCP's for image bands 1-3 VNIR.
To actually georeference image band 1, you need to indicate subdataset
2. The relationship between images and subdatasets is listed at the
bottom of the output to gdal-info. In brief, it is
band 1=subdataset 2, 2=3, 3n=4, 3b=5, 4=8, 5=9, 6=10, 7=11, 8=12, 9=13,
10=16, 11=17, 12=18, 13=19, 14=20. Subdatasets 1, 5, 6, 7, 14, and 15
are reserved for metadata and GCP's.
If Level 1A can be georeferenced, I can easily make the change to the
script to let you select them via a flag. Also, I suspect that MODIS
images work much the same way as they come from the same organizations
and use the same hdf format. If so and someone could send me the output
of gdal-info for a MODIS image, I could try to either include MODIS in
an expanded r.in.aster or make a companion r.in.modis.
C. Michael Barton, Professor
School of Human Origins, Cultures, & Societies
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
On May 28, 2004, at 7:30 AM, Zbigniew Perski wrote:
> I found it. The problem was caused by Level 1A data.
> r.in.aster is tryng to read the data as 1B level:
> when I tried to use gdalwarp stand alone:
> gdalwarp -t_srs '+proj=latlong +a=6378137 +rf=298.257223563 +no_defs'
> ERROR 1: Unable to compute a transformation between pixel/line
> and georeferenced coordinates for
> There is no affine transformation and no GCPs.
> In fact the georeferencing should be possible because the data conaitns
> 131 GCP-s:
> Coordinate System is `'
> GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
> ","6326"]],PRIMEM["Greenwich",0],UNIT["degree (supplier to define
> GCP[ 0]: Id=1, Info=
> (0.5,-119.5) -> (13.7399,79.2685,0)
> GCP[ 1]: Id=2, Info=
> (410.5,-119.5) -> (13.9667,79.2295,0)
> W liÅ›cie z piÄ…, 28-05-2004, godz. 07:00, Michael Barton pisze:
>> Thanks for pointing this out.
>> C. Michael Barton, Professor
>> School of Human Origins, Cultures, & Societies
>> PO Box 872402
>> Arizona State University
>> Tempe, AZ 85287-2402
>> Phone: 480-965-6262
>> Fax: 480-965-7671
>> www: <www.public.asu.edu/~cmbarton>
>> On May 27, 2004, at 9:16 PM, Paul Kelly wrote:
>>> On Thu, 27 May 2004, Michael Barton wrote:
>>>> The script should work in either 5.3 or 5.7, but the GUI interface
>>>> only comes up in 5.7.
>>> It uses g.proj, which is only available in 5.7.
More information about the grass-user