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 DBI::db object $dbh). It's unclear to me what a DBI::db object actually is...
Geo::OSM::DBI::CH
DBI::db
$dbh
$osm_db_ch->create_table_municipalities_ch();
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 municipalities_ch_v.
municipalities
municipalities_ch
municipalities_ch_v
$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 51701.
51701
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.
key = 'ISO3166-1'
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.
To install Geo::OSM::DBI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::OSM::DBI
CPAN shell
perl -MCPAN -e shell install Geo::OSM::DBI
For more information on module installation, please visit the detailed CPAN module installation guide.