source: subversion/applications/utils/import/csv2osm/config.sample.complex @ 4349

Last change on this file since 4349 was 2275, checked in by nickburch, 13 years ago

Start on importers section of utils, with a csv -> osm converter

File size: 926 bytes
Line 
1$username = 'my@email.address';
2$password = 'PASSWORD';
3
4$input_csv = '/home/nick/osm/airports-latlongcsv.txt';
5
6$search_distance = 150; # In meters
7@search_attrs = (       # Any of
8        'aeroway=airport',
9        'place=airport',
10        'amenity=airport'
11);
12
13# Use $COL1 for the 1st column, $COL3 for third etc
14# Use special entries latitude and longitude for node lat+long
15@output_mapping = (
16        'aeroway=airport',
17        'place=airport',
18        'name=$COL5',
19        'type=civil',
20        'iata=$COL2',
21        'icao=$COL1',
22        'latitude=$COL7',
23        'longitude=$COL8',
24        'is_in=$COL3,$COL4,$COL6',
25        'source=Gagravarr_Airports'
26);
27
28# Special Subroute to call to tweak CSV data, before mappings applied
29sub csv_tweaker {
30        my $csv_ref = shift;
31
32        # If the name is International or Intl, add on the place name too
33        if($csv_ref->[4] eq "International" || $csv_ref->[4] eq "Intl") {
34                $csv_ref->[4] = $csv_ref->[2]." ".$csv_ref->[4];
35        }
36}
37
38# Script must return 1, as it'll be included
391;
Note: See TracBrowser for help on using the repository browser.