arcgis package architecture

Introduction to the features module

FeatureLayer / FeatureCollection

Fortune 500 company example

  • Each company (single point in space) = Feature object.
  • All East-coast companies profit > 5B = FeatureSet. A FeatureSet is a collection of Feature objects.
  • When published as a feature service on your GIS. That layer is a FeatureLayer.
  • The collection of all layers in the feature service is read as a FeatureLayerCollection object.
  • Alternate to FeatureLayer - can store as lightweight item = FeatureCollection.
    • FeatureCollection is a FeatureSet + layerDefinition info

On your enterprise, your feature data live either as a FeatureLayer or FeatureCollection which can also be an item without a feature service. The latter has a size limit though

  • Item object in your enterprise. Eg: fortune_500_2017

    • Item.layers property will give either a
      • list of [FeatureLayer] objects
      • or a [FeatureCollection] object
  • call the query() method on either a FeatureLayer or FeatureCollection you get

    • FeatureSet
    • features property of FeatureSet gives a list of [Feature] objects

Where to use what?

  • Feature - smallest entity. Cannot draw a single feature object.
    • geometry, attributes, fields
  • FeatureSet - inputs to GP, can be drawn on map widget
    • df, spatial_reference, features, fields
  • FeatureCollection - items in GIS, input to GP, output from GP
    • query() [does not support where clause]
  • FeatureLayer - through individual layers of a feature services.
    • query() [supports where clause], attachments
    • manager, edit_features(), calculate(), query_related_records()
  • FeatureLayerCollection - through publishing as feature services