- Feature objects are different than geometry objects.
- geometry objects do not have attributes
- feature objects do have attributes
https://developers.arcgis.com/documentation/common-data-types/feature-object.htm
Features
- Features consist of 2 properties both of which are optional
- attributes
- field values can be: string number, or boolean
- cannot be arrays
- field values can be: string number, or boolean
- geometry
- attributes
- while both are optional, they both need to be included in the json the following are valid
Feature Sets
-
featureSet
is created from feature objects- tables do not return geometry
- spatial references:
- should be set at the top level
- if not set at the top level then it takes the spatial reference of
the first feature’s geometry object
- note that geometry objects don’t have to have spatial reference
- if neither are set it takes on
UnknownCoordinateSystem
- by default, sf and sfc object should set a top level spatial reference
- 3 optional fields:
objectIdFieldName
globalIdFieldName
displayFieldName
Spatial References
https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm
can either be a
wkid
orwkt
wkid
is the well-known ID e.g. 4326wkt
is the well-known text formatst_crs()
will always return the wkt, that should be used.esriGeometry can also support Vertical Coordinate Systems (VCS) these should be supported, but later
https://developers.arcgis.com/documentation/common-data-types/featureset-object.htm
- adding a crs uses a lot of text so it should be done only once when possible. so its important to consider when this is done.