0

I have a shapefile that contains a field of decimal numbers between 0 and 1. I wanted to stylise based on the numeric value however the "null" values of the field have defined it as a text field so won't give me that option.

I thererefore need to have the contents of that field defined as numeric. I have deleted the null values so everything is now a decimal number and am trying to find an easy(ish) way to convert the field from text to numeric.

The best way to do this seemed to be to create a new numeric field in ArcGIS Pro and then use field calculation to populate it with the contents of the current text field. This has half worked as I've been able to copy those numbers across to the new field but the issue is that it has rounded anything below 1 down to 0. It shouldn't be doing this as I have included 2 decimal places in the new field structure.

Any ideas on how I can resolve this without having to create a new csv file and link it?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Aug 29, 2024 at 9:51
1
  • Shape files do not allow null values, so please clarify what type of data source you are working with. Commented Aug 29, 2024 at 13:38

1 Answer 1

0

I would say the sequence you have done is correct, although I found I had to select the rows that were not null to run the calculate field tool, otherwise it errored on the null value.

So I added a field of type double, set precision to 7 and scale to 2 then ran the following below. I did not get any rounding.

Field calculate

answered Aug 29, 2024 at 10:29

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.