[OSM-dev] OT: OGR, Douglas-Peucker

Lars Aronsson lars at aronsson.se
Sat Feb 25 10:37:43 GMT 2006


Sorry if this is off topic to the immediate development tasks for 
OpenStreetMap.  I figured the people on this list might be able to 
answer these questions.

I just bought "Web Mapping Illustrated" (O'Reilly, 2005) and 
learned about OGR, a C++/Python library for vector map data,
http://www.gdal.org/ogr/

It seems that OGR doesn't support the GPX format.  Are there any 
known plans to implement this, or how do developers usually deal 
with this?  I.e. which is the favorite intermediate format?

OGR implements line strings, but apparently not b-splines.  Is 
this good or bad?  Doesn't anybody in GIS use splines?

In 1973 Douglas and Peucker published an algorithm for line 
simplification, i.e. removing nodes from a sequence of line 
segments while staying within a specified margin of error.  This 
is one fun thing that can be done with vector data. Google turns 
up a few open source implementations of Douglas-Peucker, some 
using OGR, others not.  But none seems to be part of a standard 
open source library.  OGR contains a function for computing the 
shortest distance between two geometries (a point and a line, or 
two polygons), but it doesn't contain a Douglas-Peucker 
implementation.  Is this a reasonable limitation for a vector data 
function library, or are there better examples of more 
comprehensive libraries that I should look at?


-- 
  Lars Aronsson (lars at aronsson.se)
  Aronsson Datateknik - http://aronsson.se




More information about the dev mailing list