How does one add a field to an ArcGIS feature class with a boolean data type? That is an attribute where the allowed value is only one of a pair such as 1/0, Yes/No, On/Off, Present/Not-present, etc.
A boolean data type is not available in the Data Type pick-list.
Answer
Many DBMSes including Oracle do not have a Boolean column type, so this may explain why there is no Boolean field type in ArcGIS either.
@Emily's suggestion of using a coded value attribute domain is a good one and I believe this is the ESRI-recommended best practice.
The only other suggestion I would have is to use a CHAR
field of length 1, as this way you can use the slightly more descriptive "Y" or "N", or "T" or "F", rather than 1's or 0's, and, according to this article, in Oracle 1-character CHAR
columns are actually more efficient than 1-digit NUMBER
columns.
No comments:
Post a Comment