ShapefileFeatureTable.withFileUri constructor

ShapefileFeatureTable.withFileUri(
  1. Uri shapefileUri
)

Creates a shapefile feature table from the local shapefile (.shp) at the given path.

When creating a shapefile feature table, the path must point to the .shp file and the associated .shx and .dbf files must be present at the same location.

Parameters:

  • shapefileUri — Path to the .shp shape file.

Implementation

factory ShapefileFeatureTable.withFileUri(
  Uri shapefileUri,
) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreShapefileUri = _CString(shapefileUri.toFilePath());
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ShapefileFeatureTable_createWithPath(
      coreShapefileUri.bytes,
      errorHandler,
    );
  });
  return FeatureTable._instanceCache.instanceWith(handle);
}