Select to view content in your preferred language

Clip by Raster Value?

1933
1
11-15-2011 02:02 PM
MichaelRyan3
Emerging Contributor
Hello,

Is there a way to clip a points file based upon a raster VALUE using script? The code below works to clip all points within 'rasterFile'. But rasterFile contains values of both 1 and 0, and I would like to specifically clip where rasterFile has a value of 1.

Thanks for any help!

import arcgisscripting
gp = arcgisscripting.create()

gp.Clip_analysis("points", "rasterFile", "outputFile")
Tags (2)
0 Kudos
1 Reply
JakeSkinner
Esri Esteemed Contributor
You can create a feature layer from the 'rasterfile' with a query specifying '"VALUE" = 1'.  Then clip the points from the feature layer rather than the rasterfile.
0 Kudos