Select to view content in your preferred language

Sample (spatial analyst) bug in 10.5.1.7333

826
7
01-26-2018 10:34 AM
MilesSpathelf1
Emerging Contributor

I have an issue where the sample tool incorrectly reports values from a raster when using a point file.  For example a point lies entirely within a raster cell and the sample tool provides a result of "49" when the identify tool correctly provides a results of the actual cell value of "19"

Tags (1)
0 Kudos
7 Replies
MilesSpathelf1
Emerging Contributor

Pertinent files

0 Kudos
DanPatterson_Retired
MVP Emeritus

Your tiff... info reports a value for R, G, B

Your shapefile just has totally unrelated attributes.

What values are your expecting? and by chance are there other layers in your dataframe?

MilesSpathelf1
Emerging Contributor

The Tiff has 6 bands

The point shapefile is used for sampling and wouldn't need to have related attributes.

No other layers are in my data frame

For example when I sample band 5 alone I get these values from the Sample tool in the output table

topo_seque 1 (alluvial site) - 49

topo_seque 2 (mid slope) - 48

topo_seque 3 (upper slope) - 44

From the identify tool I get these values by identifying from all layers and selecting each point ID in turn

ID 1 (alluvial site) - 53

ID 2 (mid slope) - 45

ID 3 (upper slope) - 19

0 Kudos
DanPatterson_Retired
MVP Emeritus

Do your sample results look like this? I only have 10.6 available.  What looks different is what is assigned to RGB if you have 5 bands

MilesSpathelf1
Emerging Contributor
topo_sequeXYNenanaNenana_1Nenana_12Nenana__13Nenana__14Nenana__15
2401429.029482000007163313.1416800000048.0000000000038.0000000000027.0000000000086.0000000000045.0000000000024.00000000000
3401266.545791000007164533.6916500000044.0000000000028.0000000000021.0000000000039.0000000000019.0000000000012.00000000000
1401537.772844000007160962.5416800000049.0000000000033.0000000000026.0000000000083.0000000000053.0000000000026.00000000000

Hmm, I do get the same results as you when I bring in the tif as all bands instead of just band 5.  In my table the Nenana__14 is the same as the original band 5.  This reports the correct values unlike when I ran the sample tool on just band 5.  In that case I only selected band 5 within the tif to bring into ArcMap and ran that with the sample tool.

0 Kudos
DanPatterson_Retired
MVP Emeritus

I wouldn't have just isolated a single band for some reason... perhaps what band 5 is another column... who knows... but if the whole is right then 10.5 and 10.6 are reporting the same (I wouldn't use the info tool as defacto standard since I was getting only an r,g,b value and I didn't know what it chose for r, g or b)

MilesSpathelf1
Emerging Contributor

Sorry I don't follow your logic.  The sample tool and info tool bring back the same values when the sample tool is ran on the entire multiband tif file.  The sample tool brings back different values when ran on just band 5.  I'm not concerned about what was chosen for r,g, and b as the display option.

For some reason there is a difference in the results with the sample tool depending on if the multiband file is brought in as a whole or if just one band is added.  That seems like it could pose a serious problem. 

Edit: As it turns out it is reporting the correct values for band 1 even though I only brought in band 5.  I think that's the issue.

0 Kudos