GeoEco.Datasets.ArcGIS.ArcGISTable
- class GeoEco.Datasets.ArcGIS.ArcGISTable(path, autoDeleteFieldAddedByArcGIS=False, parentCollection=None, queryableAttributeValues=None, lazyPropertyValues=None, cacheDirectory=None)
Bases:
Table,ArcGISCopyableTableA 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 andPathis 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 timeAddField()is called. This parameter is ignored ifPathis not a shapefile or dBASE table.parentCollection (
DatasetCollection, optional) – ParentDatasetCollectionthat this object is part of (if any).queryableAttributeValues (
dictmappingstrtoobject, optional) – Values of the queryable attributes, expressed as a dictionary mapping the case-insensitive names of queryable attributes to their values.lazyPropertyValues (
dictmappingstrtoobject, 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:
ArcGISTableinstance.- Return type:
Properties
- property ArcGISDataType
(
str) Data type of the table. Obtained witharcpy.Describe(path).DataType. Read only. Minimum length꞉ 1.
- property ArcGISPhysicalDataType
(
str) Data type of the table’s catalog path. This will be the same asArcGISDataTypeunless thePathis a table view, feature layer, or some other virtual object. Obtained witharcpy.Describe(arcpy.Describe(path).CatalogPath).DataType. Read only. Minimum length꞉ 1.
- property AutoDeleteFieldAddedByArcGIS
(
bool) If True andPathis 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 timeAddField()is called. This parameter is ignored ifPathis 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
(
listofFieldorNone)listofFields representing the fields of the table.Noneor an empty list if the table has no fields (this is unusual). Read only.
- property GeometryFieldName
(
strorNone) Name of the geometry field, orNoneif 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
(
strorNone) Geometry type for the table, orNoneif 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
(
intorNone) Maximum allowed length of string fields, orNoneif there is no maximum or it is unknown. Read only. Minimum value꞉ 1.
- property OIDFieldName
(
strorNone) Name of the ArcGIS-style “object ID” field, orNoneif 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 namedOIDorFIDin .DBF files or shapefiles, orOBJECTIDorESRI_OIDin 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 beNone.
- property ParentCollection
(
DatasetCollectionorNone) ParentDatasetCollectionthat 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
Adds a field to the table.
Closes any open files or connections associated with this object and releases any other resources allocated to access it.
Converts a spatial reference from one format to another, such as an OGC WKT string to a Proj4 string.
Creates an index on one or more fields of the table.
Deletes a field from the table.
Deletes an index from the table.
Deletes the lazy property with the specified name.
Returns a list of all queryable attributes.
Called by
ImportDatasets()to get the path to copy.Returns the
Fieldfor the specified field name, orNoneif no field exists with that name.Returns the value of the lazy property with the specified name.
Returns the queryable attribute with the specified name.
Returns the value of the queryable attribute with the specified name.
Returns a list queryable attributes having the specified data type.
Returns the number of rows in the table.
Returns the spatial reference of this dataset.
Returns True if the specified lazy property has a value.
Opens and returns an
InsertCursorfor adding rows to the table.Opens and returns a
SelectCursorfor reading rows from the table.Opens and returns an
UpdateCursorfor reading, updating, and deleting rows from the table.Queries the table and returns a
dictmapping field names to parallel lists of result values.Sets the lazy property with the specified name to the specified value.
Sets the spatial reference of this dataset.
Tests whether a capability is supported by this class or an instance of it.