[OSM-talk] Re: [OSM-dev] openlayers alpha

Nick Whitelegg nick at hogweed.org
Mon Aug 28 10:46:52 BST 2006


On Monday 28 Aug 2006 10:37, Andrew Loughhead wrote:
> Joerg Ostertag (OSM Munich/Germany) wrote:
> >> Could we short-circuit the GML? If I have the time (there's freemap
> >> stuff I need to do for the SoC conference; however it's more likely I
> >> can do somethig with it after that) I can have a go at doing something
> >> which goes straight from planet to shapefiles. However I would need to
> >> research shapefiles first so it wouldn't be a one-day job.
> >
> > If I understand you correct; the task is to write a
> >    planet.osm--> Shapefile converter?
> > Is there anywhere a short good description for shapefiles you can point
> > me to?
>
> Joerg, I replied to Nick W off list with some of this information too:
> shapelib makes shapefile IO from C pretty easy.  See
> http://shapelib.maptools.org/.  I think OGR (http://www.gdal.org/ogr/)
> includes a (possibly modified) shapelib.
>
> If you really must write your own shapefile code, 

(this is really dev)

I don't think there's any need for that if we have a library which deals with 
shapefiles already. However (in reply to Chris) it does in my view seem 
advantageous to short circuit the GML - even if this isn't the bottleneck in 
the current process - simply to minimise the number of steps and allow more 
flexibility. If shapefiles are a standard format it would make sense to 
develop tools with the existing libraries which convert straight from .osm to 
shapefiles.

If I do this task I would probably use C or C++ (for speed reasons) anyhow, so 
the shapelib approach sounds good.

Nick




More information about the dev mailing list