I am working with a DEM that has a bit more data than I actually need. Specifically, even the lowest resolution version is 100ft and I'm trying to reduce it down to 500ft or even 1000ft intervals. I should disclose here that I am pretty much a total noob to both ArcMap and geodata generally at this point.

After digging around on the internet, I think the steps to doing this are:

  1. Double click on the 100 Foot layer in the table of contents window
  2. Click on the definition query tab
  3. Click the Query Builder button
  4. Create a query like ELEVATION%500 = 0
  5. Profit

Unfortunately that doesn't seem to work. Taking a look at the data (right click on 100 Foot layer -> open attribute table) it appears that the elevation for each layer is not simply a number ("0"). Instead, it is a number and the unit of measure that every number in that column uses ("0 ft"). I assume this is what is preventing me from coming up with any matches.

If I am, in fact, on the right path here, is there a way to construct a query that ignores the " ft" portion of the data (or just strips out " ft" from the field)? Alternatively, if I am not, in fact, on the right path here, does anyone have any suggestions for a potentially more fruitful line of inquiry?

  • You are on the right track using definition query. If your range of values is reasonable, just treat the "data" as strings and the query should work as ELEVATION IN ('500 ft', '1000 ft', '1500 ft',...) – mikeLdub Mar 4 at 20:45
  • The range is reasonable. I tried "ELEVATION IN ('500 ft', 1000 ft', '1500 ft', '2000 ft', '2500 ft', 3000 ft', '3500 ft')" and then got this error: One or more layers failed to draw: FDO error: 0 [Failed to label layer 100 Foot for class Default.] An invalid SQL statement was used. An invalid SQL statement was used. [Contours_100ft] An invalid SQL statement was used. [SELECT NAME, Shape, OBJECTID FROM Contours_100ft WHERE ELEVATION IN ('500 ft', 1000 ft', '1500 ft', '2000 ft', '2500 ft', 3000 ft', '3500 ft')] Greene County 2 Foot Contours: 100 Foot: An invalid SQL statement ... – mweinberg Mar 4 at 22:19
  • Another (potentially useful?) data point: When I use "ELEVATION IN ('2000 ft')" it will show me just the 2000 ft lines. When I use "ELEVATION IN ('1000 ft')" it won't show me any lines, even though there are '1000 ft' entries in the attribute table. – mweinberg Mar 4 at 22:32
  • It looks like the data is messier than I thought. The good news is that the 'ELEVATION IN ("value", "value", "value")' structure does appear to be working. The bad news is that I'm going to need a lot more values. But that's my problem. Thanks for the pointer! – mweinberg Mar 4 at 22:40
  • It's a vector layer, right? Add a numeric field and carry over the values with the field calculator, by splitting on the space and taking the first item, e.g. !ELEVATION!.split()[0]. Then you can create a logical query. – mikewatt Mar 4 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.