Skip to content
Commits on Source (4)
osm2pgRouting 2.3.5
* Fix: zero division error when max_speed = 0.
* Fix: fixed osm_ways parsing - OSMDocument.
* Fix: switch to a more inclusive check for nullptr definition (fixes compilation on macOS 10.13 using Xcode 9.3)
* Docs improvements: How to release doc.
osm2pgRouting 2.3.4
* Fix: osm_elements - fixed boolean assignment with boost::lexical_cast.
* Use ${CMAKE_INSTALL_PREFIX} in CMakeLists.txt.
* Readme doc improvements: Tips section and Table of contents.
osm2pgRouting 2.3.3
* Fix: wrong assumption in implied_oneWay() function
* Fix: regression on 2.3.2: fixed hstore refs handling
......@@ -80,5 +94,3 @@ Indexes:
"vertex_id" UNIQUE CONSTRAINT, btree (osm_id)
"ways_vertices_pgr_gdx" gist (the_geom)
"ways_vertices_pgr_osm_id_idx" btree (osm_id)
osm2pgrouting (2.3.4-2) UNRELEASED; urgency=medium
osm2pgrouting (2.3.5-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.1.4, no changes.
* Strip trailing whitespace from rules file.
-- Bas Couwenberg <sebastic@debian.org> Wed, 18 Apr 2018 20:33:51 +0200
-- Bas Couwenberg <sebastic@debian.org> Mon, 21 May 2018 08:22:14 +0200
osm2pgrouting (2.3.4-1) unstable; urgency=medium
......
# How to release a new version
This document explains step by step how to release a new version for osm2pgrouting.
## Steps to follow
0. Make sure that the NEWS file has the changes for the release. (review issues closed in milestone).
1. Clone branch master:
```
$ git clone git@github.com:pgRouting/osm2pgrouting.git
```
2. Make sure you are in the last update:
```
$ git pull origin master
```
3. Make sure last updates was compiled without errors in Travis CI: https://travis-ci.org/pgRouting/osm2pgrouting/builds
4. Make the tag for this version (change version number from example):
```
$ git tag -a -m "Create osm2pgrouting v2.3.4 tag" v2.3.4
```
5. Push the tag (change version number from example):
```
$ git push origin v2.3.4
```
6. Go to Github repository and make sure the new tag was created: https://github.com/pgRouting/osm2pgrouting/releases
7. Click on the tag number then click on the edit tag button for release title (use the same number, i.e. v2.3.4).
8. Write comments about changes introduced by this new release (review issues closed in milestone or the NEWS file). Click on update release button.
9. Close milestone.
10. Prepare next release:
- Create new milestone.
- Update version in this file: https://github.com/pgRouting/osm2pgrouting/blob/master/src/osm_elements/osm2pgrouting.cpp#L101.
......@@ -23,9 +23,7 @@
#define SRC_CONFIGURATIONPARSERCALLBACK_H_
#pragma once
#if __GNUC__ > 4 || \
(__GNUC__ == 4 && (__GNUC_MINOR__ >= 6))
#else
#ifdef BOOST_NO_CXX11_NULLPTR
#define nullptr NULL
#endif
......
......@@ -23,9 +23,7 @@
#define SRC_OSMDOCUMENTPARSERCALLBACK_H_
#pragma once
#if __GNUC__ > 4 || \
(__GNUC__ == 4 && (__GNUC_MINOR__ >= 6))
#else
#ifdef BOOST_NO_CXX11_NULLPTR
#define nullptr NULL
#endif
......
......@@ -369,7 +369,7 @@ void Export2DB::fill_source_target(
std::string sql3(
" UPDATE " + table +
" SET length_m = ST_length(geography(ST_Transform(the_geom, 4326))),"
" coST_s = CASE "
" cost_s = CASE "
" WHEN one_way = -1 THEN -ST_length(geography(ST_Transform(the_geom, 4326))) / (maxspeed_forward::float * 5.0 / 18.0)"
" ELSE ST_length(geography(ST_Transform(the_geom, 4326))) / (maxspeed_backward::float * 5.0 / 18.0)"
" END, "
......@@ -377,7 +377,7 @@ void Export2DB::fill_source_target(
" WHEN one_way = 1 THEN -ST_length(geography(ST_Transform(the_geom, 4326))) / (maxspeed_backward::float * 5.0 / 18.0)"
" ELSE ST_length(geography(ST_Transform(the_geom, 4326))) / (maxspeed_backward::float * 5.0 / 18.0)"
" END "
" WHERE length_m IS NULL;");
" WHERE length_m IS NULL AND maxspeed_backward !=0 AND maxspeed_forward != 0;");
Xaction.exec(sql3);
}
......
......@@ -90,7 +90,8 @@ OSMDocument::AddNode(const Node &n) {
m_nodes.push_back(n);
}
void OSMDocument::AddWay(const Way &w) {
void
OSMDocument::AddWay(const Way &w) {
if (m_ways.empty() && m_vm.count("addnodes")) {
wait_child();
osm_table_export(m_nodes, "osm_nodes");
......@@ -112,13 +113,6 @@ void OSMDocument::AddWay(const Way &w) {
void
OSMDocument::AddRelation(const Relation &r) {
if (m_vm.count("addnodes") && m_waysPending) {
m_waysPending = false;
wait_child();
osm_table_export(m_ways, "osm_ways");
std::cout << "\nFinal osm_ways:\t" << m_ways.size() << "\n";
}
m_relPending = true;
m_relations.push_back(r);
if (m_vm.count("addnodes")) {
......@@ -133,12 +127,21 @@ OSMDocument::AddRelation(const Relation &r) {
void
OSMDocument::endOfFile() {
if (m_vm.count("addnodes") && m_relPending == true) {
if (m_vm.count("addnodes") && m_waysPending) {
m_waysPending = false;
wait_child();
osm_table_export(m_ways, "osm_ways");
std::cout << "\nFinal osm_ways:\t\t" << m_ways.size();
}
if (m_vm.count("addnodes") && m_relPending) {
m_relPending = false;
wait_child();
std::cout << "\nFinal osm_relations:\t" << m_relations.size();
std::cout << "\nFinal osm_relations:\t" << m_relations.size() << "\n";
osm_table_export(m_relations, "osm_relations");
}
std::cout << "\nEnd Of file\n\n\n";
}
......
......@@ -98,7 +98,7 @@ int main(int argc, char* argv[]) {
}
if (vm.count("version")) {
std::cout << "This is osm2pgrouting Version 2.3.4\n";
std::cout << "This is osm2pgrouting Version 2.3.5\n";
return 0;
}
......