2

I'm new to QGIS and I'm having a strange problem with its service area tool. I have a line layer representing a network of roads, imported from openstreetmaps. If I calculate the service area from a point using distance, then it works as expected. For example, if I set the cost to 1000 meters, it returns a line layer with all the paths of 1000 meters from that point.

However, if I try to get the service area based on travel time instead, then no matter what speed I set for the features, or cost I set in terms of time, it always returns a line layer with every reachable road highlighted. It's as if it's assuming infinite speed of travel, so every reachable point is reachable in any amount of time.

What am I doing wrong?

The data set in this example is from St. Pierre and Michelon, acquired here: OSM data

The roads were extracted from the raw pbf file using osmosis with this command: osmosis --read-pbf .\saint_pierre_et_miquelon-latest.osm.pbf --tf accept-ways highway=* --tf reject-relations --used-node --write-xml example.osm

enter image description here

enter image description here

enter image description here

enter image description here

1 Answer 1

3

There are at least two problems:

  1. Travel costs for fastest travel type are hours - so a value of 0.5 means 30 minutes.

  2. A just superficial look at your screenshot shows that your network layer is in EPSG:4326, so layer units are in degrees. If I run the tool with shortest travel type, the distance are calulated in ellipsoidal distances. So, whatever CRS your layer is in, you'll get more or less "correct" distances.

    Still, I would heavily advice against using EPSG:4326 for any measuremetns. A distance of 0.5 in this CRS means 0.5 degrees, what is quite a large distance (depending on the exact part on the globe you're working). Degrees never make sense for distance measurements. Reproject your layer to a projected CRS suitable for measurements in your area of interest - e.g. the local UTM zone.

1
  • Thanks for your help. I included two examples because the shortest distance calculation appears to work as expected, while calculating the service area based on travel time (half an hour in the example) doesn't do what I'd expect. I reprojected the layer to St Pierre Miquelon 1950 geographiques (dms) and got the same behavior. Distance works, but travel time doesn't. Dec 7, 2023 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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