- SYNOPSIS use Geo::OSM::DBI; # or ... use Geo::OSM::DBI::CH;
- COPYRIGHT and LICENSE
- SOURCE CODE
Store Open Street Map data with DBI, especially for Switzerland
The exact specifica are yet to be defined.
my $osm_db_ch = Geo::OSM::DBI::CH->new($dbh);
Create and return a
Geo::OSM::DBI::CH object that will access the Open Street Database referenced by the
$dbh). It's unclear to me what a
DBI::db object actually is...
First creates the table
municipalities by calling the parent's class create_table_municipalities. Then, it uses the data in table
municipalities to create
municipalities_ch. Finanlly, it creates the view
$osm_db_ch->create_table_municipalities_ch(); … my %municipalities = $osm_db_ch->municipalities_ch();
my $rel_id = $osm_db_ch->rel_id_ch();
Return the relation id of Switzerland.
As of 2017-09-05, it returns
Note: apparently, a country can have multiple relations with
key = 'ISO3166-1' (See "rel_ids_ISO_3166_1" in Geo::OSM::DBI), yet Switzerland has (as it does not have access to the sea) only one.
Return the relation of Switzerland.
See "rel_id_ch" in Geo::OSM::DBI for more details.
Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: http://www.perlfoundation.org/artistic_license_2_0
The source code is on github. Meaningful pull requests are welcome.