[GRASS-user] BIN raster import

Hamish hamish_b at yahoo.com
Wed Sep 3 19:59:08 EDT 2008


Richard wrote:
> It would be nice if r.in.bin offered a "create new location" option. 
> That way, the import could work byte-by-byte without worrying about 
> bounds, and the user could georectify the imported raster
> to their target location after import.

wouldn't work, except if you sent the thing to a simple XY location.
GRASS needs to know the map projection information before it can create
a new location.

Binary files are just a long string of numbers. Without knowing the number
of rows and columns it could be either wide and short or narrow and tall.
There's no way for the module to pick that up otherwise. (unless like the
old GMT format (r.in.bin -h) there is some header info in the file)

If you know the rows and cols but are a bit fuzzy on what the bounds
should be I would recommend importing it into the target location with
south and west coords at 0 and north and east coords at number of rows
and cols. Then you can run r.region (with a 'r.') at your leisure until
r.info shows that the map resolution and bounds are ok.
At least then you can see something on the screen and know that the
other choices (byte swap, bytes per cell) are correct.

note that GRASS considers the region bound coordinate to be at the
outer edge of the border cells.


Hamish



      



More information about the grass-user mailing list