Dataset Class
Summary: A dataset is the collection of VectorLayer instances.
Module: aspose.gis
Full Name: aspose.gis.Dataset
Aspose.PSD Version: 25.9.0
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| can_create_layers | bool | r | Gets a value indicating whether this dataset can create vector layers. |
| can_remove_layers | bool | r | Gets a value indicating whether this dataset can remove vector layers. |
| driver | Driver | r | Gets the Dataset.driver that instantiated this dataset. |
| layers_count | int | r | Gets the number of layers in this dataset. |
Methods
| Name | Description |
|---|---|
| create(path, driver) | Creates a dataset. |
| create(path, driver) | Creates a dataset. |
| create(path, driver, options) | Creates a dataset. |
| create(path, driver, options) | Creates a dataset. |
| create_layer() | Creates a new vector layer and opens it for appending. |
| create_layer(name, options, spatial_reference_system) | Creates a new vector layer with specified name and opens it for appending. |
| create_layer(name, spatial_reference_system) | Creates a new vector layer with specified name and opens it for appending. |
| create_layer(options, spatial_reference_system) | Creates a new vector layer and opens it for appending. |
| create_layer(spatial_reference_system) | Creates a new vector layer and opens it for appending. |
| edit_layer(name, options, spatial_reference_system) | Opens the layer with specified name for editing. |
| edit_layer_at(index, options, spatial_reference_system) | Opens the layer with specified name for editing. |
| get_layer_name(index) | Gets the name of the layer at specified index. |
| has_layer_with_name(name) | Check has current dataset a layer with specific name |
| open(path, driver) | Opens the dataset. |
| open(path, driver) | Opens the dataset. |
| open(path, driver, options) | Opens the dataset. |
| open(path, driver, options) | Opens the dataset. |
| open_layer(name, options) | Opens the layer with specified name for reading. |
| open_layer_at(index, options) | Opens the layer at specified index for reading. |
| remove_layer(name) | Removes the vector layer with specified name. |
| remove_layer_at(index) | Removes the vector layer at specified index. |
| rename_layer(current_name, new_name) | Rename layer in dataset |
Method: create(path, driver) [static]
create(path, driver)
Creates a dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | string | Path to the dataset. |
| driver | FileDriver | Driver to use. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: create(path, driver) [static]
create(path, driver)
Creates a dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | AbstractPath | Path to the dataset. |
| driver | FileDriver | Driver to use. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: create(path, driver, options) [static]
create(path, driver, options)
Creates a dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | string | Path to the dataset. |
| driver | FileDriver | Driver to use. |
| options | DriverOptions | Driver-specific options. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: create(path, driver, options) [static]
create(path, driver, options)
Creates a dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | AbstractPath | Path to the dataset. |
| driver | FileDriver | Driver to use. |
| options | DriverOptions | Driver-specific options. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: create_layer()
create_layer()
Creates a new vector layer and opens it for appending.
Returns
| Type | Description |
|---|---|
| VectorLayer | A VectorLayer opened for writing. |
Method: create_layer(name, options, spatial_reference_system)
create_layer(name, options, spatial_reference_system)
Creates a new vector layer with specified name and opens it for appending.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the layer. |
| options | DriverOptions | Open options. |
| spatial_reference_system | SpatialReferenceSystem | Spatial reference system of the new layer. |
Returns
| Type | Description |
|---|---|
| VectorLayer | A VectorLayer opened for writing. |
Method: create_layer(name, spatial_reference_system)
create_layer(name, spatial_reference_system)
Creates a new vector layer with specified name and opens it for appending.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the layer. |
| spatial_reference_system | SpatialReferenceSystem | Spatial reference system of the new layer. |
Returns
| Type | Description |
|---|---|
| VectorLayer | A VectorLayer opened for writing. |
Method: create_layer(options, spatial_reference_system)
create_layer(options, spatial_reference_system)
Creates a new vector layer and opens it for appending.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| options | DriverOptions | Open options. |
| spatial_reference_system | SpatialReferenceSystem | Spatial reference system of the new layer. |
Returns
| Type | Description |
|---|---|
| VectorLayer | A VectorLayer opened for writing. |
Method: create_layer(spatial_reference_system)
create_layer(spatial_reference_system)
Creates a new vector layer and opens it for appending.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| spatial_reference_system | SpatialReferenceSystem | Spatial reference system of the new layer. |
Returns
| Type | Description |
|---|---|
| VectorLayer | A VectorLayer opened for writing. |
Method: edit_layer(name, options, spatial_reference_system)
edit_layer(name, options, spatial_reference_system)
Opens the layer with specified name for editing.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the layer to edit. |
| options | DriverOptions | Open options. |
| spatial_reference_system | SpatialReferenceSystem | Spatial reference system for new geometries. |
Returns
| Type | Description |
|---|---|
| VectorLayer | The layer opened for editing. |
Method: edit_layer_at(index, options, spatial_reference_system)
edit_layer_at(index, options, spatial_reference_system)
Opens the layer with specified name for editing.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | Index of the layer to edit. |
| options | DriverOptions | Open options. |
| spatial_reference_system | SpatialReferenceSystem | Spatial reference system for new geometries. |
Returns
| Type | Description |
|---|---|
| VectorLayer | The layer opened for editing. |
Method: get_layer_name(index)
get_layer_name(index)
Gets the name of the layer at specified index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | Index of the layer. |
Returns
| Type | Description |
|---|---|
| string | Name of the layer. |
Method: has_layer_with_name(name)
has_layer_with_name(name)
Check has current dataset a layer with specific name
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the layer |
Returns
| Type | Description |
|---|---|
| bool |
Method: open(path, driver) [static]
open(path, driver)
Opens the dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | string | Path to the dataset. |
| driver | FileDriver | Driver to use. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: open(path, driver) [static]
open(path, driver)
Opens the dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | AbstractPath | Path to the dataset. |
| driver | FileDriver | Driver to use. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: open(path, driver, options) [static]
open(path, driver, options)
Opens the dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | string | Path to the dataset. |
| driver | FileDriver | Driver to use. |
| options | DriverOptions | Driver-specific options. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: open(path, driver, options) [static]
open(path, driver, options)
Opens the dataset.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| path | AbstractPath | Path to the dataset. |
| driver | FileDriver | Driver to use. |
| options | DriverOptions | Driver-specific options. |
Returns
| Type | Description |
|---|---|
| Dataset | An instance of Dataset. |
Method: open_layer(name, options)
open_layer(name, options)
Opens the layer with specified name for reading.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the layer to open. |
| options | DriverOptions | Open options. |
Returns
| Type | Description |
|---|---|
| VectorLayer | The layer opened for reading. |
Method: open_layer_at(index, options)
open_layer_at(index, options)
Opens the layer at specified index for reading.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | Index of the layer to open. |
| options | DriverOptions | Open options. |
Returns
| Type | Description |
|---|---|
| VectorLayer | The layer opened for reading. |
Method: remove_layer(name)
remove_layer(name)
Removes the vector layer with specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the layer |
Method: remove_layer_at(index)
remove_layer_at(index)
Removes the vector layer at specified index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | Index of the layer |
Method: rename_layer(current_name, new_name)
rename_layer(current_name, new_name)
Rename layer in dataset
Parameters:
| Parameter | Type | Description |
|---|---|---|
| current_name | string | Current name of the layer |
| new_name | string | New name for the layer |