[GRASS-user] incorrect boundaries fixed by v.out + v.in ?

Hendrik Hoeth hoeth at linta.de
Sat Jul 16 14:41:21 EDT 2011


Hi,

I have some trouble with incorrect boundaries. Strangely enough I can
fix them by writing the vector map to a file and reading it back in. I'm
usig grass-6.5 from the develbranch_6 branch, revision 47134.

Here is a minimal example:

## rdebug is a small raster map
wget http://www.linta.de/~hoeth/grass/rdebug.bz2
bunzip2 rdebug.bz2
r.in.ascii in=rdebug out=rdebug
r.contour rdebug out=vdebug levels=160
v.type vdebug out=vdebug_boundary
v.clean vdebug_boundary out=vdebug_boundary_clean tool=prune,break,rmdangle thresh=1,0,0,-1 
v.centroids vdebug_boundary_clean out=vdebug_centroids
## Note that one of the two areas is broken
v.out.ascii vdebug_boundary_clean out=vdebug_boundary_clean format=standard
v.in.ascii vdebug_boundary_clean out=vdebug_boundary_clean2 format=standard
v.centroids vdebug_boundary_clean2 out=vdebug_centroids --o
## Now both areas get their centroid.

My region settings for this example are

projection: 99 (Mercator)
zone:       0
datum:      towgs84=0,0,0,0,0,0,0
ellipsoid:  a=6378137 es=0
north:      6850290
south:      6847260
west:       1561850
east:       1564380
nsres:      10
ewres:      10
rows:       303
cols:       253
cells:      76659

Any idea what's going on here or what I'm doing wrong?

Cheers,

   Hendrik



More information about the grass-user mailing list