[osm2pgrouting] 15/24: Add patch to fix spelling errors.
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Fri Apr 29 18:47:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository osm2pgrouting.
commit db26e8ecd73f81da2c03e44b18eacab523399ade
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Apr 29 20:10:38 2016 +0200
Add patch to fix spelling errors.
---
debian/changelog | 1 +
debian/patches/series | 1 +
debian/patches/spelling-errors.patch | 162 +++++++++++++++++++++++++++++++++++
3 files changed, 164 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 3a8add7..d385a2c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ osm2pgrouting (2.1.0-1) UNRELEASED; urgency=medium
- Add copyright holders
- Add license & copyright for cpplint.py & FindPostgreSQL.cmake
* Use source format 3.0 (quilt).
+ * Add patch to fix spelling errors.
-- Bas Couwenberg <sebastic at debian.org> Fri, 29 Apr 2016 19:36:25 +0200
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..38edaa7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+spelling-errors.patch
diff --git a/debian/patches/spelling-errors.patch b/debian/patches/spelling-errors.patch
new file mode 100644
index 0000000..892027f
--- /dev/null
+++ b/debian/patches/spelling-errors.patch
@@ -0,0 +1,162 @@
+Description: Fix spelling errors.
+ splitted -> split
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/src/Export2DB.cpp
++++ b/src/Export2DB.cpp
+@@ -717,13 +717,13 @@ void Export2DB::process_section(int64_t
+ fill_source_target( "__ways_temp" , addSchema( full_table_name("ways_vertices_pgr") ) );
+
+
+- // std::cout << "Inserting new splitted ways to '" << addSchema( full_table_name("ways") ) << "'\n";
++ // std::cout << "Inserting new split ways to '" << addSchema( full_table_name("ways") ) << "'\n";
+ std::string insert_into_ways(
+ " INSERT INTO " + addSchema( full_table_name("ways") ) +
+ "( " + ways_columns + ", source, target, length_m, cost_s, reverse_cost_s ) "
+ " (SELECT " + ways_columns + ", source, target, length_m, cost_s, reverse_cost_s FROM __ways_temp); ");
+ q_result = PQexec(mycon, insert_into_ways.c_str());
+- // std::cout << " Inserted " << PQcmdTuples(q_result) << " splitted ways\n";
++ // std::cout << " Inserted " << PQcmdTuples(q_result) << " split ways\n";
+ std::cout << " Ways inserted: " << count << "\n";
+ PQclear(q_result);
+ dropTable("__ways_temp");
+--- a/src/OSMDocument.cpp
++++ b/src/OSMDocument.cpp
+@@ -39,7 +39,7 @@ OSMDocument::~OSMDocument() {
+ ez_mapdelete(m_Nodes);
+ ez_vectordelete(m_Ways);
+ ez_vectordelete(m_Relations);
+- ez_vectordelete(m_SplittedWays);
++ ez_vectordelete(m_SplitWays);
+ }
+ void OSMDocument::AddNode(Node* n) {
+ m_Nodes[n->id] = n;
+@@ -63,7 +63,7 @@ void OSMDocument::SplitWays() {
+ std::vector<Way*>::const_iterator it(m_Ways.begin());
+ std::vector<Way*>::const_iterator last(m_Ways.end());
+
+- // splitted ways get a new ID
++ // split ways get a new ID
+ long long id = 0;
+
+ while (it != last) {
+@@ -80,14 +80,14 @@ void OSMDocument::SplitWays() {
+ Node* secondNode = 0;
+ Node* lastNode = 0;
+
+- Way* splitted_way = new Way(++id, currentWay->visible,
++ Way* split_way = new Way(++id, currentWay->visible,
+ currentWay->osm_id,
+ currentWay->maxspeed_forward,
+ currentWay->maxspeed_backward);
+- splitted_way->name = currentWay->name;
+- splitted_way->type = currentWay->type;
+- splitted_way->clss = currentWay->clss;
+- splitted_way->oneWayType = currentWay->oneWayType;
++ split_way->name = currentWay->name;
++ split_way->type = currentWay->type;
++ split_way->clss = currentWay->clss;
++ split_way->oneWayType = currentWay->oneWayType;
+
+ std::map<std::string, std::string>::iterator it_tag(currentWay->m_Tags.begin());
+ std::map<std::string, std::string>::iterator last_tag(currentWay->m_Tags.end());
+@@ -99,49 +99,49 @@ void OSMDocument::SplitWays() {
+ while (it_tag != last_tag) {
+ std::pair<std::string, std::string> pair = *it_tag++;
+
+- splitted_way->AddTag(pair.first, pair.second);
++ split_way->AddTag(pair.first, pair.second);
+ }
+
+ // GeometryFromText('LINESTRING('||x1||' '||y1||','||x2||' '||y2||')',4326);
+
+- splitted_way->geom = "LINESTRING("+ boost::lexical_cast<std::string>(node->lon) + " " + boost::lexical_cast<std::string>(node->lat) +",";
++ split_way->geom = "LINESTRING("+ boost::lexical_cast<std::string>(node->lon) + " " + boost::lexical_cast<std::string>(node->lat) +",";
+
+- splitted_way->AddNodeRef(node);
++ split_way->AddNodeRef(node);
+
+ bool found = false;
+
+ if (it_node != last_node) {
+ while (it_node != last_node && !found) {
+- splitted_way->AddNodeRef(*it_node);
++ split_way->AddNodeRef(*it_node);
+ if ((*it_node)->numsOfUse > 1) {
+ found = true;
+ secondNode = *it_node;
+- splitted_way->AddNodeRef(secondNode);
++ split_way->AddNodeRef(secondNode);
+ double length = getLength(node, secondNode);
+ if (length < 0)
+ length*=-1;
+- splitted_way->length+=length;
+- splitted_way->geom+= boost::lexical_cast<std::string>(secondNode->lon) + " " + boost::lexical_cast<std::string>(secondNode->lat) + ")";
++ split_way->length+=length;
++ split_way->geom+= boost::lexical_cast<std::string>(secondNode->lon) + " " + boost::lexical_cast<std::string>(secondNode->lat) + ")";
+ } else if (backNode == (*it_node)) {
+ lastNode =*it_node++;
+- splitted_way->AddNodeRef(lastNode);
++ split_way->AddNodeRef(lastNode);
+ double length = getLength(node, lastNode);
+ if (length < 0)
+ length*=-1;
+- splitted_way->length+=length;
+- splitted_way->geom+= boost::lexical_cast<std::string>(lastNode->lon) + " " + boost::lexical_cast<std::string>(lastNode->lat) + ")";
++ split_way->length+=length;
++ split_way->geom+= boost::lexical_cast<std::string>(lastNode->lon) + " " + boost::lexical_cast<std::string>(lastNode->lat) + ")";
+ } else {
+- splitted_way->geom+= boost::lexical_cast<std::string>((*it_node)->lon) + " " + boost::lexical_cast<std::string>((*it_node)->lat) + ",";
++ split_way->geom+= boost::lexical_cast<std::string>((*it_node)->lon) + " " + boost::lexical_cast<std::string>((*it_node)->lat) + ",";
+ *it_node++;
+ }
+ }
+ }
+
+- if (splitted_way->m_NodeRefs.front() != splitted_way->m_NodeRefs.back()) {
+- m_SplittedWays.push_back(splitted_way);
++ if (split_way->m_NodeRefs.front() != split_way->m_NodeRefs.back()) {
++ m_SplitWays.push_back(split_way);
+ } else {
+- delete splitted_way;
+- splitted_way = 0;
++ delete split_way;
++ split_way = 0;
+ }
+ }
+ }
+--- a/src/OSMDocument.h
++++ b/src/OSMDocument.h
+@@ -41,8 +41,8 @@ class OSMDocument {
+ std::map<long long, Node*> m_Nodes;
+ //! parsed ways
+ std::vector<Way*> m_Ways;
+- //! splitted ways
+- std::vector<Way*> m_SplittedWays;
++ //! split ways
++ std::vector<Way*> m_SplitWays;
+
+ std::vector<Relation*> m_Relations;
+
+--- a/src/osm2pgrouting.cpp
++++ b/src/osm2pgrouting.cpp
+@@ -129,8 +129,8 @@ int main(int argc, char* argv[]) {
+ dbConnection.exportClasses(config->m_Types);
+ //dbConnection.exportRelations(document->m_Relations, config);
+ dbConnection.exportRelationsWays(document->m_Relations);
+- dbConnection.exportTags(document->m_SplittedWays, config);
+- dbConnection.exportWays(document->m_SplittedWays, config);
++ dbConnection.exportTags(document->m_SplitWays, config);
++ dbConnection.exportWays(document->m_SplitWays, config);
+
+
+ std::cout << "Creating topology..." << endl;
+@@ -141,7 +141,7 @@ int main(int argc, char* argv[]) {
+ std::cout << "#########################" << endl;
+
+ std::cout << "size of streets: " << document->m_Ways.size() << endl;
+- std::cout << "size of splitted ways : " << document->m_SplittedWays.size() << endl;
++ std::cout << "size of split ways : " << document->m_SplitWays.size() << endl;
+
+ clock_t end = clock();
+ double elapsed_secs = double(end - begin) / static_cast<double>(CLOCKS_PER_SEC);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osm2pgrouting.git
More information about the Pkg-grass-devel
mailing list