Subscribe to this thread
Home - General / All posts - TileDistanceMakeSlope - least cost/lowest gradient path between two points
GeoKeys12 post(s)
#20-Jun-20 00:51


I want to generate 1st pass route for a pipeline between two points. The TileDistanceMakeSlope expression seems to be at least part of the solution. I tried the expression:

TileDistanceMakeSlope([dtm], -5, 5, 1, 0, 2,[StartEnd])

[dtm] is the raster/image file

[StartEnd] is a vector (point file) it has two points

Running the expression above returns Cannot parse query.

Can someone please tell me what I am doing wrong and/or point me to a worked example?



6,364 post(s)
#20-Jun-20 07:00

Use Closest Rasters ("Path Distances"), not slopes. See the Videos page for examples.

GeoKeys12 post(s)
#21-Jun-20 08:39

Thanks for your advice. I followed the example but didn't really get the results I was expecting. It is probably because the two points are too far apart (+100km) for Manifold to identify a relationship. I also tried putting additional points to guide it some more, but it didn't really help.


6,364 post(s)
#21-Jun-20 15:05

It is probably because the two points are too far apart (+100km) for Manifold to identify a relationship.

? Most likely not. Vancouver Island is substantially longer than 100km, but as the video example shows there is no problem building paths around that.

If you provide details on your data, what you are doing, what happens as opposed to what you expected, etc., then perhaps somebody in the forum can offer some tips.

GeoKeys12 post(s)
#23-Jun-20 01:45

Not sure what I was doing wrong the first time, but I did get the watershed of the slope approach described in the example to work - thanks.

The idea was that I would be able to generate different options for pipelines through analyses of a dem. Something like the examples - create a slope map, create barriers where slope was greater than 10 degrees and where there were restricted areas (eg populated places), then determine least cost lines between the two points. I could then adjust to utilise existing infrastructure - roads/powerlines etc. Then tie the answers together with some elevation profiles of the different lines.

The answer is not always the least cost path (based on distance and slope) but will be one of the options.

789 post(s)
#20-Jun-20 21:23

Somewhere on my priority list I have something similar in mind. I'm looking for possible walking paths used by the indigenous Comanche people. By and large the Spanish and French used the same paths and those paths later got paved. Then they were bypassed by more modern roads blasting through the hills instead of around them. Some paths were lost to posterity and many were never paved. Ranchers report finding native, Spanish, and French artifacts in the hills on their ranches, so clearly those people were headed somewhere.


9,470 post(s)
#22-Jun-20 07:36

TileDistanceXxx functions return tables, you have to call them using CALL TileDistanceXxx..., that's typically done in a SELECT or INSERT. See the code produced by the Distance templates in the Transform pane for example use.

The distance functions produce a raster with each pixel storing either the length of the path from the pixel to the closest source location or the direction you should go towards that location or the ID of that location. So, to find, say, the length of the shortest path from Start to End, you have to put End into a drawing, then produce a distance raster and look into the pixel under Start.

Hope this helps a little.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.