[GRASSLIST:1836] Re: border lines

Markus Neteler neteler at geog.uni-hannover.de
Fri May 11 11:46:39 EDT 2001


On Fri, May 11, 2001 at 04:24:58PM +0200, Dieter Lehmann wrote:
> Hi,
> thanks Andrea, sometimes the simplest solution is the best...
> 
> Another question:
> 
> I don't find a way to extract only the borderlines from rasterized polygons.
> I need this borders in a new raster map (for expample the borders between two
> different soil types).
> 
> I found the script r.edge.dig. It's not exact what I need because this
> extract only between two given categories and not between all
> values in a given raster map.
> 
> Another attemp was to use r.poly, but I don't find the way to make lines from
> the areas (the other way round there is a script available). After that I would
> use v.to.rast
> 
> Thanks a lot.
> Dieter 
Hi Dieter,

(funny, I am just proof-reading this in the ongoing translation of the
 GRASS-Handbook)

an unelegant way might be to use r.poly and convert the resulting vector map
to ASCII vector (v.out.ascii). Then edit the file in $LOCATION/dig_ascii,
changing all "A  " to "L  " (take care to search for Aspacespace).
Then get it in with v.in.ascii, v.support and you are there. Unfortunately
all labels are lost (the v.llabel will enumberate them).

It would be great to have r.poly to generate lines with a flag or something
else doing this.

Hope this helps,

 Markus



> On 11-May-01 Andrea Aime wrote:
> > Grass raster approach is to store on category for each
> > raster map: if you want two attributes you'll use two raster
> > maps. If they refer to the same phenomena, you may use a
> > map name convention, such as a common prefix:
> > 
> > r.mapcalc test = if(raster_a1 == 1 and raster_a2 == 3, 1, 0)
> > 
> > Hope this helps
> > Andrea Aime
> > 
> > Dieter Lehmann wrote:
> >> 
> >> Hi,
> >> is it possible to refer to different
> >> categorie-values in a single raster-map? (maybe stored in
> >> a database with the database-interface) I want to do a
> >> mapcalc expression somehow like:
> >> 
> >> r.mapcalc test = 'if(raster==1 and raster$tabelinfo2 == 3,1,0)'
> >> 
> >> Thanks,
> >> Dieter
> >> 
> >> ----------------------------------
> >> Dieter Lehmann
> >> University of applied Sciences
> >> Schelmenwasen 4-8
> >> D-72622 Nuertingen, Germany
> >> lehmann at fh-nuertingen.de
> >> Phone: +49 (0) 7022 404 Ext. 207
> >> Fax: +49 (0) 7022 404 Ext. 209
> >> 
> >> Date: 11-May-01
> >> Time: 13:57:20
> >> 
> >> ----------------------------------
> 
> ----------------------------------
> Dieter Lehmann
> University of applied Sciences
> Schelmenwasen 4-8
> D-72622 Nuertingen, Germany
> lehmann at fh-nuertingen.de
> Phone: +49 (0) 7022 404 Ext. 207
> Fax: +49 (0) 7022 404 Ext. 209
> 
> Date: 11-May-01
> Time: 16:03:23
> 
> ----------------------------------
> 

-- 
Markus Neteler *  University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494  Fax: -3984




More information about the grass-user mailing list