[GRASS5] Re: [GRASSLIST:1775] r.in.bin
Bob Covill
bcovill at tekmap.ns.ca
Fri Apr 27 16:08:41 EDT 2001
Glynn Clements wrote:
>
> Yan Fitterer wrote:
>
> > First, congratulations for a briliant program.
> >
> > My problem (is it a bug?):
> > I'm getting a gtopo30 file from:
> > http://edcdaac.usgs.gov/gtopo30/w020n90.html
> >
> > The I try to import the .DEM file into Grass with r.in.bin
> >
> > I get all OK (byte swap, signed integer, etc...) except that at a level of
> > about 110 (going up a hill for ex.), the z (altitude) values suddently go to
> > -120, and then increase in line with the terrain.
> >
> > Has anybody seen that behaviour?
> >
> > I'm running 5.0 beta 11 on Linux RH 7.0 (2.2.16 kernel)
>
Hello,
I finaly got around to downloading and importing the DEM from the above
link. I have been able to import the data successfully into both a Lat
Long and XY database using the following command:
r.in.bin input=W020N90.DEM output=W020N90.DEM north=90 south=40 east=20
west=-20 r=6000 c=4800 anull=-9999 bytes=2
I imported it on both a SUN and Linux with byteswapping set accordingly.
The minmax reported from r.describe is the correct -30 to 4536. You may
have been getting incorrect results with the -s flag which I believe was
intended for data with a range of -127 to 127. I have never actually
seen any data that requires this flag??
I imported it with the changes made to r.in.bin as discovered by Jan
earlier.
These changes are from line 211 in main.c
..
if (! G_scan_easting (parm.east->answer, &cellhd.east,
cellhd.proj)) return 1;
if (! G_scan_easting (parm.west->answer, &cellhd.west,
cellhd.proj)) return 1;
insert >>> if (sscanf(parm.rows->answer,"%d%1s",&cellhd.rows,
dummy) != 1) return 1;
insert>>> if (sscanf(parm.cols->answer,"%d%1s",&cellhd.cols,
dummy) != 1) return 1;
}
if (no_dim == 0 && no_coord == 1) { /* Get rows and cols only */
if (sscanf(parm.rows->answer,"%d%1s",&cellhd.rows, dummy) != 1
|| cellhd.rows <= 0) return 1;
..
Hopefully this helps.
--
Bob Covill
Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada
E-Mail: bcovill at tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list