-3

I have a layer of 5ft contour lines, and it includes a field called "Elevation" that has the elevation of that particular line in feet, (ex: 1555, 1560, 1565 etc.). I want to only show lines for every 10ft of elevation though. Is there a definition query I can put on the Elevation field to give me only lines for every 10 feet of elevation?

Vince
  • 20,017
  • 15
  • 45
  • 64
  • 3
    You can use a modulus function, but we can't really help until you specify the data source type, the datatype of the "Elevation" field, and the GIS software involved (with version) – Vince May 05 '16 at 21:07
  • 2
    the answer will be some variation of: mod(elevation, 10) = 0 but as @Vince says without more details we can't give you exact syntax – Dowlers May 05 '16 at 21:17
  • 2
    also have a look at this: http://gis.stackexchange.com/questions/58224/how-do-i-select-only-those-contours-who-heights-are-integers – Dowlers May 05 '16 at 21:17
  • If you're going to make extensive edits, please don't forget to incorporate changes that have been requested to make the question answerable. – Vince May 07 '16 at 03:52

1 Answers1

2

Pretty simple. If your values are in 5 foot intervals and your elevation field is a numeric field, you can use a modulus query in the Definition Query to only show those records whose elevation value is even or odd.

In your case, you're looking for even numbers.

For a Personal Geodatabase, you'd use:

[Elevation]/2 MOD 2

For Shapefiles or File Geodatabases, use:

MOD ("Elevation",  2)  = 0

Conversely, to select odd values you'd want to do the following: For a Personal Geodatabases, use:

[Elevation] MOD 2

For Shapefiles or File Geodatabases, use:

MOD ("Elevation",  2)  = 1
MrBubbles
  • 833
  • 5
  • 15
  • +1 although [Elevation]/2 MOD 2 doesn't work for me in a Personal GDB - I have to use ([Elevation] + 1) MOD 2. – Midavalo May 07 '16 at 05:40