Hi All,
I'm recently do cost path calculations using cost distance and cost surface layer.
My cost surface values are between 1 to 19 (to simplify).
The result that made me confused was the final cost path surface really small, smaller than cost surface's.
Cost path values are around 0.00....
I use cost surface cell size of 30 m * 30 m.
And it calculated with model builder and python script which result the same values.
Is there anything I missed?
Thank you,
[bayu]
Solved! Go to Solution.
No, you should be using projected data when performing these types of analysis that is why your outputs are in decimal degrees. Project your data to a suitable projected coordinate system specifying an appropriate cell size and extent and try the analysis again. Also, why are your origin and destination points so close together?
do you mean the size of the raster is much smaller than the input raster? or do you mean the values are smaller than you expect? Is there a chance that you didn't specify/check you Environments options in the Cost Path tool? or within the script or model that you use? Don't assume that the extents have been set, nor previously set extents maintained. Another possibility is that you path may not have reached a destination because it can't be reached. If you have any screen grabs to show what you mean, they would be useful
Hi Dan,
I mean the values which smaller than I expected.
Below are the screenshots of cost path and cost surface values.
1) cost path
The pic above contains 2 lines (a to b and b to a) with same costpath values (0.004128).
2) cost surface (symbology's unique values: 1 to 25.4)
Here is the python cost path parameter used:
costPath = arcpy.gp.CostPath_sa(DPath, CostDis_shp9, COSTBACKLINK, CostPat_shp6, "EACH_CELL", "FID")
Thanks,
are your maps in unprojected coordinates (ie in decimal degrees)?
Did you mean my cost surface layer?
I checked it was GCS_WGS_1984.
Is it correct?
No, you should be using projected data when performing these types of analysis that is why your outputs are in decimal degrees. Project your data to a suitable projected coordinate system specifying an appropriate cell size and extent and try the analysis again. Also, why are your origin and destination points so close together?
OK, I will change the projection and recalculate.
About the short distance, it's only for a quick calculations 🙂
I will update the result soon.
Thanks!
Make sure you use the appropriate Project tool and not the Define Projection tool
Final result should looks fine now.
It's another lines (path) calculations:
Before: 0.00706413015723
After: 762.926025391
One question,
Is it already correct since it's still contains decimal?
762 ish meters ...