2

How to get the location (X and Y) of the raster's cell based on selected value in ArcGIS.

For example, I have a raster, which has the min value 100 and maximum value 300, If I want to get the location of a pixel which has the value 200, how to reach on a particular cell in ArcGIS.

I have tried it using properties of the raster, but the function is returning the Mean, Max, Min value.

1
  • What happens if you have more than one raster cell with a value of 200?
    – Jae
    Commented Aug 27, 2017 at 10:10

2 Answers 2

4

One inelegant way to do it might be:

  1. Use a “Raster Calculator” conditional statement like Con(YourRaster == 200, 200) that would create a new raster with just those cells matching your value criteria; all other cells would be no data.

  2. Convert that raster to points.

  3. Use the “Add XY” tool (or Calculate Geometry) to add coordinates for the points you’ve just created.

Depending on how many cells you’re expecting to match your value criteria, this will work to varying degrees. But what about if there are multiple, or none?

A more elegant solution would be to script using ArcPy/NumPy as arrays from which you could get the index of elements meeting your value criteria.

0

Use Extract by Attributes, then use Raster to Points. It should give you what you need, but Calculate Geometry for XY would be the next step.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.