1

I'm using the Finnish official Department of Transport's "digiroad" road network vector file, which has all kinds of roads, cycle paths etc on it, but I can't use Road Graph on it.

If I create a new line vector and draw some lines, I can use Road Graph on it.

I don't see how the digiroad is different, other than having several different types of roads. Why can't Road Graph utilize it (it doesn't even let me choose it)?

I'm a beginner, but I've used the same material before on arcgis.

  • Can you provide test data? – underdark May 22 '15 at 19:18
  • I've selected and exported just a bit of the vector material and it's available here. It's under this licence, and was made by the Finnish Transport Agency, and was modified by me. If you want to categorize it by type of road, use the VAYLATYYP column. – pasipasi May 25 '15 at 6:11
2

I might have found the culprit: the code checks the wkbType of the layer https://github.com/qgis/QGIS/blob/master/src/plugins/roadgraph/linevectorlayerwidget.cpp#L135

if ( vl->wkbType() == QGis::WKBLineString
     || vl->wkbType() == QGis::WKBMultiLineString )
  mcbLayers->insertItem( 0, vl->name() );

but it returns a weird value for the digiroads

>>> l.wkbType()
-2147483646

while it should be either

>>> QGis.WKBLineString
2
>>> QGis.WKBMultiLineString
5

One way I found to fix it is to run Vector | Geometry | Multipart to Singlepart.

  • You solved my issue, thanks. It seems that data sometimes has these quirks that a novice will have trouble with. – pasipasi May 26 '15 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.