@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.
@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.
sounds good mark, will give it a try. thanks
@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.
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
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
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.
@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.
@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