Select to view content in your preferred language

Cost path values are smaller than cost surface

4221
12
Jump to solution
04-12-2015 05:38 PM
BayuWidyasanyata
New Contributor II

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]

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

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?

View solution in original post

12 Replies
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
BayuWidyasanyata
New Contributor II

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

costpath.png

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)

costsurface.png

Here is the python cost path parameter used:

costPath = arcpy.gp.CostPath_sa(DPath, CostDis_shp9, COSTBACKLINK, CostPat_shp6, "EACH_CELL", "FID")

Thanks,

0 Kudos
DanPatterson_Retired
MVP Emeritus

are your maps in unprojected coordinates (ie in decimal degrees)?

0 Kudos
BayuWidyasanyata
New Contributor II

Did you mean my cost surface layer?

I checked it was GCS_WGS_1984.

costsurface_degree.png

Is it correct?

0 Kudos
DanPatterson_Retired
MVP Emeritus

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?

BayuWidyasanyata
New Contributor II

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!

0 Kudos
DanPatterson_Retired
MVP Emeritus

Make sure you use the appropriate Project tool and not the Define Projection tool

0 Kudos
BayuWidyasanyata
New Contributor II

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?

0 Kudos
DanPatterson_Retired
MVP Emeritus

762 ish meters ...

0 Kudos