GeoEco.Datasets.ArcGIS.ArcGISTable

class GeoEco.Datasets.ArcGIS.ArcGISTable(path, autoDeleteFieldAddedByArcGIS=False, parentCollection=None, queryableAttributeValues=None, lazyPropertyValues=None, cacheDirectory=None)

Bases: Table, ArcGISCopyableTable

A table, feature class, or other tabular dataset or layer represented as a Table.

Requires: ArcGIS Pro 3.2.0 or later or ArcGIS Server equivalent to ArcGIS Pro 3.2.0 or later.

Parameters:
  • path (str) – ArcGIS catalog path to the table-like object to open. This can be a table, table view, shapefile, ArcInfo coverage, geodatabase feature class, feature layer, raster dataset, raster layer, or anything else that has fields and that may be accessed through arcpy. Minimum length꞉ 1.

  • autoDeleteFieldAddedByArcGIS (bool, optional) – If True and Path is a shapefile or dBASE table (.DBF file), the “Id” field (if a shapefile) or “Field1” (if a dBASE table) that was added by ArcGIS when the shapefile or table was created will be automatically deleted the first time AddField() is called. This parameter is ignored if Path is not a shapefile or dBASE table.

  • parentCollection (DatasetCollection, optional) – Parent DatasetCollection that this object is part of (if any).

  • queryableAttributeValues (dict mapping str to object, optional) – Values of the queryable attributes, expressed as a dictionary mapping the case-insensitive names of queryable attributes to their values.

  • lazyPropertyValues (dict mapping str to object, optional) – Lazy properties to set when this object is constructed, expressed as a dictionary mapping the names of lazy properties to their values.

  • cacheDirectory (str, optional) – Directory for caching local copies of remote datasets. Minimum length꞉ 1.

Returns:

ArcGISTable instance.

Return type:

ArcGISTable

Properties

property ArcGISDataType

(str) Data type of the table. Obtained with arcpy.Describe(path).DataType. Read only. Minimum length꞉ 1.

property ArcGISPhysicalDataType

(str) Data type of the table’s catalog path. This will be the same as ArcGISDataType unless the Path is a table view, feature layer, or some other virtual object. Obtained with arcpy.Describe(arcpy.Describe(path).CatalogPath).DataType. Read only. Minimum length꞉ 1.

property AutoDeleteFieldAddedByArcGIS

(bool) If True and Path is a shapefile or dBASE table (.DBF file), the “Id” field (if a shapefile) or “Field1” (if a dBASE table) that was added by ArcGIS when the shapefile or table was created will be automatically deleted the first time AddField() is called. This parameter is ignored if Path is not a shapefile or dBASE table. Read only.

property DisplayName

(str) Informal name of this object, suitable to be displayed to the user. Read only. Minimum length꞉ 1.

property Fields

(list of Field or None) list of Fields representing the fields of the table. None or an empty list if the table has no fields (this is unusual). Read only.

property GeometryFieldName

(str or None) Name of the geometry field, or None if the table does not have geometry, or the geometry is not stored in a named field (as with shapefiles). Read only. Minimum length꞉ 1.

property GeometryType

(str or None) Geometry type for the table, or None if the table does not have geometry. Read only. Allowed values꞉ 'Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon', 'GeometryCollection', 'Point25D', 'LineString25D', 'Polygon25D', 'MultiPoint25D', 'MultiLineString25D', 'MultiPolygon25D', 'GeometryCollection25D'. Case sensitive.

property HasOID

(bool) True if this table has an ArcGIS-style “object ID” field. Read only. ArcGIS usually requires tabular datasets to have an auto-incrementing integer field that uniquely identifies each row. This method returns True if such a field has been defined and the underlying programming library used to access the table identifies the field the object ID field.

property MaxStringLength

(int or None) Maximum allowed length of string fields, or None if there is no maximum or it is unknown. Read only. Minimum value꞉ 1.

property OIDFieldName

(str or None) Name of the ArcGIS-style “object ID” field, or None if there is no object ID field. Read only. Minimum length꞉ 1. The object ID field name usually depends on the underlying storage format. For example, it may be named OID or FID in .DBF files or shapefiles, or OBJECTID or ESRI_OID in geodatabase feature classes and tables. If the underlying format or programming library used to access it does not define or identify an object ID field, this property will be None.

property ParentCollection

(DatasetCollection or None) Parent DatasetCollection that this object is part of (if any). Read only.

property Path

(str) ArcGIS catalog path to the table-like object to open. This can be a table, table view, shapefile, ArcInfo coverage, geodatabase feature class, feature layer, raster dataset, raster layer, or anything else that has fields and that may be accessed through arcpy. Read only. Minimum length꞉ 1.

Methods

AddField

Adds a field to the table.

Close

Closes any open files or connections associated with this object and releases any other resources allocated to access it.

ConvertSpatialReference

Converts a spatial reference from one format to another, such as an OGC WKT string to a Proj4 string.

CreateIndex

Creates an index on one or more fields of the table.

DeleteField

Deletes a field from the table.

DeleteIndex

Deletes an index from the table.

DeleteLazyPropertyValue

Deletes the lazy property with the specified name.

GetAllQueryableAttributes

Returns a list of all queryable attributes.

GetArcGISCopyablePath

Called by ImportDatasets() to get the path to copy.

GetFieldByName

Returns the Field for the specified field name, or None if no field exists with that name.

GetLazyPropertyValue

Returns the value of the lazy property with the specified name.

GetQueryableAttribute

Returns the queryable attribute with the specified name.

GetQueryableAttributeValue

Returns the value of the queryable attribute with the specified name.

GetQueryableAttributesWithDataType

Returns a list queryable attributes having the specified data type.

GetRowCount

Returns the number of rows in the table.

GetSpatialReference

Returns the spatial reference of this dataset.

HasLazyPropertyValue

Returns True if the specified lazy property has a value.

OpenInsertCursor

Opens and returns an InsertCursor for adding rows to the table.

OpenSelectCursor

Opens and returns a SelectCursor for reading rows from the table.

OpenUpdateCursor

Opens and returns an UpdateCursor for reading, updating, and deleting rows from the table.

Query

Queries the table and returns a dict mapping field names to parallel lists of result values.

SetLazyPropertyValue

Sets the lazy property with the specified name to the specified value.

SetSpatialReference

Sets the spatial reference of this dataset.

TestCapability

Tests whether a capability is supported by this class or an instance of it.