[GRASS-user] r.in.gdal worldclim-data - G_set_window():
geographic latitude not valid for north
Markus Metz
markus.metz.giswork at googlemail.com
Sun Jan 30 13:59:25 EST 2011
On Sun, Jan 30, 2011 at 7:34 PM, Markus Metz
<markus.metz.giswork at googlemail.com> wrote:
> On Sun, Jan 30, 2011 at 6:55 PM, Helmut Kudrnovsky <hellik at web.de> wrote:
>> Hi,
>>
>> I have an esri binary grid from http://www.worldclim.org/formats in wgs84/ll
>>
> I had the same problem with a worldclim raster.
>
> I can see two possibilities to get it import ito wgs84/ll
>
> 1) quick and easy, but maybe not correct with r.in.gdal -l
>
> 2) the hard way
> Assume a precision loss somewhere in the creation of the esri binary
> grid. I assume that the (ESRI) software used to create these rasters
> uses single and not double precision for extends, resolution, center
> coordinates etc.
>
> Assume that the bounds are supposed to be
> North: 90
> South -60
> East: 180
> West: -180
>
> and not
> North: 90.0000078
> South -60
> East: 180
> West: -180.0000188
>
> More on, assume that pixel size should be exactly 00:05:00 or
Oops, resolution should be 00:00:30 and not 00:05:00. Otherwise the
worldclim generic grids seem to have correct georeferencing info,
whereas the esri grids seem to have lost some precision.
> 0.008333333333333 and not 0.008333333767951 and that the number of
> rows and cols is correct.
>
> The assumed correct extends and resolution, preserving the grid
> dimensions (rows, cols) would be
> North: 90
> South -60
> East: 180
> West: -180
> res: 00:05:00
>
> I don't know where this information is stored in an Arc/Info Binary
> Grid, but this is easy to edit with a text editor in an ESRI hdr (GDAL
> EHdr diver) labelled grid created with gdal_translate. The adjusted
> EHdr raster should then import correctly without the -l switch. Maybe
> gdal_translate -a_ullr to "Assign/override the georeferenced bounds of
> the output file" can help too.
>
> HTH,
>
> Markus M
>
>
>> gdalinfo (gdal18)
>> Driver: AIG/Arc/Info Binary Grid
>> Files: prec_1
>> prec_1.ovr
>> prec_1.aux.xml
>> prec_1\dblbnd.adf
>> prec_1\hdr.adf
>> prec_1\log
>> prec_1\metadata.xml
>> prec_1\prj.adf
>> prec_1\sta.adf
>> prec_1\vat.adf
>> prec_1\w001001.adf
>> prec_1\w001001x.adf
>> Size is 43200, 18000
>> Coordinate System is:
>> GEOGCS["WGS 84",
>> DATUM["WGS_1984",
>> SPHEROID["WGS 84",6378137,298.257223563,
>> AUTHORITY["EPSG","7030"]],
>> TOWGS84[0,0,0,0,0,0,0],
>> AUTHORITY["EPSG","6326"]],
>> PRIMEM["Greenwich",0,
>> AUTHORITY["EPSG","8901"]],
>> UNIT["degree",0.0174532925199433,
>> AUTHORITY["EPSG","9108"]],
>> AUTHORITY["EPSG","4326"]]
>> Origin = (-180.000000000000000,90.000007823109627)
>> Pixel Size = (0.008333333767951,-0.008333333767951)
>> Corner Coordinates:
>> Upper Left (-180.0000000, 90.0000078) (180d 0' 0.00"W, 90d 0' 0.03"N)
>> Lower Left (-180.0000000, -60.0000000) (180d 0' 0.00"W, 60d 0' 0.00"S)
>> Upper Right ( 180.0000188, 90.0000078) (180d 0' 0.07"E, 90d 0' 0.03"N)
>> Lower Right ( 180.0000188, -60.0000000) (180d 0' 0.07"E, 60d 0' 0.00"S)
>> Center ( 0.0000094, 15.0000039) ( 0d 0' 0.03"E, 15d 0' 0.01"N)
>> Band 1 Block=256x4 Type=Int16, ColorInterp=Undefined
>> Description = prec_1
>> Min=0.000 Max=1003.000
>> Minimum=0.000, Maximum=1003.000, Mean=53.000, StdDev=77.000
>> NoData Value=-32768
>> Overviews: 21600x9000, 10800x4500, 5400x2250, 2700x1125, 1350x563, 675x282, 338x141
>> Metadata:
>> STATISTICS_MINIMUM=0
>> STATISTICS_MAXIMUM=1003
>> STATISTICS_MEAN=53,870989116945
>> STATISTICS_STDDEV=77,56242554647
>>
>> the grass-location is following
>>
>> g.region -p
>> projection: 3 (Längen- und Breitengrad)
>> zone: 0
>> datum: wgs84
>> ellipsoid: wgs84
>> north: 35N
>> south: 0
>> west: 0
>> east: 35E
>> nsres: 1
>> ewres: 1
>> rows: 35
>> cols: 35
>> cells: 1225
>>
>> if I want to import the esri binary grid with r.in.gdal, I get following message
>>
>> r.in.gdal -e input=C:\data\BIOCLIM\prec_201101_ersigrid\prec_30s_esri\prec\prec_1\hdr.adf output=prec1
>> Projection of input dataset and current location appear to match
>> G_set_window(): Ungültige geographische Breite für Norden.
>> G_set_window(): geographic latitude not valid for north.
>>
>> if I do r.in.gdal -l
>>
>> r.in.gdal -l --verbose input=C:\data\BIOCLIM\prec_201101_ersigrid\prec_30s_esri\prec\prec_1 output=prec1
>> Map bounds have been constrained to geographic coordinates. You will almost certainly want to check map
>> bounds and resolution with r.info and reset them with r.region before going any further.
>> Projection of input dataset and current location appear to match
>> Proceeding with import...
>> r.in.gdal komplett. Raster map <prec1> created.
>>
>> +----------------------------------------------------------------------------+
>> | Layer: prec1 at data Date: Sun Jan 30 18:45:35 2011 |
>> | Mapset: data Login of Creator: syringia |
>> | Location: wgs84llwc |
>> | DataBase: C:\gisdata\grassdata |
>> | Title: ( prec1 ) |
>> | Timestamp: none |
>> |----------------------------------------------------------------------------|
>> | |
>> | Type of Map: raster Number of Categories: 1003 |
>> | Data Type: CELL |
>> | Rows: 18000 |
>> | Columns: 43200 |
>> | Total Cells: 777600000 |
>> | Projection: Längen- und Breitengrad |
>> | N: 90N S: 60S Res: 0:00:30 |
>> | E: 179:59:59.932408W W: 180W Res: 0:00:00.000002 |
>> | Range of data: min = 0 max = 1003 |
>> | |
>> | Data Description: |
>> | generated by r.in.gdal |
>> | |
>> | Comments: |
>> | r.in.gdal -l input="C:\data\BIOCLIM\prec_201101_ersigrid\prec_30s_es\ |
>> | ri\prec\prec_1" output="prec1" |
>> | |
>> +----------------------------------------------------------------------------+
>>
>> what would be the best way to get this raster into a wgs84-ll-location?
>> maybe to crop the raster a little bit by gdaltranslate?
>> any hints?
>>
>> best regards
>> Helmut
>> ___________________________________________________________
>> Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
>> Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>
More information about the grass-user
mailing list