[GRASS-user] Wrong projection info after importing Geotif
Markus Neteler
neteler at osgeo.org
Wed Oct 22 05:59:32 EDT 2008
On Wed, Oct 22, 2008 at 10:34 AM, Agustin Lobo <aloboaleu at gmail.com> wrote:
> Hi!
>
> I'm trying to import a geotif file
> (http://user.uni-frankfurt.de/~grieser/downloads/NetPrimaryProduction/npp_CruP_All_fine_geo.zip)
Note that the map exceeds South!
gdalinfo npp_CruP_All_fine_geo.tif
Driver: GTiff/GeoTIFF
Files: npp_CruP_All_fine_geo.tif
Size is 4320, 2160
Coordinate System is:
GEOGCS["WGS 84",
...
Metadata:
AREA_OR_POINT=Area
...
Pixel Size = (0.083333333343262,-0.083333333343262)
...
Corner Coordinates:
Upper Left (-179.9583334, 89.9583333) (179d57'30.00"W, 89d57'30.00"N)
Lower Left (-179.9583334, -90.0416667) (179d57'30.00"W, 90d 2'30.00"S)
Upper Right ( 180.0416667, 89.9583333) (180d 2'30.00"E, 89d57'30.00"N)
Lower Right ( 180.0416667, -90.0416667) (180d 2'30.00"E, 90d 2'30.00"S)
Center ( 0.0416667, -0.0416667) ( 0d 2'30.00"E, 0d 2'30.00"S)
Band 1 Block=4320x1 Type=Byte, ColorInterp=Gray
NoData Value=254
Offset: 0, Scale:10.4598910148779
-> 90d 2'30.00"S does not quite exist.
Looking at North:
> 89.9583333+0.083333333343262
[1] 90.04167
I suspect a pixel-refers-to-center versus pixel-refers-to-corner bug in the
map.
> I import the geotif file with:
> r.in.gdal input=/media/mifat32/MASTER_ICTA2007_2008/2008b/npp.tif
> output=npp
Here I get
GRASS 6.4.svn (latlong):~ > r.in.gdal npp_CruP_All_fine_geo.tif out=test
Projection of input dataset and current location appear to match
WARNING: Fixing subtle input data rounding error of south boundary
(-0.0416667>4.62963e-07)
100%
<test> created
r.in.gdal complete.
-> South is "fixed" (not necessarily correct, though, see above).
GRASS 6.4.svn (latlong_tbe_climate):~ > g.region rast=test -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 89:57:30.000039N
south: 90S
west: 179:57:30.000077W
east: 179:57:29.999923W
nsres: 0:05:00.069477
ewres: 0
rows: 2159
cols: 4320
cells: 9326880
-> Global wrap around problem... due to the apparently shifted map:
179d57'30.00"W and 180d 2'30.00"E do not look right to me.
> But, according to gdalinfo, the geotif file is correct:
>
> $ gdalinfo npp.tif
> Driver: GTiff/GeoTIFF
> Files: npp.tif
> Size is 1440, 572
...
You are looking at a different file here, comparing the size and the
coordinates.
The map in the ZIP file doesn't look properly positioned to me.
Subsequently GRASS fails.
Markus
More information about the grass-user
mailing list