Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to show points that only contain whole numbers in a column (eg. 009, 010, 011 and NOT 9,1; 9,2; 9,3...) in ArcGIS 10?

share|improve this question
Are you doing a select by attribute in ArcMap? if so which version of ArcGIS desktop? You need to give us more details about your data and the software that you are using. – Devdatta Tengshe Mar 6 '13 at 9:54
Is the data in the km column stored as a string or a number? – user3461 Mar 6 '13 at 11:24

This assumes the km column stores numbers, not strings.

Open the table.

Add a new column and name it whatever you want, I'll use wholenum in this example.

Right-click the wholenum column and choose Field Calculator.

Set the Parser to Python and put a check in Show Codeblock.

Enter this formula in the Pre-Logic Script Code field:

x = 0 
if [km] MOD 1 = 0 then
x = 1

Put x in the km= field.

Click OK to close the Field Calculator.

Set this Definition Query on the layer: wholenum = 1.

Now it will only display points with whole number values. You could take similar steps to show every 5 km or 10 km point, by using MOD 5 and MOD 10 respectively, to show fewer points at even smaller scales.

share|improve this answer

I have just had a similar problem and used this work around.

Open the layer properties and select Definition query and use the expression below.


This will remove all rows with a . in the field. As long as the kilometer points aren't whole numbers like 1.0 or 2.0 etc. this should work.

share|improve this answer

Please try this (if data in the km column is stored as a number):

[km] mod 1 = 0

The modulo operation finds the remainder of division of one number by another.

share|improve this answer

Yes I want to select by attribute in ArcMap 10. The data contains the km-information of a railway network. The name of the column is "km" and the rows contain the distance from the zero point. Every 100m (000, 0,1; 0,2...) there is a point in my map, but I only want to show the whole km (1, 2...)

So I only want to show every 10th point, that`s why I want to select all the whole numbers. Otherwise the map is too overloaded with points... The km are stored as string! Any ideas?


share|improve this answer
Hello and welcome to the site. You should edit your original question to add this important information, instead of including it in an answer. – user3461 Mar 6 '13 at 11:22

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.