Re: [OSM-dev] Inserting OSM data

2010-04-06 Thread Andreas Höschler
Hi all,

 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)!?

 With the API, you can upload new nodes/ways/relations, fetch the 
 existing ones, and update the existing ones (uploading a changeset).

 The problem is that you might upload a new way that overlaps an 
 existing OSM way. Either you upload it and merge with OSM tools, or 
 you download the OSM data in the neighborhood, check if it overlaps, 
 and update your data with the already-existing OSM data, etc etc.

We are now about to implement the our system -- public OSM server 
filter and as a first measure would like to simply upload GPS traces 
generated by our employees. We have the trackpoints in our database. We 
can easily generate a gpx file from that

?xml version=1.0 encoding=UTF-8?
gpx version=1.0 creator=OpenStreetMap.org 
xmlns=http://www.topografix.com/GPX/1/0/;
   trk
 trkseg
   trkpt lat=53.28473 lon=10.382721/
   trkpt lat=53.284677 lon=10.383027/
   trkpt lat=53.284665 lon=10.383144/
   trkpt lat=53.284638 lon=10.383407/
...
 /trkseg
   /trk
/gpx

and now are looking for a way to programmatically upload that to the 
OSM server for the community to review the data and conversion into 
actual ways and nodes. We plan to use a system() call from our 
application and execute the following command

curl -v -v -d @tracks.gpx -H X_HTTP_METHOD_OVERRIDE: POST 
http://api.openstreetmap.org/api/0.6/gpx/create;

but I assume that the above command is not entirely correct!? I 
especially not understand the It expects the following POST parameters 
in a multipart/form-data HTTP message: part on 
http://wiki.openstreetmap.org/wiki/API_v0.6. How has the above command 
line to be modified to work?

In a later step we want to add functionality to our system that allows 
our users to directly create nodes and ways on the public OSM server 
but this requires a bunch of problems to be solved first. FOr now we 
would like to stick to uploading traces. How can this best be done from 
a unix application?

Thanks a lot,

  Andreas




___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread jamesmikedup...@googlemail.com
What we did for a similar project in kosovo[1] is to create a set of files
on archive.org split by 10k gps points, they are being traced over by
volunteers.
we processed the csv data into osm files wih perl.

If you need help setting that up, please let me know.
retrospectivly it is better to create gpx files instead of osm files.

mfg,
mike
[1] http://wiki.openstreetmap.org/wiki/Kosovo_LogisticsPlus_Tracing

2010/3/22 Andreas Höschler ahoe...@smartsoft.de

 Hi all,

 we are collecting huge amounts of GPS-tracks with a fleet of vehicles
 with on-board computers. These tracks are used internally for a bunch
 of purposes (vehicle monitoring, etc ). We have to maintain our own
 database of tracks, add properties like a so a called pickupCondition,
 which determines how good a track is (e.g. paved, muddy, never use it
 when it's raining,...). We would like to insert this collected data
 into the OSM database and am looking for the best way to do that. We
 have the data in our ERP system. Users are supposed to review the
 collected tracks, add properties (pickupCondition). What we plan to do
 is to use the public OSM data, add the self-collected tracks and use
 the resulting dataset to generate map, calculate routes, etc. We need
 to do it that way, because

 • our users cannot use the official OSM editor for several reasons (to
 complicated, no direct access to our tracks,...)
 • the grab OSM data from public server and compile the data for our
 mapserver, routeserver,...-cycle is too long. It would take 1-2 weeks
 until entered data would show up in our ERP.

 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:

 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)?

 What's our best option?

 Thanks a lot,

  Andreas




 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread John Smith
2010/3/22 jamesmikedup...@googlemail.com jamesmikedup...@googlemail.com:
 retrospectivly it is better to create gpx files instead of osm files.

Except that would loose potentially valuable information already in
his database.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Tom Hughes
On 22/03/10 13:04, Andreas Höschler wrote:

 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?

 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).

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Iván Sánchez Ortega
El 22/03/2010 14:04, Andreas Höschler escribió:
 we are collecting huge amounts of GPS-tracks with a fleet of vehicles
 with on-board computers. [...] We have to maintain our own
 database of tracks, add properties like a so a called pickupCondition,
 which determines how good a track is (e.g. paved, muddy, never use it
 when it's raining,...).

Do you store all the tracks, or do you conflate them into road axis?

I mean: if a truck has gone through a road twelve times, do you store 
twelve lines or just one? Is there a way to get just one line per road?


 • our users cannot use the official OSM editor for several reasons (to
 complicated, no direct access to our tracks,...)

Depending on your Java expertise, you could program some JOSM plugin. 
Just an idea, though.

 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)?

Looky here: http://wiki.openstreetmap.org/wiki/API_v0.6

Whenever you (successfully) upload a new way, you get the way ID in 
return. No problem there.

-- 
Iván Sánchez Ortega i...@sanchezortega.es

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread John Smith
2010/3/22 Iván Sánchez Ortega i...@sanchezortega.es:
 Whenever you (successfully) upload a new way, you get the way ID in
 return. No problem there.

What about existing ways that may be duplicated by doing that?

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Iván Sánchez Ortega
El 22/03/2010 15:04, John Smith escribió:
 2010/3/22 Iván Sánchez Ortegai...@sanchezortega.es:
 Whenever you (successfully) upload a new way, you get the way ID in
 return. No problem there.

 What about existing ways that may be duplicated by doing that?

Andreas talked about inserting data into OSM, not updating data in OSM. 
Yes, that's a completely different problem :-)

-- 
Iván Sánchez Ortega i...@sanchezortega.es

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Andreas Höschler
Hi John,

 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)?

 It's not that simple, because you may need to deal with merging,
 alternatively you could produce .osm files similar to what JOSM
 produces and then people can load those files into JOSM and merge or
 add data to OSM.

Creating OSM files would be easy for us. But where would we sent them? 
Simply put them on our webserver and make an announcement on the osm 
list hey, we have some osm data to be merged/imported! Have fun!!?

The other problem is how do we get to know that one of our ways got 
imported into the public OSM database and thus assigned an ID so that 
we can get rid of that way in our private database?

I have just logged into www.openstreetmap.org and found the GPS traces 
pane and the page on which one can upload gps traces. However, where 
can I upload OSM files to with ways having street names, way kind, ...?

Thanks,

  Andreas





___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Stefano Salvador
 Creating OSM files would be easy for us. But where would we sent them?
 Simply put them on our webserver and make an announcement on the osm
 list hey, we have some osm data to be merged/imported! Have fun!!?

In my small part of world I do exactly so, local mailing list is our
interface for such imports.

A better and standard way would be very welcome. At least it should be
possible to mark an OSM file as not uploadable or only for
reference/copying.

Bye,

Stefano

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Tom Hughes
On 22/03/10 14:19, Andreas Höschler wrote:

 I have just logged into www.openstreetmap.org and found the GPS traces
 pane and the page on which one can upload gps traces. However, where
 can I upload OSM files to with ways having street names, way kind, ...?

There isn't one, because just uploading street data like that in bulk 
doesn't really make any sense. You need to start by fetching the 
existing data for any area and then update it by adding in any new roads 
you have (making sure they properly connect to existing roads) and/or 
improving tagging of existing roads.

There is an API which somebody has already given you a pointer to, but 
it's not really something that can be fully automated - it really needs 
human intervention to deal with the inevitable conflicts between the 
data you are adding and the data which already exists.

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Peter Körner
 Creating OSM files would be easy for us. But where would we sent them? 
 Simply put them on our webserver and make an announcement on the osm 
 list hey, we have some osm data to be merged/imported! Have fun!!?

There are apis to upload them, but you are not encouraged to upload 
massive amounts of data without human review.

So yes, for now putting GPX- and/or OSM-Extracts on some webserver would 
be a really good starting point. If everything is fine and we don't 
expect duplications of existing data, you may upload directly to the api.

There are again several things to consider, like
  - grouping multiple changes spatially to avoid big changeset
  - provide a informative changeset comment
  - provide a contact in case of emergency
  - send an appropriate user-agent

Peter

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Andreas Höschler
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)!?

Still what is the best option for us?

Regards,

  Andreas


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Richard Fairhurst
Andreas Höschler wrote:
 Creating OSM files would be easy for us. But where would we sent  
 them? Simply put them on our webserver and make an announcement on  
 the osm list hey, we have some osm data to be merged/
 imported! Have fun!!?

Just that.

It's worth noting that Potlatch 2, the next version of OSM's online  
editor, is designed to help people do exactly that - in fact I  
finished writing most of the code to do it on Friday. :)

cheers
Richard


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Andreas Höschler
Hi,

 we are collecting huge amounts of GPS-tracks with a fleet of vehicles
 with on-board computers. [...] We have to maintain our own
 database of tracks, add properties like a so a called pickupCondition,
 which determines how good a track is (e.g. paved, muddy, never use it
 when it's raining,...).

 Do you store all the tracks, or do you conflate them into road axis?

 I mean: if a truck has gone through a road twelve times, do you store
 twelve lines or just one? Is there a way to get just one line per road?

Yes! The user importing the track data in our system is responsible for 
selecting only those records that make up a way. If this is not 
convenient he can leave the track in the background and not at all use 
the data directly but create the way manually in a click, click, 
click,... manner. We can also provide functonlity in out app to first 
specifiy an existing (start) node and then do the click, click, click 
... thing so that the newly created way has a defined binding to the 
existing street data. Thus the data we are producing is already of high 
value (could directly be inserted into the public OSM database).

 • our users cannot use the official OSM editor for several reasons (to
 complicated, no direct access to our tracks,...)

 Depending on your Java expertise, you could program some JOSM plugin.
 Just an idea, though.

None Java expertise. Unfortunately! We are doing everything in 
Objective-C! :-)


 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)?

 Looky here: http://wiki.openstreetmap.org/wiki/API_v0.6

 Whenever you (successfully) upload a new way, you get the way ID in
 return. No problem there.

Wow, I believe that's whatI was looking for!! Scanning this page ...

Thanks a lot so far,

  Andreas


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread John Robert Peterson
I'm going to go back to some of the primative concepts of OSM here, just to
make sure that everyone is on the same page...

OSM has 2 completly destict concepts, tracks and ways: (I am simplifying
here, but you get the idea)

Tracks are a collection of gps points, as they are recorded, generally 1 per
second, but there is a huge deal of variety here. it's slightly more
complicated than that, some people filter them, some people split diferent
journeys or date periods into separate tracks, but it's basicaly that
simple.

Ways are (in this context) a road -- with just enough points along it to
mark the curvature, lots of metadata, and it's always just one road, it will
never span a bunch of roads describing a route.

The trouble here is that there is no link between tracks and ways -- asside
from the fact that they are close to each other. This is for very important
technical reasons. in general once a road has been traversed several times,
and it is clear that the GPS data is good, somone will trace over the (say)
200 gps points that make up the road, by adding a way containing (say) 4
nodes. From that point on, there is no connection.

It is very destructive simply convert traces directly into ways, because it
takes up huge amounts of valuable space in the database, and leads to a lack
of user filtering of bad data. Simply driving past a large metalic building
can thorugh GPS off by a significant distance etc.

I have personally looked into ways of doing exactly what (I think) you are
trying to do, and found that computers just arn't clever enough to match the
data up, and produce good ways from traces.

That's not to say that we either don't want, or can't use your data. what I
would sugest is the following:

You upload data you have as traces, I believe this can be done fairly simply
using the API (i've done it, using CURL, and got it to work) this returns, I
blieve an id that should be useful to you.

You could add the metadata that you have about road staes and single nodes
to the main map data, also farily simple thoguht the API.

You haveto then rely on humans (either you, or us) to trace the data into
good quality ways.

There is also the question of road names I assume that if you have this
data, it will be in some copyrighted form? there is a chance that you have
the address you are delivering to, that may be usable...

JR


2010/3/22 Andreas Höschler ahoe...@smartsoft.de

 Hi John,

  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)?
 
  It's not that simple, because you may need to deal with merging,
  alternatively you could produce .osm files similar to what JOSM
  produces and then people can load those files into JOSM and merge or
  add data to OSM.

 Creating OSM files would be easy for us. But where would we sent them?
 Simply put them on our webserver and make an announcement on the osm
 list hey, we have some osm data to be merged/imported! Have fun!!?

 The other problem is how do we get to know that one of our ways got
 imported into the public OSM database and thus assigned an ID so that
 we can get rid of that way in our private database?

 I have just logged into www.openstreetmap.org and found the GPS traces
 pane and the page on which one can upload gps traces. However, where
 can I upload OSM files to with ways having street names, way kind, ...?

 Thanks,

  Andreas





 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread John Smith
2010/3/23 Iván Sánchez Ortega i...@sanchezortega.es:
 Andreas talked about inserting data into OSM, not updating data in OSM. Yes,
 that's a completely different problem :-)

You are assuming he's adding data that doesn't exist or overlap with
data already in OSM...

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Maarten Deen
On Mon, 22 Mar 2010 15:19:43 +0100, Andreas Höschler
ahoe...@smartsoft.de wrote:
 Hi John,
 
 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)?

 It's not that simple, because you may need to deal with merging,
 alternatively you could produce .osm files similar to what JOSM
 produces and then people can load those files into JOSM and merge or
 add data to OSM.
 
 Creating OSM files would be easy for us. But where would we sent them? 
 Simply put them on our webserver and make an announcement on the osm 
 list hey, we have some osm data to be merged/imported! Have fun!!?

That's the basic thought. Have a look at the projectpages for the various
Kosovo imports on http://wiki.openstreetmap.org/wiki/Category:Kosovo.
If this gets coordinated with a group of local mappers (in case there
already is data present) then I don't see a big problem.

 The other problem is how do we get to know that one of our ways got 
 imported into the public OSM database and thus assigned an ID so that 
 we can get rid of that way in our private database?

Only by investigating the new data and comparing it to your own data. As
you can see on some of the Kosovo pages, there is a link to a changeset.
This is a collection of all the items that got added/changed. This could be
used to check against your local data.

Regards,
Maarten

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Iván Sánchez Ortega
El 22/03/2010 15:46, Andreas Höschler escribió:
 [...] selecting only those records that make up a way.

So you have a topologically correct road network. Nce :-)

 Looky here: http://wiki.openstreetmap.org/wiki/API_v0.6

 Wow, I believe that's what I was looking for!! Scanning this page
[...]
 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)!?

With the API, you can upload new nodes/ways/relations, fetch the 
existing ones, and update the existing ones (uploading a changeset).

The problem is that you might upload a new way that overlaps an existing 
OSM way. Either you upload it and merge with OSM tools, or you download 
the OSM data in the neighborhood, check if it overlaps, and update your 
data with the already-existing OSM data, etc etc.


Cheers,
-- 
Iván Sánchez Ortega i...@sanchezortega.es

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Nic Roets
Andreas,

One solution is to add your own tag to the OSM files you generate e.g.
smartsoft_id=nnn. And publish the files for review somewhere. Then
scan the minutely updates at planet.openstreetmap.de for your id
numbers and when they appear you can delete them from your DB.

You can also upload data directly to OSM and get the IDs. But if you
don't allow us to at least see before hand what you are up to, you run
the risk of making us angry.

Regards,
Nic

2010/3/22 Andreas Höschler ahoe...@smartsoft.de:
 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)!?

 Still what is the best option for us?

 Regards,

  Andreas


 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread jamesmikedup...@googlemail.com
On Mon, Mar 22, 2010 at 3:54 PM, Maarten Deen md...@xs4all.nl wrote:

 On Mon, 22 Mar 2010 15:19:43 +0100, Andreas Höschler
 ahoe...@smartsoft.de wrote:
  Hi John,
 
  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)?
 
  It's not that simple, because you may need to deal with merging,
  alternatively you could produce .osm files similar to what JOSM
  produces and then people can load those files into JOSM and merge or
  add data to OSM.
 
  Creating OSM files would be easy for us. But where would we sent them?
  Simply put them on our webserver and make an announcement on the osm
  list hey, we have some osm data to be merged/imported! Have fun!!?

 That's the basic thought. Have a look at the projectpages for the various
 Kosovo imports on http://wiki.openstreetmap.org/wiki/Category:Kosovo.
 If this gets coordinated with a group of local mappers (in case there
 already is data present) then I don't see a big problem.

  The other problem is how do we get to know that one of our ways got
  imported into the public OSM database and thus assigned an ID so that
  we can get rid of that way in our private database?

 Only by investigating the new data and comparing it to your own data. As
 you can see on some of the Kosovo pages, there is a link to a changeset.
 This is a collection of all the items that got added/changed. This could be
 used to check against your local data.


Yes, we have had good results with the spoonful imports done by people.
I would say that if you have all this data to share, share it.

upload the data to archive.org, put it unter creative commons sharealike
commercial, and let us look at it. We can help you prepare it for importing
into osm.

If you have internal ids, we can also import them if needed, better would be
to download the data back out of osm, pull that into a database, the postgis
database is easy to use.

you should be able to do that matching of the osm data in postgis against
your data pretty easily.

so, lets see some data samples and then we can talk about details.

mike
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread John Smith
On 23 March 2010 00:54, Maarten Deen md...@xs4all.nl wrote:
 Only by investigating the new data and comparing it to your own data. As
 you can see on some of the Kosovo pages, there is a link to a changeset.
 This is a collection of all the items that got added/changed. This could be
 used to check against your local data.

If he generates an OSM file of the data, and include a special
company:id=* tag that he can use to track the way with, long term ways
get split etc so he only needs the ID long enough to update his own
database and so forth.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Andreas Höschler
Hi John,

 I'm going to go back to some of the primative concepts of OSM here, 
 just to make sure that everyone is on the same page...

 OSM has 2 completly destict concepts, tracks and ways: (I am 
 simplifying here, but you get the idea)

 Tracks are a collection of gps points, as they are recorded, generally 
 1 per second, but there is a huge deal of variety here. it's slightly 
 more complicated than that, some people filter them, some people split 
 diferent journeys or date periods into separate tracks, but it's 
 basicaly that simple.

 Ways are (in this context) a road -- with just enough points along it 
 to mark the curvature, lots of metadata, and it's always just one 
 road, it will never span a bunch of roads describing a route.

Totally aware of thi sdistinction. We are actually generating ways from 
our tracks before trying to send them to the public OSM server

 The trouble here is that there is no link between tracks and ways -- 
 asside from the fact that they are close to each other. This is for 
 very important technical reasons. in general once a road has been 
 traversed several times, and it is clear that the GPS data is good, 
 somone will trace over the (say) 200 gps points that make up the road, 
 by adding a way containing (say) 4 nodes. From that point on, there is 
 no connection.

 It is very destructive simply convert traces directly into ways, 
 because it takes up huge amounts of valuable space in the database, 
 and leads to a lack of user filtering of bad data. Simply driving past 
 a large metalic building can thorugh GPS off by a significant distance 
 etc.

99.9% of the tracks/ways we are producing are in or close to forrests. 
We have already written code that reduces tracks with 80 records down 
to a track of only 20 records. And I as a database engineer are totally 
aware of the storage issue. It really looks that we won't even use the 
reduced track for creating a way but ask our users to do the click, 
click, click,... ting to manually enter a way with as few nodes as 
possible with the track being shown inthe background on the map he is 
clicking on.

So we can assume high quality ways mit as few nodes as possible on our 
site. It's just that I need to keep our users within our ERP system. I 
cannot ask tem to log into OSM and use JOSM to edit tracks. That won't 
fly! :-(

 I have personally looked into ways of doing exactly what (I think) you 
 are trying to do, and found that computers just arn't clever enough to 
 match the data up, and produce good ways from traces.

 That's not to say that we either don't want, or can't use your data. 
 what I would sugest is the following:

 You upload data you have as traces, I believe this can be done fairly 
 simply using the API (i've done it, using CURL, and got it to work) 
 this returns, I blieve an id that should be useful to you.

 You could add the metadata that you have about road staes and single 
 nodes to the main map data, also farily simple thoguht the API.

Still checking out the API described on

http://wiki.openstreetmap.org/wiki/API_v0.6

Thanks,

  Andreas


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Peter Körner
 Thus the data we are producing is already of high 
 value (could directly be inserted into the public OSM database).
Could you please provide an extract of this data so we can take a look 
at the quality ourself?

Thank you!
Peter

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Andreas Höschler
Hi Nic,

 One solution is to add your own tag to the OSM files you generate e.g.
 smartsoft_id=nnn. And publish the files for review somewhere. Then
 scan the minutely updates at planet.openstreetmap.de for your id
 numbers and when they appear you can delete them from your DB.

Thanks, that sounds like a plan. Downloading and unzipping the files 
automatically (cronjob, expect script) will require some tinkering, but 
this is certainly doable with medium efforts.

The OSM are supposed to be put on our webserver!? How do I announce a 
new OSM file to whom?

 You can also upload data directly to OSM and get the IDs. But if you
 don't allow us to at least see before hand what you are up to, you run
 the risk of making us angry.

Hmghh! I will check out both approaches!

Thanks,

  Andreas


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Tom Hughes
On 22/03/10 15:00, Nic Roets wrote:

 One solution is to add your own tag to the OSM files you generate e.g.
 smartsoft_id=nnn. And publish the files for review somewhere. Then
 scan the minutely updates at planet.openstreetmap.de for your id
 numbers and when they appear you can delete them from your DB.

I'm not sure we really want to encourage the use of our database as a 
storage space for third party identifiers like that. It could get rather 
out of hand if everybody else wants to attach their own IDs to our data.

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Iván Sánchez Ortega
El 22/03/2010 16:38, Andreas Höschler escribió:
 The OSM are supposed to be put on our webserver!? How do I announce a
 new OSM file to whom?

http://lists.openstreetmap.org/listinfo/imports should be the right place.

-- 
Iván Sánchez Ortega i...@sanchezortega.es

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread jamesmikedup...@googlemail.com
On Mon, Mar 22, 2010 at 5:18 PM, Tom Hughes t...@compton.nu wrote:

 I'm not sure we really want to encourage the use of our database as a
 storage space for third party identifiers like that. It could get rather
 out of hand if everybody else wants to attach their own IDs to our data.


If someone donates a good chunk of good data to osm then they are also part
of the solution. I think that it makes sense to allow people who are
maintaining some data to add in IDs for better maintenance.

I doubt that the situation where everyone needs to add IDs to everyone
else's data will ever occur.

mike
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Inserting OSM data

2010-03-22 Thread Nic Roets
On Mon, Mar 22, 2010 at 6:18 PM, Tom Hughes t...@compton.nu wrote:
 On 22/03/10 15:00, Nic Roets wrote:

 One solution is to add your own tag to the OSM files you generate e.g.
 smartsoft_id=nnn. And publish the files for review somewhere. Then
 scan the minutely updates at planet.openstreetmap.de for your id
 numbers and when they appear you can delete them from your DB.

 I'm not sure we really want to encourage the use of our database as a
 storage space for third party identifiers like that. It could get rather out
 of hand if everybody else wants to attach their own IDs to our data.


Hello Tom,

Unfortunately it has already happened many times. Below is a list of
the third party identifiers that I have found.

Instead of banning them outright, I would be happy if we have
guidelines that (a) make it easy for us to identify them as third
party (b) make sure they don't clash with other imports and (c) make
sure they don't take up unnecessary disk space.

Regards,
Nic

tiger:uuid and others
AND_ and AND:
kms:
LandPro08:
NHD:
massgis:
scgis-shp:
KSJ2:
geobase:
openGeoDB:
gnis:
CLC:
gns:
ref:INSEE
it:fvg:ctrn:
3dshapes:
cladr:
BP:
chile: // vialidad.cl import
navibot:
teryt:
naptan:
asset_ref // naptan
qroti:
import_uuid
sagns_id
sangs_id

hdop
sat
pdop
fix
vdop

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev