[GRASS-user] Converting raster to polygon creates too many polygons

Markus Metz markus.metz.giswork at googlemail.com
Wed Sep 29 09:48:00 EDT 2010

Hanlie Pretorius wrote:
> I don't really know why the
> resolution in the x and y directions are not the same. Even when I set
> them explicitly, I get a slight difference:

The -a flag is missing, see my previous post.
> -----
> g.region -p vect=c83a_border at PERMANENT nsres=25 ewres=25
> projection: 99 (Transverse Mercator)
> zone:       0
> datum:      ** unknown (default: WGS84) **
> ellipsoid:  wgs84
> north:      -3122229.69982072
> south:      -3155672.30728643
> west:       -66483.27873573
> east:       -33474.90929218
> nsres:      24.99447494
> ewres:      25.00634049
> rows:       1338
> cols:       1320
> cells:      1766160
> -----
> The original resolution of the DEM was at 25m resolution. I just
> assumend that the differences in x and y resolutions are a result of
> the projected surface being skew with respect to the cartesian axes. I
> say this because vectors that looked square in a latlong GCS display
> slightly skewed when projected to the Transverse Mercator PCS that I
> use in this location.

Ah, ok, set the computational region in the target location with
Transverse Mercator PCS and align with g.region -a to the desired
resolution, then reproject, then run r.watershed and r.to.vect.

> My reason for running r.watershed at a much finer resolution was that
> I would get a smoother boundary when I then convert to vector.
> Obviously not a good idea.
Someone still has to fix v.generalize for smoothing boundaries...

Markus M

More information about the grass-user mailing list