[GRASS5] r.in.gdal's problems with projections is G_get_window ()problem.

Eric G. Miller egm2 at jps.net
Sat Mar 17 02:31:43 EST 2001


On Sat, Mar 17, 2001 at 01:15:25AM -0500, Frank Warmerdam wrote:
> Eric,
> 
> GDAL does support (to a limited extent) Arc/Info .prj files with 
> arc/info grids (binary and ascii), but not with tiff files.  I haven't
> actually seen this many times.  It could be easily added though, if this
> is of wide interest. 

I dunno, maybe.  I understand the newer ArcView is also supposed to
understand .prj files (but maybe GeoTIFF as well ...).

> GDAL does support tiff world files, though I think the GeoTIFF info
> takes precidence if it is there.  Perhaps this is your problem.  Your
> world file is being ignored because there is some sort of dummy GeoTIFF
> information in the file. 

Well, I just ran some tests to see if that was the problem. Nope.  While
the tiff file in question had some geotiff tags without projection info,
I converted it to a xpm file then back to a geotiff file which seemed to
remove all the geotiff stuff.  Now, listgeo shows:

$ listgeo tifftest.tif
Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      End_Of_Tags.
   Keyed_Information:
      End_Of_Keys.
   End_Of_Geotiff.


Corner Coordinates:
 ... unable to transform points between pixel/line and PCS space

But with:
GRASS> r.in.gdal -o input=tifftest.tif output=tifftest
GRASS> r.info tifftest
 +----------------------------------------------------------------------------+
 | Layer:    tifftest                       Date: Fri Mar 16 23:07:23 2001    |
 | Mapset:   snows                          Login of Creator: felix           |
 | Location: utm                                                              |
 | DataBase: /home/felix/gis.d                                                |
 | Title:     ( tifftest )                                                    |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster              Number of Categories: 255              |
 |   Data Type:    CELL                                                       |
 |   Rows:         1426                                                       |
 |   Columns:      1140                                                       |
 |   Total Cells:  1625640                                                    |
 |        Projection: UTM (zone 10)                                           |
 |            N:       1426    S:          0   Res:     1                     |
 |            E:       1140    W:          0   Res:     1                     |
 |                                                                            |
 |   Data Source:                                                             |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |                                                                            |
 +----------------------------------------------------------------------------+


As you can see, the resolution values and raster extents of the tiff world file
are not being used.

$ cat tifftest.tfw
                   0.38876593293013 
                   0.00000000000000
                   0.00000000000000
                  -0.39782634201703 
              702567.88102749444000 
             4287537.86842568960000

I'm not sure what the problem is, but apparently GDALGetGeoTransform() in main.c
is not coming up with the affine parameters???  

-- 
Eric G. Miller <egm2 at jps.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list