[Gdal-dev] downsampling shapefiles ?

Schuyler Erle schuyler at nocat.net
Sat Sep 10 12:08:17 EDT 2005


* On  9-Sep-2005 at  7:19PM PDT, Frank Warmerdam said:
> On 9/9/05, Christian G. Tveen <cgt at navicon.dk> wrote:
> > 
> > I have a number of very fine grained shape files. Is it possible to have
> > gdal in some way downsample these files to be more usable for overview
> > purposes ?
> 
> I do think a "textbook" geometry simplification algorithm would be an
> asset to GEOS, and I would be willing to expose it in some fashion
> through ogr if it were available. 

I've been thinking about this myself -- I implemented Douglas-Peucker
simplification in OGR + Python, and it was pretty slow.

I note that ogr2ogr could act as a command-line "filter" for vector
layers. Frank, how do you feel about the idea of having a plugin
architecture for ogr2ogr, so that a user could (say) specify a -plugin
option on the command line that dynamically loads an .so file at run
time. The plugin library would have hooks to parse command-line
options, and to take an OGR geometry from the input layer and have the
opportunity to return a different OGR geometry to be written to the
output layer? Line simplification is one possible use for this; vector
warping is another (which may not be that common of an operation, but
it is one I've had to contend with in the not-too-distant past)... I'm
sure we can collectively think of others.

SDE



More information about the Gdal-dev mailing list