[OSM-dev] extract_polygon_0.5.pl bugs
Frederik Ramm
frederik at remote.org
Tue Oct 9 00:45:30 BST 2007
Hi,
> 1. The "sort" option ("-s") isn't recognized and doesn't combine the
> three output files into a single one
True. The comment "# fixme sort" somehow doesn't do the job ;)
> 2. Show stopper: Does NOT recognize OSM tags (i.e. '<tag ...>') and XML
> closing tags (i.e. '</...>') => produces useless, invalid XML (that's
> how I found out)!
I think you're being a bit too harsh with the script. It does not
contain explicit regular expressions for the tags you mention but it
doesn't need them. When it encounters, say, an opening <way> tag, it
starts buffering the raw lines, and if, before reaching another <way>,
a <nd ref=...> is found that makes it want to include this way in the
output, then the buffer is simply written out, and any further lines
are also written, until the next opening <way> is reached. This
includes any <tag> elements and the closing </way>, without having to
explicitly parse them.
There may be a bug in the script but the bug surely isn't that the
programmer was too stupid to think about closing tags ;-) can you give
more details about the problem?
> Will try planetosm-excerpt-area.pl now.
I think that one hasn't been made 0.5 compliant but you can of course
do that if you prefer. I had originally thought that the polygon
script could supersede that one.
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00.09' E008°23.33'
More information about the dev
mailing list