0

I have one point type feature class and another feature class with a polygon. Using ArcGIS Pro, in the feature class type point > Definition Query > create new definition query in SQL. I want as a result the points that are inside that polygon. Only SQL code will be used.

enter image description here

2
  • 1
    Welcome to GIS SE. As a new user, please tale the Tour. Your Question is not particularly clear. You can only have a spatial constraint in an RDBMS which supports spatial operators (not shapefile or file geodatabase), but if the geographic boundary is encoded in a attribute, the SQL would be very basic.
    – Vince
    Jan 19, 2023 at 16:43
  • What kind of geodatabase? Oracle 18c? File geodatabase?
    – User1974
    Feb 27 at 23:16

2 Answers 2

0

Definition queries work with attributes so your points need to be attributed with the polygon ID. You achieve that by using the Spatial Join tool then you can apply the definition query.

But if what you want is a "quick a dirt technique" for hiding all points outside your polygon then visually you can use the clipping properties of the Map.

Before:

Catchment

Setting up visual clipping:

clip

Results:

Results of clip

Be aware such data is just being visually clipped so if you do any geoprocessing then all points would be included.

0

With Field Calculator you can set a specific attribute using Select by Location between the polygon and the point.

Then set your DQuery using this new attribute.

If you don't want to make set a new attribute, you can right click on the layer with the selected points > selection > create new layer w/ selected features.

Visual Clipping is also a good option.

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.