Select to view content in your preferred language

Zero-based numbering vs. one-based numbering

608
1
03-06-2022 08:04 PM
Status: Under Consideration
Labels (1)
Bud
by
Esteemed Contributor

Could ESRI consider adding a blurb to the docs somewhere that explains when zero-based numbering is used vs. one-based numbering?

For example, if I understand correctly, zero-based numbering is a software thing (at least, software that’s built on top of C++). It’s used for:

- ArcGIS Pro geometry: part and vertex numbers
- ArcObjects in general
- ArcPy/Python, Arcade (i.e. December is month 11), and other procedural languages used in ArcGIS.

Whereas one-based numbering is used in the database:

- All databases supported by ArcGIS (including their procedural languages like PL/SQL)
- Spatial types like SDE.ST_GEOMETRY


Reason:

For non-computer scientists, it can be confusing to switch back and forth between the two numbering systems, without having background info about why. For example, I finally got used to scripting in ArcGIS using zero-based numbering, but when I started using the SDE.ST_GEOMETRY db type, I didn’t understand why ESRI would have switched to one-based numbering. It seemed inconsistent. I later realized that it’s a database convention, not an ArcGIS convention.

A bit of info in the docs might help avoid confusion. Even though it’s not specific to the ArcGIS world, it’s still something that GIS practitioners can trip over.

1 Comment
MarkZollinger
Status changed to: Under Consideration