[OSM-dev] DBF files (shapefile) and OSM tags
nick150971 at yahoo.co.uk
Mon Jan 1 13:41:19 GMT 2007
----- Original Message ----
From: Kristian Thy <thy at 42.dk>
To: dev at openstreetmap.org
Sent: Monday, 1 January, 2007 1:18:52 AM
Subject: Re: [OSM-dev] DBF files (shapefile) and OSM tags
On Sat, Dec 30, Nick Whitelegg wrote:
>>> The columns in a shapefile's attributes have a fixed width, and that
>>> width is reserved for each shape. So the space usage will be
>>> approximately equal between using a single, concatenated column and
>>> multiple columns.
>>> What did you intend to gain by concatenating the columns?
>> What I was wondering about in particular was how to make the shapefile DBF file
>> fit in with OSM's data format (where there is technically a limitless number of
>> valid tags). Having one attribute column per OSM tag would presumably mean that
>> any shapefile generating application would only be able to use a particular
>> subset of tags.
>Couldn't you just add all used tags as columns?
Yes, that would probably work quite well - thanks.
> As far as I can tell,
>OGR allows adding fields on the fly (and if you're not using OGR, why?).
The need to parse the osm data in the first place means that I need to write custom code anyhow - so the most painless way of generating shapefiles seems to be to write a custom app using shapelib.
Send instant messages to your online friends http://uk.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev