1

I have a multiband raster (RGB) and I'd like to select out the watercourses to create a new raster.

enter image description here

Examining the data it seems I can do so by selecting blue > 100, Red <100, Green <100. Is there a way to create a new raster based on an sql query, where all pixels that meet the criteria are differentiated from those that don't?

I have the spatial analyst extension. I saw the Extract By Attributes tool, but this just allows me to select by Value.

enter image description here

Ideally my end product would be a binary raster that differentiates between those pixels that meet the given criteria and those that do not.

  • I can remember someone telling me this was 'easy' in photoshop (and GIMP too I suppose), it might be worth your while looking around in those forums; beware that raster editors destroy georeference in GeoTIFFs - they don't recognize Geo Tags but instead of just maintaining the values they don't understand (garbage-in garbage-out) they tend to not write them... The good news is that World files aren't affected so you can use TFW files to bank your georeference. – Michael Stimson Dec 20 '17 at 5:28
1

Add each band to ArcMap individually. Use Con to evaluate your expression in the raster calculator:

Con(("Blue" > 100) & ("Red" < 100) & ("Green" < 100), 1)

Which will output a raster of 1 and NoData. If you want 1 and 0 output, just use:

(("Blue" > 100) & ("Red" < 100) & ("Green" < 100))
1

I have had no success trying to do what you are doing. I use image classification now and have reasonable success when features I am looking to pull are very different than their surroundings; it appears that this is your case:

http://desktop.arcgis.com/en/arcmap/latest/extensions/spatial-analyst/image-classification/image-classification-using-spatial-analyst.htm

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.