[Openstreetmap-dev] CSV transport encoding scheme

Douglas Fraser doug+osm at idmf.net
Tue Jan 24 22:46:32 GMT 2006


> I agree, that it is not too clever to have a variable amount of
> entries in a CSV-line, regardless at which position in the line this
> list is.
>
> CSV is made for static data structures where the meaning and number of
> elements per line is the same for the whole document. My scheme
> sacrifice this big advantage (in performance and simplicity). So does
> yours.
>
> OSM has different data structures and I don't see a simple way to
> transfer them in a static length list together without much hassle.

Why not just produce two (or more) delimited files packaged up with
version/generator file in a zip file or some other sort of archive.

The delimited file format would be based on the database schema
(http://www.openstreetmap.org/trac/browser/sql/mysql-schema.sql)
so you'd have a 'nodes' file which would be formated like

id,latitude,longitude,timestamp,(etc..if you wanted to include more info)

and 'segments' would just be

id,node_a,node_b,timestamp,(etc..)

I hesitate to suggest this, but you'd also probably want something like

'nodes_tags'
id,tag,value

and

'segments_tags'
id,tag,value


These could then be loaded into any database or spreadsheet for further
processing.

Cheers,

Dougie







More information about the dev mailing list