[OSM-dev] Inserting OSM data

Maarten Deen mdeen at xs4all.nl
Mon Mar 22 15:01:17 GMT 2010


On Mon, 22 Mar 2010 15:40:03 +0100, Andreas Höschler
<ahoesch at smartsoft.de> wrote:
> Hi Tom,
> 
>>> However, we want to pass our track data to the OSM project and are
>>> looking for a neat way to do that. We can convert our data to any
>>> format (some kind of CSV or XML preferred). We just need a TCP
>>> interface to post them to or a destination email address where to send
>>> the files to. Simply uploading the tracks to some server is no good
>>> solution. When a user creates a track in our database it gets a 
>>> primary
>>> key but of course can't be assigned an official OSM ID yet. So the
>>> upload process would need to be as follows:
>>
>> Can you clarify whether you're talking about uploading this as GPS 
>> trace data (what we would normally recommend for raw GPS data) or as 
>> actual OSM map data?
> 
> OSM!! The data is already rich enough to contain street names, way kind 
> and some other attributes for forrest tracks (e.g. never use when it's 
> raining).
> 
>>> Iterate through al newly created tracks
>>>    - send a track with nodes to the OSM server and receive IDs for the
>>> way and the nodes
>>>    - assign these IDs to our private database objects and thus marking
>>> them sent and no longer new
>>>
>>> For that we need some kind of TCP-based XML interface so that we could
>>> send a track in some XML format to a TCP socket and get back the IDs
>>> assigned to objects by the public OSM database server. Only that would
>>> allow us the assign the returned IDs to our private database objects
>>> and thus avoid data duplication. Is there such an API (TCP-socket
>>> based)?
>>
>> There are APIs for both, but not necessarily exactly what you want (in 
>> particular for GPS trace data).
> 
> The ideal solution for use would be to send a WAY segment in OSM format 
> to some service and receive a response with the IDs for the created way 
> and the created nodes! But I understand this is not supported due to 
> the obvious merging problem (avoid duplicates)!?

Not so much "not supported", bot more "not the way to do it".

But it is exactly how the API works [1]: you upload an .osm document and
as a return you get an .osm document with the changed data.
The problem is, as you correctly understand, that doing this unattended in
an area that is already populated with data will generate duplicate data
and very likely new ways that are not connected to the existing ways.

That's why it has to be done by a human operator.

[1]
http://wiki.openstreetmap.org/wiki/API_v0.6#Update:_PUT_.2Fapi.2F0.6.2Fchangeset.2F.23id

> Still what is the best option for us?

IMHO: make a projectpage, supply the data and work with the community on
correcly merging the data into OSM.

Regards,
Maarten




More information about the dev mailing list