[GRASS-dev] [GRASS GIS] #3001: r.in.xyz -s scan mode: one row/col lost?
GRASS GIS
trac at osgeo.org
Mon Apr 25 16:05:53 PDT 2016
#3001: r.in.xyz -s scan mode: one row/col lost?
----------------------+-------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Raster | Version: svn-trunk
Keywords: r.in.xyz | CPU: All
Platform: Linux |
----------------------+-------------------------
While preparing an example how to import X,Y,Z ASCII DEMs which look like
this:
{{{
630007.5 228492.5 141.99614
630022.5 228492.5 141.37904
630037.5 228492.5 142.29822
630052.5 228492.5 143.97987
...
}}}
for the page
https://grass.osgeo.org/grass70/manuals/r.in.xyz.html#import-of-x,y
,string-data
I came across the issue that one row/col seems to be lost in the scan mode
of r.in.xyz. If true this may have some relevance for Lidar processing,
too.
Test case:
{{{
#### GRASS 7.0.4svn (nc_spm_08_grass7):~ >
# export as X,Y,Z ASCII
g.region raster=elevation -p
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: nad83
ellipsoid: a=6378137 es=0.006694380022900787
north: 228500
south: 215000
west: 630000
east: 645000
nsres: 10
ewres: 10
rows: 1350
cols: 1500
cells: 2025000
# export (cell centers)
r.stats -1g elevation > elevation.xyz
head -n 4 elevation.xyz
630005 228495 141.99614
630015 228495 141.27849
630025 228495 141.37904
630035 228495 142.29822
wc -l elevation.xyz
2025000 elevation.xyz
# ... looks ok.
#### import
# scan extent from xyz input
r.in.xyz input=elevation.xyz separator=space -s output=dummy -g
n=228495 s=215005 e=644995 w=630005 b=55.578793 t=156.32986
# set region
g.region n=228495 s=215005 e=644995 w=630005 -p
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: nad83
ellipsoid: a=6378137 es=0.006694380022900787
north: 228495
south: 215005
west: 630005
east: 644995
nsres: 10
ewres: 10
rows: 1349
cols: 1499
cells: 2022151
## -->> one col and one row lost?!
r.in.xyz input=elevation.xyz separator=space method=mean output=myelev
...
r.in.xyz complete. 2022151 points found in region.
## -->> incomplete
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3001>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list