Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have two datasets: point feature class and raster (stored in file geodatabase).

The spatial extent of the raster is smaller than the point dataset.

Is there a way I could select (or create new, temporary layer/feature class) only the points that fall into the extent of the raster?

Basically I'd like to have an output similar to Clip or Intersect tools, but they don't seem to accept rasters as inputs.

Is there readily available arcpy tool(s) that could be used to achieve that? Or would it require some custom solution?

share|improve this question
Related:… –  Chad Cooper Aug 28 '12 at 14:00
@ChadCooper Thanks. Your answer to this question might be indeed good solution. Will give it a go. –  radek Aug 28 '12 at 14:19

3 Answers 3

up vote 6 down vote accepted

The attached script which utilizes Raster Domain will work for you.

# Import arcpy module
import arcpy
from arcpy import env

# Check out any necessary licenses

# Set Workspace
env.workspace = r"C:\data"

# Create a polygon around the raster boundary
arcpy.RasterDomain_3d("inRaster.tif", "outShp", "POLYGON")

# Intersect points with boundary polygon
arcpy.Intersect_analysis(["outShp.shp", "points.shp"], "intersect_output", "ALL", "", "INPUT")

For a direct, non ESRI approach, check out Geospatial Modelling Environment's (GME) isectpntrst (Intersect Points With Raster).

share|improve this answer

You could use the tool "Raster to Polygon" from the "Conversion Tools". As output you get a shapefile with the extent of your raster image. With this shapefile and the other one you could run the intersect command.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.RasterToPolygon_conversion("zone", "c:/output/zones.shp", "NO_SIMPLIFY",
share|improve this answer
Thanks. Was thinking about this option as well and it indeed might be a viable solution. –  radek Aug 28 '12 at 13:29

Use these tools from ArcToolbox:

1-Spatial Analyst Tools> Raster Creation> Create Constant Raster ("Constant value" can
  be 0.5, 1, ... and "Output extent" must be your overlay raster )

2-Conversion Tools> From Raster> Raster to Polygon (Use output raster from step1)

3-Analysis Tools> Overlay> Intersect (the polygon with the points)


and here is the model:enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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