Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I was wondering if there is a way to reduce the precision for display of a DOUBLE field of a number of fields, in a shapefile. I have 25 fields and would like to do it as automatically as possible but I'm not certain where to start. I don't particularly want to create new fields and transfer over the values manually. I am displaying the text using dynamic text on data driven pages . I just want to display it with two rather than 5-6 decimal places.

This is what the attribute table looks like, along with the relevant portion of layout:

enter image description here

Here is the field properties box: enter image description here

share|improve this question
1  
Are you sure these data are in a shapefile? Shapefiles don't have fields of type double: they store all numbers as ASCII strings with fixed width and fixed number of decimal places. Also, why do you make a reference to the Field Calculator? The rest of the question seems to have nothing to do with that. –  whuber Aug 10 '11 at 15:50
    
I assumed that it was possible to do that with field calculator. Is that not the case? It is a shapefile. I created all of the fields myself with a python script and chose them as DOUBLE. I will append another screenshot edit: I removed the reference to field calc in the question –  Emily Aug 10 '11 at 15:53
1  
If you just hit the number icon in that printscreen you posted Emily, do you not have the ability to reduce the number of decimal placed right in there? –  Dano Aug 10 '11 at 16:00
    
Ahh, yes, that is what I was looking for. Is there a way to do this quickly for all 25 fields? –  Emily Aug 10 '11 at 16:02
1  
Ok - I'm going to post this as an answer to make up for my BAD ANSWER then. Sorry I didn't read more carefully Emily –  Dano Aug 10 '11 at 16:05

2 Answers 2

up vote 5 down vote accepted

A couple of ways to accomplish these types of tasks.
1. Round ([myfield], 2) This works for field calculator, labeling, etc.
2. in the layer dialog left click the label column and select format labels
3. select the number format in the field properties and change the number of decimals.

screen1
Screen2

share|improve this answer

CORRECTION TO BAD ANSWER:

Just hit the circled tab in my printscreen.

enter image description here

share|improve this answer
    
I was trying to do this without creating new fields. –  Emily Aug 10 '11 at 15:56
    
Sorry. Sometimes I read too quickly and don't do enough "absorbing of what I've read". My bad! –  Dano Aug 10 '11 at 16:02

Your Answer

 
discard

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.