Skip to content
Permalink
Browse files

copy subway name to subway entrances (subway_entrance_name option)

  • Loading branch information...
cheshire-mouse committed Feb 10, 2018
1 parent 1c5b98c commit a98200c912e5b21a41191809b1cbc7660b50d0e3
Showing with 25 additions and 2 deletions.
  1. +3 −0 cfg/default-city.cfg
  2. +3 −0 cfg/default.cfg
  3. +3 −0 cfg/garmin-mpc.cfg
  4. +16 −2 osm2mp.pl
@@ -89,6 +89,9 @@ make_poi: 1
# create address points for interpolation lines
addr_interpolation: 0

# copy subway entrance name from parent relation
subway_entrance_name: 0



[Values]
@@ -89,6 +89,9 @@ make_poi: 1
# create address points for interpolation lines
addr_interpolation: 0

# copy subway entrance name from parent relation
subway_entrance_name: 0



[Values]
@@ -83,6 +83,9 @@ make_poi: 1
# create address points for interpolation lines
addr_interpolation: 0

# copy subway entrance name from parent relation
subway_entrance_name: 0



[Values]
@@ -491,12 +491,26 @@
printf STDERR " %d transport stops\n", scalar keys %trstop;
}


# copy subway entrance name from subway station
if ( $flags->{subway_entrance_name} ) {
my $copy_subway_entrance_name_sub = sub {
my ($relation_id, $members, $tags) = @_;
return if !exists($tags->{name});
for my $member ( @$members ) {
my ($type, $ref, $role) = @$member{ qw/ type ref role / };
my $tag_ref = $osm->get_tags($type => $ref);
next if !$tag_ref;
if ( exists($tag_ref->{railway}) and ($tag_ref->{railway} eq "subway_entrance") ){
$tag_ref->{name} = $tags->{name};
}
}
};
$osm->iterate_relations(public_transport => $copy_subway_entrance_name_sub);
}

my $coast = Coastlines->new( $bound ? $bound->get_points() : [] );



## Process POI nodes

say STDERR "\nProcessing nodes...";

0 comments on commit a98200c

Please sign in to comment.
You can’t perform that action at this time.