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.

  • What happens if you have more than one raster cell with a value of 200? – Jae Aug 27 '17 at 10:10
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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