2

I have a fairly large contour feature class (about 500,000 contours) and I'm trying to select out just the 0.5m contours from the set. I can see from the attribute table that there's plenty of such contours but when I apply a definition query to select out these features it returns zero results. I've used the same method on a couple of other feature classes and it seemed to work fine. I'm wondering if anyone's encountered this before or knows of a work around.

This is in ArcGIS Pro 2.9.

The query is simply Contour = 0.5 and the datatype of the Contour Field is Double.

0

1 Answer 1

2

As commented by @Vince, multiplying the target value to remove the decimal and then casting as an integer seemed to solve the problem.

I modified my SQL statement to read:

cast((Contour * 10) as int) = 5

and it worked like a charm.

1
  • 1
    An alternative approach is contour > 0.49 and contour <0.51.
    – Hornbydd
    Commented Aug 14, 2022 at 11:05

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.