TableDescription.spatial constructor

TableDescription.spatial(
  1. {required String name,
  2. required SpatialReference spatialReference,
  3. required GeometryType geometryType}
)

Creates a new table description object with the specified name, spatial reference, and geometry type.

Parameters:

  • name — The field's name.
  • spatialReference — The table's spatial reference.
  • geometryType — The table's geometry type.

Implementation

factory TableDescription.spatial(
    {required String name,
    required SpatialReference spatialReference,
    required GeometryType geometryType}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreName = _CString(name);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_TableDescription_createSpatialWithName(
        coreName.bytes,
        spatialReference._handle,
        geometryType.coreValue,
        errorHandler);
  });
  return TableDescription._withHandle(handle);
}