You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2009-09-30 18:51:00

TAHL
Member
Registered: 2009-09-30
Posts: 2

Add Bus Stops to Map

Hi,

I'm brandnew to this program and unfortunately the search doesn't seem to work properly, so I don't know if a topic like mine already exists.

Here's my question:

I have the coordinates for about 1000 busstops in a german state. Unfortunately, they are saved in an .xls table!

Is there a way to upload these coordinates without typing them in one-by-one?

Hope someone can help.

Cheers,
TAHL

Offline

#2 2009-09-30 20:34:30

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,840
Website

Re: Add Bus Stops to Map

Hi,

it should be possible to do a mass import with some scripting - the hard part would probably be connecting the bus stops with the existing road network and avoiding duplicates. I personally don't have experience with automated imports, so I'll leave the technical support to someone else.

I have some questions, though:
* What's the source of that data?
* What information is in there? Just coordinates and names or some other details (street name, direction, bus routes), too?


OSM in 3D: OSM2World

Offline

#3 2009-10-01 13:32:04

TAHL
Member
Registered: 2009-09-30
Posts: 2

Re: Add Bus Stops to Map

Hi

The bus stops are for demand responsive public transport in the administrative district of Anhalt-Bitterfeld.
I got the coordinates directly from the operating company.
Information is name and number of the stop and the associated municipality. As it's demand responsive transport, only few of them have specific directions or bus routes.

Offline

#4 2009-10-01 13:58:47

JRA
Member
Registered: 2007-12-17
Posts: 677

Re: Add Bus Stops to Map

Hi,

I don't know if there is any "csv2osm" or "poi2osm" tool yet.  In your case it should feed the values from your spread sheet into osm.xml file so that the result would be something like this:

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
  <node id='-1' action='modify' visible='true' lat='60.23997678718503' lon='25.157927237457436'>
    <tag k='ref' v='4423' />
    <tag k='source' v='Anhalt-Bitterfeld import 10/2009' />
    <tag k='highway' v='bus_stop' />
    <tag k='name' v='E-Street' />
  </node>
</osm>


I can't program anything but I feel that making a csv2osm program transferring coordinates and attributes from a text file to osm.xml format would not be extra difficult for anybody who can.  Then were would be the work with checking the data, cleaning out dublicates etc. that should be done prior to uploading.

Offline

#5 2009-10-02 21:03:54

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,840
Website

Re: Add Bus Stops to Map

@TAHL: If you are comfortable using mailing lists, my suggestion would be to contact the German "talk-de" mailing list - your data seems to be Germany-related and some people on the list should have experience with imports - or the generic "imports" mailing list. Of course, I don't want to discourage you from further relying on the forum for answers, but it tends to be less active than the mailing lists, especially for more technical questions.


OSM in 3D: OSM2World

Offline

#6 2009-10-05 19:20:36

Seventy7
Member
From: York
Registered: 2009-05-26
Posts: 140

Re: Add Bus Stops to Map

JRA wrote:

In your case it should feed the values from your spread sheet into osm.xml file so that the result would be something like this:

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
  <node id='-1' action='modify' visible='true' lat='60.23997678718503' lon='25.157927237457436'>
    <tag k='ref' v='4423' />
    <tag k='source' v='Anhalt-Bitterfeld import 10/2009' />
    <tag k='highway' v='bus_stop' />
    <tag k='name' v='E-Street' />
  </node>
</osm>

Just a thought, but most of this is fixed text, so if it's in Excel already you could insert the fixed text around each of the variable lat and lon figures. I don't think each point would have to be on multiple lines and you would have 1 line per point.

So if the lat is in A1 and the lon is in B1, C1 would contain something like:
="<node id='-1' action='modify' visible='true' lat='"& A1 &"' lon='"& B1 &"'> <tag k=whatever v=whatever/> <tag k=whatever v=whatever/> ... </node>"

I don't know if the id=-1 value has to change, but this would be easy enough to make it a variable too.

Add the headers and footers and export column C as a text file and you've done it. Easy!! wink

I don't think you can import a list of nodes like this directly, but open it in JOSM and upload the changes that way.

Hope this helps.

Steve

Offline

Board footer

Powered by FluxBB