On Fri, Mar 1, 2013 at 11:34 PM, Seb <splu...@gmail.com> wrote: > On Fri, 1 Mar 2013 23:16:54 +0100, > Markus Metz <markus.metz.gisw...@gmail.com> wrote: > >> On Fri, Mar 1, 2013 at 11:06 PM, Sebastian P. Luque <splu...@gmail.com> >> wrote: >>> On Fri, 1 Mar 2013 22:42:56 +0100, >>> Markus Neteler <nete...@osgeo.org> wrote: > >>>> On Fri, Mar 1, 2013 at 9:53 PM, Seb <splu...@gmail.com> wrote: >>>>> Hi, > >>>>> I am trying to import a series of rasters (HDF) in a linear >>>>> projection, i.e. without any projection information, where x and y >>>>> are simple indexes; gdalinfo shows: > >>>> Could you say a bit more about the HDF files? The xy output is >>>> probably right but GCPs may be in the file itself (so gdalwarp is >>>> needed or the like). > >>> This file was produced with WIM/WAM (wimsoft.com), and the full >>> output of gdalinfo is: > >>> $ gdalinfo chl_48_200.hdf Driver: HDF4Image/HDF4 Dataset Files: >>> chl_48_200.hdf Size is 1572, 1114 Coordinate System is `' Metadata: >>> Base=10 Intercept=-2 Map Projection=WIM Linear Scaling=Logarithmic >>> Slope=0.015 WIM Color Range=0, 255 WIM Color Stretch=48, 200 WIM >>> Linear Coeffs=45, 0.012723, -40, -0.008977 Corner Coordinates: Upper >>> Left ( 0.0, 0.0) Lower Left ( 0.0, 1114.0) Upper Right ( 1572.0, 0.0) >>> Lower Right ( 1572.0, 1114.0) Center ( 786.0, 557.0) Band 1 >>> Block=1572x636 Type=Byte, ColorInterp=Gray > >>> The relevant information is in the "WIM Linear Coeffs" line, where >>> 45, -40 are the coordinates of the upper right corner of the map, and >>> 0.012723, -0.008977 are the lon, lat resolution. > >> It seems that you need to override the projection check with r.in.gdal >> -o. After that, you need to fix the raster metadata with r.region. > > If I do that I get: > > r.in.gdal -o input=chl_48_200.hdf output=chl_48_200 > Over-riding projection check > G_set_window(): Illegal latitude for North
Oops. I forgot, you also need the -l flag for r.in.gdal to force Lat/Lon maps to fit into geographic coordinates (90N,S; 180E,W). After that you need to run r.region, otherwise the raster is not usable. Markus M _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user