2

I'm trying to calculate percentages of land cover in census blocks using the field calculator.

I have one field (Block_SF) that is the total square footage of the census block and another field (Imp_SF) that is the square footage of impervious surface in each block.

There is a third field (Imp_Pct) that I would like to use to calculate the percent of coverage in each block that is impervious surface.

The math is fairly simple - impervious sf divided by total square foot should yield a decimal that I can use as the percentage. However, when I use field calculator to do so, the results are always either a zero or a one, which seems to indicate that it is rounding to the nearest integer. I've tried different formats for the column - short integer and long integer - and have gone into the numeric values and made sure the decimal points were as many as four. Still the same result.

Any idea what I'm missing to get the decimal values I'm looking for?

attribute table

2
  • 2
    short integer and long integer - Integer fields do not store decimals. You need to use a Double field type.
    – Midavalo
    Commented Nov 28, 2017 at 17:56
  • If you right click on the field name for percentage and go to the properties window, you'll see that it's most likely Short or Long, as @Midavalo noted. When you do re-create the field as a Double, you can choose how many decimal places to display either in the table or in labeling from the same Field Properties window.
    – AlecZ
    Commented Nov 28, 2017 at 18:01

1 Answer 1

1

As commented by @Midavalo:

short integer and long integer - Integer fields do not store decimals. You need to use a Double field type

You cannot store decimal values using Short Integer or Long Integer field types. If you want to store decimals, you should create a field of type Double or Float.

Looking at the help of ArcGIS field data types it says:

In choosing the data type, first consider the need for whole numbers versus fractional numbers. If you just need to store whole numbers, such as 12 or 12,345,678, specify a short or long integer. If you need to store fractional numbers that have decimal places, such as 0.23 or 1234.5678, specify a float or a double

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.