Cost distance Raster not around the source

1977
8
Jump to solution
10-26-2013 11:17 AM
TeresaMolina
New Contributor
Hi,
I'm trying to compute the least cost distance between a source (point A) and several destinations (points B) using as cost surface the slope of a DEM. I've reclassified the slope in 9 categories, and I do not have any value equal to 0 or missing. To compute the cost distance raster I used point A as the source layer, and I limit the maximum distance to 10km. I've computed the cost distance raster directly using spatial analyst toolbox and using python, in both cases when I display the cost distance raster in ArcmMap it appears displaced with respect the source: Point A is not in the center of the raster, but it appears in the border with a high cost associates to its location. Boths layers: source and reclassified slope have the same projection WGS1984_UTM16.
I've tried to do it converting the point to a raster, then the pixel appears again displaced far away from the center of the cost distance raster.

I would like to know if anyone has any clue of what could be wrong. I attach a image of the cost distance raster, the red flag represents the point A or source and the red circle is a 10km buffer around point A.

Thanks for your comments.[ATTACH=CONFIG]28629[/ATTACH]
0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor
Hi Teresa,

I looked at your data and noticed that the TIFF is stored in WGS geographic coordinates, while the point source is projected. If you first project the TIFF to the same projected coordinate system as the source, then reclassify the raster and calculate the cost distance it will be centered in the middle.

[ATTACH=CONFIG]28865[/ATTACH]

The black circle is at a 10km distance of the source. Please note that if you specify the optional "Maximum distance", it refers to the cost and is not a 10km Euclidean distance from the source...

Kind regards,

Xander

View solution in original post

0 Kudos
8 Replies
XanderBakker
Esri Esteemed Contributor
Hi,
I'm trying to compute the least cost distance between a source (point A) and several destinations (points B) using as cost surface the slope of a DEM. I've reclassified the slope in 9 categories, and I do not have any value equal to 0 or missing. To compute the cost distance raster I used point A as the source layer, and I limit the maximum distance to 10km. I've computed the cost distance raster directly using spatial analyst toolbox and using python, in both cases when I display the cost distance raster in ArcmMap it appears displaced with respect the source: Point A is not in the center of the raster, but it appears in the border with a high cost associates to its location. Boths layers: source and reclassified slope have the same projection WGS1984_UTM16.
I've tried to do it converting the point to a raster, then the pixel appears again displaced far away from the center of the cost distance raster.

I would like to know if anyone has any clue of what could be wrong. I attach a image of the cost distance raster, the red flag represents the point A or source and the red circle is a 10km buffer around point A.

Thanks for your comments.[ATTACH=CONFIG]28629[/ATTACH]


Hi Teresa,

This type of error is normally caused by different projections and the lack of a proper transformation. Since you indicate that all your data use the same projection, maybe there are other data with different projections in your TOC (check the dataframe properties) or your environment settings contain a different setting for output coordinate system. Could you check these settings?

Kind regards,

Xander
0 Kudos
TeresaMolina
New Contributor
Hi Xander,
Thanks for you reply. I have checked both, the TOC or data frame has the same projection or coordinate system, and the setting for the output coordinate systems equals the coordinates system of the input data, so I guess that couldn be.
Please, let me know if you come up with other suggestions.
Thanks
Teresa
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Teresa,

Sounds OK. Could you share a small part of your data to see if it can be reproduced?

Kind regards,

Xander
0 Kudos
TeresaMolina
New Contributor
Hi Xander,
I'm sorry for the delay, I was travelling and I didn't have very good internet access.
I attach the DEM without any projection and a shapefile with a source point.
Thank you very much for looking at it!!
Teresa
0 Kudos
curtvprice
MVP Esteemed Contributor
Point A is not in the center of the raster, but it appears in the border with a high cost associates to its location. Boths layers: source and reclassified slope have the same projection WGS1984_UTM16.


Have you defined the Snap Raster environment setting? You also may want to set the Cell Size.

These settings can be critical when working with any raster tool that has vector input.
0 Kudos
TeresaMolina
New Contributor
Thanks for your suggestion. I didn't defined the snap raster environment setting! I'll try to do it and let you know if it works.
Teresa
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Teresa,

I looked at your data and noticed that the TIFF is stored in WGS geographic coordinates, while the point source is projected. If you first project the TIFF to the same projected coordinate system as the source, then reclassify the raster and calculate the cost distance it will be centered in the middle.

[ATTACH=CONFIG]28865[/ATTACH]

The black circle is at a 10km distance of the source. Please note that if you specify the optional "Maximum distance", it refers to the cost and is not a 10km Euclidean distance from the source...

Kind regards,

Xander
0 Kudos
TeresaMolina
New Contributor
Thanks Xander,
Yes,my mistake, I sent you the data without the projection...I was doing exactly what you say:
1. Project raster (TIFF-EDM): to UTM16 DATUM WSG1984
2. Compute slope using the surface tool
3. Reclassify
4. Compute cost distance using the source that I sent you.

I think that the problem was the scale factor: when doing the projection of the source the scale factor was 0,99996000040 and the scale factor for the TIFF is 1. If I change the scale factor to 1 for both sources, the source appears almost in the center.

Thanks again for your comments!
Teresa
0 Kudos