[R-sig-Geo] downsampling a lines shapefile?

Roger Bivand Roger.Bivand at nhh.no
Wed Oct 26 10:54:23 CEST 2011


On Wed, 26 Oct 2011, Hadley Wickham wrote:

>>> I have a shapefile with a number of line features.  I can load it and plot
>>> it.  Is there an easy way to downsample or smooth the shapefile to a coarser
>>> resolution?
>>
>> ?gSimplify in rgeos?
>
> Is there a reason that gSimplify doesn't default to a topology
> preserving simplification?

Hi Hadley,

GEOS is neutral, and the GEOS nomenclature is misleading IMO. Because the 
process treats each ring (polygons) separately, all that is preserved are 
the nodes where three rings touch, but not the boundaries between two 
polygons, which may generate empty slivers, or overlap. I would have taken 
the term to imply that if input rings shared all boundary points between 
nodes, then they would be simplified identically, but this is not the 
case. To get this (desirable) behaviour, you need a topological vector 
GIS, like GRASS. Since I feel that the GEOS name is misleading, the 
default is FALSE, but I'm open to better ideas.

Roger

>
> Hadley
>
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no


More information about the R-sig-Geo mailing list