GeoEco.Datasets.ArcGIS.ArcGISWorkspace.CreateTable

ArcGISWorkspace.CreateTable(tableName, geometryType=None, spatialReference=None, geometryFieldName=None, **options)

Creates a table.

This method does not add any fields to the table, other than the geometry field if specified. Use the AddField() method of the returned object to add fields.

Raises:

RuntimeError – The table already exists, or some other problem occurred when creating it.

Requires: Python bindings for the Geospatial Data Abstraction Library (GDAL).

Parameters:
  • tableName (str) – Name of the table to create. Minimum length꞉ 1.

  • geometryType (str, optional) – Geometry type for the table. If omitted, the table will not have geometry. Depending on the underlying storage format, not all geometry types may be supported. Allowed values꞉ 'Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon', 'GeometryCollection', 'Point25D', 'LineString25D', 'Polygon25D', 'MultiPoint25D', 'MultiLineString25D', 'MultiPolygon25D', 'GeometryCollection25D'. Case sensitive.

  • spatialReference (object, optional) – osgeo.osr.SpatialReference instance defining the spatial reference for the table. If omitted, the spatial reference for the table will remain undefined.

  • geometryFieldName (str, optional) – Name of the geometry field to create. If omitted, the table will not have geometry. The underlying storage format, depending on what it is, may determine the geometry field name, in which case the value provided here will be ignored. Minimum length꞉ 1.

  • options (dict mapping str to object) – Additional options specific to the underlying storage format.

Returns:

Table representing the new table.

Return type:

Table