Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Removed unecessary console output

- Changed MULTILINESTRING to LINESTRING
- Should work with PostGIS 2.x
  • Loading branch information...
commit 2a20f6e9b1c7ae34e7f60246aa4c7679cfe59e80 1 parent c65e35e
@dkastl dkastl authored
View
8 src/ConfigurationParserCallback.cpp
@@ -34,7 +34,7 @@ namespace osm
*/
void ConfigurationParserCallback::StartElement( const char *name, const char** atts )
{
- std::cout << "SE for <" << name << ">" << std::endl;
+ //std::cout << "SE for <" << name << ">" << std::endl;
if( strcmp(name,"class") == 0 )
{
if (atts != NULL)
@@ -49,19 +49,19 @@ void ConfigurationParserCallback::StartElement( const char *name, const char** a
if( strcmp( key, "id" ) == 0 )
{
id = atol( value );
- std::cout << "class id = " << id << std::endl;
+ //std::cout << "class id = " << id << std::endl;
}
else if( strcmp( key, "name" ) == 0 )
{
name = value;
- std::cout << "class name = " << name << std::endl;
+ //std::cout << "class name = " << name << std::endl;
}
}
if( id>0 && !name.empty() )
{
m_pActType->AddClass( new Class( id, name ) );
- std::cout << "class id = "<<id<<" name = " << name << " added to type name=" << m_pActType->name << std::endl;
+ //std::cout << "class id = "<<id<<" name = " << name << " added to type name=" << m_pActType->name << std::endl;
}
}
}
View
2  src/Export2DB.cpp
@@ -81,7 +81,7 @@ void Export2DB::createTables()
}
std::cout << "Nodes table created" << std::endl;
- result = PQexec(mycon, "CREATE TABLE ways (gid integer, class_id integer not null, length double precision, name char(200), x1 double precision, y1 double precision, x2 double precision,y2 double precision, reverse_cost double precision,rule text, to_cost double precision, osm_id integer); SELECT AddGeometryColumn('ways','the_geom',4326,'MULTILINESTRING',2);");
+ result = PQexec(mycon, "CREATE TABLE ways (gid integer, class_id integer not null, length double precision, name char(200), x1 double precision, y1 double precision, x2 double precision,y2 double precision, reverse_cost double precision,rule text, to_cost double precision, osm_id integer); SELECT AddGeometryColumn('ways','the_geom',4326,'LINESTRING',2);");
if (PQresultStatus(result) != PGRES_COMMAND_OK)
{
std::cerr << PQresultStatus(result);
View
8 src/OSMDocument.cpp
@@ -115,9 +115,9 @@ void OSMDocument::SplitWays()
- //GeometryFromText('MULTILINESTRING(('||x1||' '||y1||','||x2||' '||y2||'))',4326);
+ //GeometryFromText('LINESTRING('||x1||' '||y1||','||x2||' '||y2||')',4326);
- splitted_way->geom="MULTILINESTRING(("+ boost::lexical_cast<std::string>(node->lon) + " " + boost::lexical_cast<std::string>(node->lat) +",";
+ splitted_way->geom="LINESTRING("+ boost::lexical_cast<std::string>(node->lon) + " " + boost::lexical_cast<std::string>(node->lat) +",";
splitted_way->AddNodeRef(node);
@@ -137,7 +137,7 @@ void OSMDocument::SplitWays()
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) + "))";
+ splitted_way->geom+= boost::lexical_cast<std::string>(secondNode->lon) + " " + boost::lexical_cast<std::string>(secondNode->lat) + ")";
}
else if(backNode==(*it_node))
@@ -148,7 +148,7 @@ void OSMDocument::SplitWays()
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) + "))";
+ splitted_way->geom+= boost::lexical_cast<std::string>(lastNode->lon) + " " + boost::lexical_cast<std::string>(lastNode->lat) + ")";
}
else
{
View
2  src/osm2pgrouting.cpp
@@ -113,7 +113,7 @@ int main(int argc, char* argv[])
}
else
{
- cout << "unknown paramer: " << argv[i] << endl;
+ cout << "unknown parameter: " << argv[i] << endl;
_error();
return 1;
}
Please sign in to comment.
Something went wrong with that request. Please try again.