[Git][debian-gis-team/osm2pgrouting][upstream] New upstream version 2.3.5

Bas Couwenberg gitlab at salsa.debian.org
Mon May 21 07:31:12 BST 2018


Bas Couwenberg pushed to branch upstream at Debian GIS Project / osm2pgrouting


Commits:
167d4b7a by Bas Couwenberg at 2018-05-21T08:20:49+02:00
New upstream version 2.3.5
- - - - -


7 changed files:

- NEWS
- + how_to_release.md
- include/parser/ConfigurationParserCallback.h
- include/parser/OSMDocumentParserCallback.h
- src/database/Export2DB.cpp
- src/osm_elements/OSMDocument.cpp
- src/osm_elements/osm2pgrouting.cpp


Changes:

=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,18 @@
+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
 
@@ -38,47 +52,45 @@ osm2pgRouting 2.1.0
    New "ways" table structure:
       Column       |           Type            |  Modifications
 -------------------+---------------------------+----------------
- gid               | bigint                    | 
- class_id          | integer                   | 
+ gid               | bigint                    |
+ class_id          | integer                   |
  length            | double precision          |
  length_m          | double precision          | new column
  name              | text                      |
  source            | bigint                    |
  target            | bigint                    |
- x1                | double precision          | 
- y1                | double precision          | 
- x2                | double precision          | 
- y2                | double precision          | 
+ x1                | double precision          |
+ y1                | double precision          |
+ x2                | double precision          |
+ y2                | double precision          |
  cost              | double precision          | name changed from 'to_cost'
- reverse_cost      | double precision          |  
+ reverse_cost      | double precision          |
  cost_s            | double precision          | new column
- reverse_cost_s    | double precision          | new column 
- rule              | text                      | 
+ reverse_cost_s    | double precision          | new column
+ rule              | text                      |
  one_way           | integer                   | new column
- maxspeed_forward  | integer                   | 
- maxspeed_backward | integer                   | 
- osm_id            | bigint                    | 
+ maxspeed_forward  | integer                   |
+ maxspeed_backward | integer                   |
+ osm_id            | bigint                    |
  source_osm        | bigint                    | new column
  target_osm        | bigint                    | new column
- priority          | double precision          | 
- the_geom          | geometry(LineString,4326) | 
+ priority          | double precision          |
+ the_geom          | geometry(LineString,4326) |
 
      New "ways_vertices_pgr" table structure
   Column  |         Type         |  Modifications
 ----------+----------------------+----------------------------------------------------------------
- id       | bigint               | 
+ id       | bigint               |
  osm_id   | bigint               | new column
- cnt      | integer              | 
- chk      | integer              | 
- ein      | integer              | 
- eout     | integer              | 
+ cnt      | integer              |
+ chk      | integer              |
+ ein      | integer              |
+ eout     | integer              |
  lon      | numeric(11,8)        | new column
  lat      | numeric(11,8)        | new column
- the_geom | geometry(Point,4326) | 
+ the_geom | geometry(Point,4326) |
 Indexes:
     "ways_vertices_pgr_pkey" PRIMARY KEY, btree (id)
     "vertex_id" UNIQUE CONSTRAINT, btree (osm_id)
     "ways_vertices_pgr_gdx" gist (the_geom)
     "ways_vertices_pgr_osm_id_idx" btree (osm_id)
-
-


=====================================
how_to_release.md
=====================================
--- /dev/null
+++ b/how_to_release.md
@@ -0,0 +1,45 @@
+# 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 at 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.


=====================================
include/parser/ConfigurationParserCallback.h
=====================================
--- a/include/parser/ConfigurationParserCallback.h
+++ b/include/parser/ConfigurationParserCallback.h
@@ -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
 


=====================================
include/parser/OSMDocumentParserCallback.h
=====================================
--- a/include/parser/OSMDocumentParserCallback.h
+++ b/include/parser/OSMDocumentParserCallback.h
@@ -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
 


=====================================
src/database/Export2DB.cpp
=====================================
--- a/src/database/Export2DB.cpp
+++ b/src/database/Export2DB.cpp
@@ -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);
 }
 


=====================================
src/osm_elements/OSMDocument.cpp
=====================================
--- a/src/osm_elements/OSMDocument.cpp
+++ b/src/osm_elements/OSMDocument.cpp
@@ -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";
 }
 


=====================================
src/osm_elements/osm2pgrouting.cpp
=====================================
--- a/src/osm_elements/osm2pgrouting.cpp
+++ b/src/osm_elements/osm2pgrouting.cpp
@@ -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;
         }
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/osm2pgrouting/commit/167d4b7a2d34c527b4b251deed4f7bb5eb57d422

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/osm2pgrouting/commit/167d4b7a2d34c527b4b251deed4f7bb5eb57d422
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180521/b75b2948/attachment-0001.html>


More information about the Pkg-grass-devel mailing list