Skip to content
Commits on Source (4)
......@@ -8,7 +8,7 @@ if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
endif()
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
SET(SHARE_DIR "/usr/share/osm2pgrouting")
SET(SHARE_DIR "${CMAKE_INSTALL_PREFIX}/share/osm2pgrouting")
FIND_PACKAGE(PostgreSQL REQUIRED)
find_package(LibPQXX REQUIRED)
......@@ -106,7 +106,7 @@ TARGET_LINK_LIBRARIES(osm2pgrouting
)
INSTALL(TARGETS osm2pgrouting
RUNTIME DESTINATION "/usr/bin"
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
)
if(WIN32)
......
......@@ -2,6 +2,15 @@
[![Join the chat at https://gitter.im/pgRouting/osm2pgrouting](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pgRouting/osm2pgrouting?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# Table of Contents
* [Requirements](#requirements)
* [Documentation](#documentation)
* [Installation](#installation)
* [How to use](#how-to-use)
* [Tips](#tips)
## Requirements
Before you can use this tool for importing Openstreetmap data you need to install:
......@@ -127,3 +136,17 @@ Database options:
-W [ --password ] arg Password for database access.
```
## Tips
Open Street Map (OSM) files contains tags not used at all for routing operations by PgRouting (i.e. author, version, timestamps, etc.). You can reduce a lot the size of your OSM file to import removing this metadata tags from original file (you can get around half size of original file).
The best tool to remove tags is [osmconvert](https://wiki.openstreetmap.org/wiki/Osmconvert).
There are another tools but osmconvert is the fastest parsing osm files.
Example:
```
$ osmconvert output_data.osm.pbf --drop-author --drop-version --out-osm -o=output_data_reduc.osm
```
You can download OSM data as PBF (protobuffer) format. This is a binary format and it has a lower size than OSM raw files (better for downloading operations).
osm2pgrouting (2.3.3-2) UNRELEASED; urgency=medium
osm2pgrouting (2.3.4-1) unstable; urgency=medium
* New upstream release.
* Update copyright-format URL to use HTTPS.
* Update Vcs-* URLs for Salsa.
* Bump Standards-Version to 4.1.3, no changes.
-- Bas Couwenberg <sebastic@debian.org> Sun, 21 Jan 2018 10:10:47 +0100
-- Bas Couwenberg <sebastic@debian.org> Tue, 03 Apr 2018 07:10:42 +0200
osm2pgrouting (2.3.3-1) unstable; urgency=medium
......
......@@ -98,7 +98,7 @@ int main(int argc, char* argv[]) {
}
if (vm.count("version")) {
std::cout << "This is osm2pgrouting Version 2.3.3\n";
std::cout << "This is osm2pgrouting Version 2.3.4\n";
return 0;
}
......
......@@ -38,7 +38,7 @@ Element::Element(const char **atts) :
m_osm_id = boost::lexical_cast<int64_t>(value);
}
if (name == "visible") {
m_visible = boost::lexical_cast<bool>(value);
m_visible = (value == "true")? true : false;
}
m_attributes[name] = value;
}
......