[Openstreetmap] Re: [Openstreetmap-dev] OSM's Schema - moving it forwards.
Tommy Persson
tpe at ida.liu.se
Wed Nov 30 23:25:10 GMT 2005
> From: David Cantrell <david at cantrell.org.uk>
> > Even if the data is flat it is better to have it in a format where you
> > from a data file can see what the fields are called.
> > <wpt lat="58" lon="15"/>
>
> What's a "wpt"? Which directions are positive, which are negative?
> Knowing what the fields are called is nowhere near as helpful as you
> seem to think!
This statement seems to be based on a strange assumption that you see
the data without any context and knowledge about what the data file is
supposed to contain. During the years I have found this information
very useful when writing programs that handles data. One reason for
this is that the documentation for the format is not always available
but you know what information a file should contain. I have also
written scripts to handle CSV data and that always has lead to more
trouble and problems.
>
> > is muck better than
> > 58,16
>
> Well, aside from needing a large complicated library to parse it, and
> using 20+ characters where five would do the job.
And what is the problem with using well written and tested libraries?
The code to parse it using the library is usually pretty trivial.
> But an awful lot of CSV libraries *can*. In fact I imagine most do,
> it's just shitty hand-rolled CSV parsers written by fourteen year old
> Linux weenies that don't.
Yes, and since people think the format is trivial they do buggy
implementation that does not handle more complicated cases. Instead
of using a debugged and tested library.
> Now compare to the bug-ridden crapware that
> is XML parsers.
Where do you find these buggy XML-parsers? I have not used them and
the name of them could be good to know so I can avoid them.
> By the way, I consider "being hard to use", "having to read the manual"
> and "taking too much memory" to be serious bugs in something as simple
> as reading a file of data.
And to parse CSV data you usually have to read the manual. I consider
it to be a bug if data file are not resistent to extensions of the
format. How do you add new fields ina CSV format without breaking old
files?
>
> > Yes, things can be overused. But before XML or SGML the situation was
> > much worse with respect to different format and exhange of data.
>
> Simply not true. Nowadays, you need both a huge XML parser and a ton of
> logic to *understand* the data and un-mangle it from a tree into a
> useful structure. Previously you had a small problem-specific parser and
> *perhaps* a small chunk of code to transmogrify the data into something
> convenient for your program.
I talked about exchange of data. That is a different problem.
/Tommy
More information about the talk
mailing list