fixed a strange behaviour on OSM data covering the US.

This commit is contained in:
Dennis Luxen 2010-08-13 09:21:58 +00:00
parent 3bdfd1437b
commit d8701a7e41

View File

@ -221,7 +221,7 @@ _Way _ReadXMLWay( xmlTextReaderPtr& inputReader, Settings& settings ) {
string route( (const char* ) value ); string route( (const char* ) value );
if (route == "ferry") { if (route == "ferry") {
for ( int i = 0; i < settings.speedProfile.names.size(); i++ ) { for ( int i = 0; i < settings.speedProfile.names.size(); i++ ) {
way.maximumSpeed = 25; way.maximumSpeed = 5;
way.usefull = true; way.usefull = true;
way.direction == _Way::oneway; way.direction == _Way::oneway;
} }
@ -293,6 +293,10 @@ _Way _ReadXMLWay( xmlTextReaderPtr& inputReader, Settings& settings ) {
} }
} }
} else { } else {
if ( xmlStrEqual( k, (const xmlChar*) "access" ))
{
if ( xmlStrEqual( value, ( const xmlChar* ) "private" ) == 1)
if ( xmlStrEqual( value, ( const xmlChar* ) "private" ) == 1 if ( xmlStrEqual( value, ( const xmlChar* ) "private" ) == 1
|| xmlStrEqual( value, ( const xmlChar* ) "no" ) == 1 || xmlStrEqual( value, ( const xmlChar* ) "no" ) == 1
|| xmlStrEqual( value, ( const xmlChar* ) "agricultural" ) == 1 || xmlStrEqual( value, ( const xmlChar* ) "agricultural" ) == 1
@ -309,7 +313,7 @@ _Way _ReadXMLWay( xmlTextReaderPtr& inputReader, Settings& settings ) {
way.access = true; way.access = true;
} }
} }
}
if ( k != NULL ) if ( k != NULL )
xmlFree( k ); xmlFree( k );
if ( value != NULL ) if ( value != NULL )