Skip to main content
Solved

road network extraction


Forum|alt.badge.img

Hi,

I am trying to build a network using the OSM roads dataset. From this i would like to extract all roads within a set distance from a point. This should not be a simple as the crow flies buffer selection but by road distance on each road from the point.

Thoughts?

Best answer by mark_f

@lemzip have a look at the NetworkCostCalculator transformer. Set the Weight Type By Length and output cost by Z value. Then test the Z values for your distance.

 

 

View original
Did this help you find an answer to your question?

10 replies

Forum|alt.badge.img+2
  • Best Answer
  • July 30, 2017

@lemzip have a look at the NetworkCostCalculator transformer. Set the Weight Type By Length and output cost by Z value. Then test the Z values for your distance.

 

 


Forum|alt.badge.img+2
  • July 30, 2017
mark_f wrote:

@lemzip have a look at the NetworkCostCalculator transformer. Set the Weight Type By Length and output cost by Z value. Then test the Z values for your distance.

 

 

 

P.S. You'll need to reproject the OSM from geographic lat long for a measure of distances or consider custom transformer GeographicLengthCalculator.

Forum|alt.badge.img
  • Author
  • July 31, 2017

sounds good mark, will give it a try. thanks


redgeographics
Celebrity
Forum|alt.badge.img+48
mark_f wrote:

@lemzip have a look at the NetworkCostCalculator transformer. Set the Weight Type By Length and output cost by Z value. Then test the Z values for your distance.

 

 

To add to @mark_1spatial's answer: I have recently done something quite similar, also using the NetworkCostCalculator and assigning educated guesses for the max speed in cases where it wasn't available in OSM. I've also used the Overpass Turbo API to extract only the roads in a certain radius (determined by assuming somebody driving at 20% over the overall max speed in a straight line for x minutes) around my starting point.

 

 

You may also want to look into parallel processing on the NetworkCostCalculator, it'll save you a lot of time.

 

 

See this thread for some more discussion.

 

 

 


Forum|alt.badge.img
  • Author
  • August 4, 2017
redgeographics wrote:
To add to @mark_1spatial's answer: I have recently done something quite similar, also using the NetworkCostCalculator and assigning educated guesses for the max speed in cases where it wasn't available in OSM. I've also used the Overpass Turbo API to extract only the roads in a certain radius (determined by assuming somebody driving at 20% over the overall max speed in a straight line for x minutes) around my starting point.

 

 

You may also want to look into parallel processing on the NetworkCostCalculator, it'll save you a lot of time.

 

 

See this thread for some more discussion.

 

 

 

@redgeographics

 

 

Any chance you could kindly share the workbench part for the OSM/network cost work? Still struggling with this.

 

 

Thanks

 


Forum|alt.badge.img+2

I'd recommend validating the network first. All the FME network transformers assume that the network is clean. All intersections are fully noded and junctions occur at endpoints, not mid-point vertices. Use the NetworkTopologyCalculator to help validate the network and look for segments that do not connect


redgeographics
Celebrity
Forum|alt.badge.img+48
lemzip wrote:
@redgeographics

 

 

Any chance you could kindly share the workbench part for the OSM/network cost work? Still struggling with this.

 

 

Thanks

 

I'll try and dig it up on monday.

Forum|alt.badge.img
  • Author
  • August 7, 2017
redgeographics wrote:
I'll try and dig it up on monday.
@redgeographics

 

thats brilliant, thanks!

redgeographics
Celebrity
Forum|alt.badge.img+48
lemzip wrote:
@redgeographics

 

thats brilliant, thanks!
Here you go. I'm using the OpenCage geocoder (removed my API key) to geocode an address, build a buffer around that and use that to extract data from OSM through the Overpass API (many thanks to @pimverver for figuring that one out). Then I'm adding some more data, built-up areas for The Netherlands, so I can make a guesstimate of the max speed in case it's not in OSM. The resulting road data is then cut in 4 slightly overlapping chunks to facilitate parallel processing. The NetworkCostCalculator does the actual work and I'm storing the drivetime distance as Z-values, then a ContourGenerator with some cleanup to end up with something that looks reasonably accurate and correct.

 

drivetime-sample.fmw

 

 

The problem is that it's still taking a fair amount of time to process, the parallel processing does make a big difference but it still takes my Mac 2 minutes to calculate an 8-minute drivetime contour and the processing time increases exponentially as the drivetime increases.

 


Forum|alt.badge.img
  • Author
  • August 10, 2017
mark_f wrote:

@lemzip have a look at the NetworkCostCalculator transformer. Set the Weight Type By Length and output cost by Z value. Then test the Z values for your distance.

 

 

@redgeographics Thanks for the workbench. I have got it working but just a query, it looks like it is not including roads from OSM that should be within the aloted contour. Is this due to it being non node ended?

 

 

Thanks

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings