[OSM-talk] New script to do CSV -> OSM

80n 80n80n at gmail.com
Tue Mar 20 19:19:35 GMT 2007


Nick
You might want to take a look at this one:
http://www.informationfreeway.org/?lat=6705525.09682&lon=51680.97455&zoom=14&layers=B00

<node id='26608538' timestamp='2007-03-18 17:29:10' lat='51.4775'
lon='0.461388888888889'>
    <tag k='icao' v='EGLL' />
    <tag k='is_in' v='London,England,UK' />
    <tag k='type' v='civil' />
    <tag k='place' v='airport' />
    <tag k='aeroway' v='airport' />
    <tag k='iata' v='LHR' />
    <tag k='source' v='Gagravarr_Airports' />
    <tag k='name' v='Heathrow' />
  </node>

I suspect many people wish that Heathrow was at this location...

80n

On 3/20/07, Nick Burch <openstreetmap at gagravarr.org> wrote:
> Hi All
>
> I wanted to import some data, in a csv file, to OSM. Having first checked
> that the licence on my data was compatible, I then needed something to
> convert my data into osm format, check it didn't clash with any existing
> data, then upload it.
>
> Having failed to find a script to do this, I wrote one:
>         http://svn.openstreetmap.org/utils/importers/csv2osm/
>
> You supply the script with a config file, which contains all your
> customisations. The config file specifies who to download/upload as, what
> csv file to use, how far from the new point to search for existing ones,
> what tags to look for to detect potential duplicates, and how to turn a
> line of CSV into the tags for a new node. A couple of examples are in svn.
>
> Having set that up, you run the script. It converts each line at a time,
> downloads the osm data around the new node, and checks for a possible
> clash. If one is found, it writes the node to problem.osm. If not, it
> uploads the new node to the api, and writes it to worked.osm.
>
>
> Hopefully it'll be of use to other people in the future.
>
> Nick
>
> PS I used the script to do an airports import, with
>      source=Gagravarr_Airports, if you spot those about
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>




More information about the talk mailing list