Hi Nick!

As an FYI, I've noticed some strange behavior when using the OSM plugin.  It
has problems with nodes that are single entities, such as : <node id="1"
lat="30.0" lon="-98.0" />

It only works correctly when all the nodes are presented as such (notice
separate opening and closing entities):
<node id="1" lat="30.0" lon="-98.0">
</node>

Delving into the code for that module, it's because in osmparser.cpp nodes
only get added (as cur_item) when an ending element is encountered (via
osmparser::endElement).  Therefore, a string of single-entity nodes will all
be ignored.

I'm using the OSM plugin to render data that I don't keep in a database.
It's easy to convert it from my own format into the OSM format, so I've been
doing that.  It's very handy for that.

BTW, I'm submitting this to the list instead of opening a ticket in Mapnik's
trac system because I'm not sure of your group's do's and don'ts surrounding
ticket creation.  I'll be happy to create a ticket and provide better sample
data if that's appropriate.

Thanks!
Jay Farrimond
www.sabikerides.com

-----------------------------------------------------
Message: 1
Date: Wed, 2 Dec 2009 18:45:29 +0000 (GMT)
From: Nick Whitelegg <[email protected]>
Subject: Re: [Mapnik-devel] Osm input plugin
To: Vladislav Shikhov <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

Hi,

As far as I'm aware it should work - I developed it originally though
haven't looked at it for a while. I'll try and get round to writing some
documentation for it in the next week or two - other things (work and
otherwise) keep coming up!

The Map error looks like a general Mapnik issue, not an issue with the osm
plugin.

I don't have any python code but there should be some sample C++ code with
the plugin.

Nick
_______________________________________________
Mapnik-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-devel

Reply via email to