[GRASSLIST:1548] Re: r.in.gdal and a GeoTIFF

Ed Davison bfdi533 at cbacc-security3.bus.utexas.edu
Thu Oct 23 11:51:40 EDT 2003


On Thu, 2003-10-23 at 04:43, Markus Neteler wrote:

> Searching around I found this file.
> http://edcftp.cr.usgs.gov/pub/data/nationalatlas/shdrlfi020l.tar.gz

That is indeed the file but when I downloaded it I must have gotten a
corrupt version as when I re-downloaded it I get the same gdalinfo you
have below for the file.

> A good idea is always to use 'gdalinfo' to get information about Projection,
> coordinate system, datum etc.:
> 
> gdalinfo shdrlfi020l.tif
> Driver: GTiff/GeoTIFF
> Size is 10366, 7273
> Coordinate System is:
> PROJCS["unnamed",
>     GEOGCS["WGS 84",
>         DATUM["WGS_1984",
>             SPHEROID["WGS 84",6378137,298.2572235629972,
>                 AUTHORITY["EPSG","7030"]],
>             AUTHORITY["EPSG","6326"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4326"]],
>     PROJECTION["Lambert_Azimuthal_Equal_Area"],
>     PARAMETER["latitude_of_center",45],
>     PARAMETER["longitude_of_center",-100],
>     PARAMETER["false_easting",0],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]]]
> Origin = (-6086629.000000,4488761.000000)
> Pixel Size = (1000.000000,-1000.000000)

> Method 1:
>  You have to define a location accordingly to the parameters reported above.
>  Then you can import into this location, exit, change to your Lat/Long
>  location and run 'r.proj' there to pull the LAEA projected map into the
>  Lat/Long location.

I will look at this further but r.proj is one of those totally
non-understood concepts for me right now.  I will try your script to
create a new mapset below and see how this goes.

> Method 2:
> You run 'gdalwarp' (provided you have the full GDAL installed, at time
> the CVS version or you wait for the next official release) and reproject
> the GeoTIFF file to another projection, stored as new GeoTIFF file:
>  
> #get EPSG code from /usr/local/share/proj/epsg
> gdalwarp -t_srs '+init=epsg:4326'  shdrlfi020l.tif shdrlfi020l_LL_wgs84.tif

I tried this as it seemed to be more straight-forward and did not
involve logging out and back in with a new mapset location, etc. 
However, when I ran the command I got: 
GRASS:~/gis/data/nationalatlas/shdrlf > !gdalw
gdalwarp -t_srs '+init=epsg:4326'  shdrlfi020l.tif
shdrlfi020l_LL_wgs84.tif
:0.ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: latitude or longitude exceeded limits
ERROR 1: Reprojection failed, err = -14, further errors will be
supressed on the transform object.
..10...20...30...40...50...60...70...80...90...100 - done.

The result was an all black image.  No transformation was done at all
and no data was copied.

Ed Davison





More information about the grass-user mailing list