public interface Data
Data service component interface.
The data service component is a class of GIS service components that encapsulate data-related GIS functions.
Modifier and Type | Method and Description |
---|---|
EditResult |
addFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Adds a set of features of the same type to the specified dataset.
|
void |
batchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Adding features in bulk, adding a large number of elements outperforms the addFeatures interface, but in some cases, some feature additions fail to know the specific failed feature ID.
|
boolean |
clearFeatures(java.lang.String datasourceName, java.lang.String datasetName)
Empty the elements in the specified dataset.
|
boolean |
containsDataset(java.lang.String datasourceName, java.lang.String datasetName)
Determines whether the specified data source contains the specified data set.
|
java.util.List<Geometry> |
coordtransfer(Geometry[] geometrys, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys)
According to the target coordinate system, converting the geographic object collection coordinate system
|
boolean |
copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName)
Copy the data set.
|
boolean |
createDataset(java.lang.String datasourceName, DatasetInfo datasetInfo)
In the specified data source, creates a new data set based on the specified dataset information.
|
boolean |
deleteDataset(java.lang.String datasourceName, java.lang.String datasetName)
In the specified data source, deletes a data set based on the specified dataset information.
|
EditResult |
deleteFeatures(java.lang.String datasourceName, QueryParameter queryParameter)
Specifies the data source to remove the feature via sql.
|
EditResult |
deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids)
Removes a set of features in the specified dataset.
|
DatasetInfo |
getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName)
Gets the specified data set information for the specified data source.
|
java.util.List<DatasetInfo> |
getDatasetInfos(java.lang.String datasourceName)
Gets all dataset information for the specified data source.
|
java.util.List<java.lang.String> |
getDatasetNames(java.lang.String datasourceName)
Gets all dataset names for the current data source.
|
DatasourceInfo |
getDatasourceInfo(java.lang.String datasourceName)
Gets information about a given data source.
|
java.util.List<DatasourceInfo> |
getDatasourceInfos()
Gets information for all data sources.
|
java.util.List<DomainInfo> |
getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets all the domain information for the specified dataset
|
GetFeatureResult |
getFeature(GetFeatureParameters parameters)
Query and return the feature results.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, QueryParameter queryParam)
Gets the elements through SQL query criteria.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures)
Gets the elements through SQL query criteria.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, java.lang.String[] fields)
Gets the elements that fall within the buffer of the specified geometry object.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, java.lang.String attributeFilter, java.lang.String[] fields)
Gets the elements that fall within the buffer of the specified space object and satisfy certain attribute filters.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String[] fields)
Gets the elements that have a specific spatial query mode with the specified geometry object.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields)
Gets the elements that specify a geometric object that satisfies a spatial query mode and satisfies the specified attribute filter.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields)
Gets the feature in the specified dataset based on the specified feature ID.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields, int fromIndex, int toIndex)
Gets the feature in the specified data set according to the specified feature ID in the way of supporting paging.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String[] fields)
Gets the feature in the specified dataset based on the specified feature ID.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields)
Get the elements within the specified space and meet certain attribute filters.
|
java.util.List<FieldInfo> |
getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets all the field information for the specified dataset.
|
GridValue |
getGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D)
Gets the raster value for the specified coordinate position of the raster dataset.
|
GridValues |
getGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)
Gets the raster value matrix in the rectangle according to the specified rectangle range.
|
ImageValue |
getImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D)
Gets the image information of the specified coordinate position of the image data set.
|
ImageValues |
getImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)
Gets the raster value matrix in the rectangle according to the specified rectangle range.
|
boolean |
isDisableQueryCache()
Whether to enable caching when performing data query
|
boolean |
renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName)
Modifies the name of the specified dataset.
|
double |
statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode)
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
|
double |
statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode)
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
|
void |
updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo)
In the specified data source, update the information for the specified data set.
|
void |
updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo)
Updates the original data source information with the new data source information.
|
EditResult |
updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Updates a set of features in the specified dataset.
|
void |
updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFiledInfos)
Updates the field information for the specified dataset.
|
boolean createDataset(java.lang.String datasourceName, DatasetInfo datasetInfo) throws DataException
In the specified data source, creates a new data set based on the specified dataset information.
datasourceName
- the name of the datasource.datasetInfo
- Data set info.DataException
- Data service component exception information.boolean deleteDataset(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
In the specified data source, deletes a data set based on the specified dataset information.
datasourceName
- the name of the datasource.datasetName
- the dataset name.DataException
- Data service component exception information.boolean copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName) throws DataException
Copy the data set.
From the specified source data source, the specified source data set is copied to the target dataset in the specified target data source.
srcDatasourceName
- the name of the source data source.srcDatasetName
- the name of the source dataset.dataSourceName
- Target data source name.destDatasetName
- the name of the destination dataset.DataException
- Data service component exception information.boolean renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName) throws DataException
Modifies the name of the specified dataset.
datasourceName
- the name of the datasource.oldName
- Old data set name.newName
- New data set name.DataException
- Data service component exception information.boolean containsDataset(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Determines whether the specified data source contains the specified data set.
datasourceName
- the name of the datasource.datasetName
- the dataset name.DataException
- Data service component exception information.EditResult addFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataException
Adds a set of features of the same type to the specified dataset.
Each dataset of SuperMap has a type (DatasetType
), which can be a point dataset, a line dataset, a surface dataset, etc., and the elements in each dataset have corresponding types, such as those stored in a point dataset must be a point element. Therefore, when adding features to a dataset, the added elements must be of the same type.
datasourceName
- the name of the datasource.datasetName
- the dataset name.targetFeatures
- To add a list of features, the elements in the list must be of the same type.DataException
- Data service component exception information.void batchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataException
Adding features in bulk, adding a large number of elements outperforms the addFeatures interface, but in some cases, some feature additions fail to know the specific failed feature ID.
datasourceName
-datasetName
-targetFeatures
-DataException
EditResult deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids) throws DataException
Removes a set of features in the specified dataset.
datasourceName
- the name of the datasource.datasetName
- the dataset name.ids
- The ID array of the feature to be deleted.DataException
- Data service component exception information.EditResult deleteFeatures(java.lang.String datasourceName, QueryParameter queryParameter) throws DataException
Specifies the data source to remove the feature via sql.
datasourceName
- the name of the datasource.queryParam
- Query parameters.DataException
- Data service component exception information.EditResult updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataException
Updates a set of features in the specified dataset.
The parameter targetFeatures is a new feature list whose feature ID is the same as the feature ID to be updated in the dataset, finds the element to be updated based on the ID, and then updates the original feature to the new feature.
datasourceName
- the name of the datasource.datasetName
- the dataset name.targetFeatures
- new feature list. Its ID is the same as the feature ID to be updated.DataException
- Data service component exception information.boolean clearFeatures(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Empty the elements in the specified dataset.
datasourceName
- the name of the datasource.datasetName
- the dataset name.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields) throws DataException
Gets the feature in the specified dataset based on the specified feature ID.
datasourceName
- the name of the datasource.datasetName
- the dataset name.ids
- Feature ID.fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields, int fromIndex, int toIndex) throws DataException
Gets the feature in the specified data set according to the specified feature ID in the way of supporting paging.
datasourceName
- the name of the datasource.datasetName
- the dataset name.ids
- Feature ID.fields
- An array of fields to be returned. When the parameter is null, all fields are returned.fromIndex
- The minimum index number for the result of the pagingtoIndex
- The maximum index number for the result of the pagingDataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String[] fields) throws DataException
Gets the feature in the specified dataset based on the specified feature ID.
datasourceName
- the name of the datasource.datasetName
- the dataset name.bounds
- The specified query range.fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields) throws DataException
Get the elements within the specified space and meet certain attribute filters.
datasourceName
- the name of the datasource.datasetName
- the dataset name.bounds
- The specified query range.fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, java.lang.String[] fields) throws DataException
Gets the elements that fall within the buffer of the specified geometry object.
datasourceName
- the name of the datasource.datasetName
- the dataset name.geometry
- Geometric object.bufferDistance
- The radius of the buffer, in units of the current data set Coordinate unit (coordUnit).fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, java.lang.String attributeFilter, java.lang.String[] fields) throws DataException
Gets the elements that fall within the buffer of the specified space object and satisfy certain attribute filters.
datasourceName
- the name of the datasource.datasetName
- the dataset name.geometry
- Geometric object.bufferDistance
- The radius of the buffer, in units of the current data set Coordinate unit (coordUnit).attributeFilter
- Attribute query filter. Such as fieldValue <100, name like '% hotel%'fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String[] fields) throws DataException
Gets the elements that have a specific spatial query mode with the specified geometry object.
datasourceName
- the name of the datasource.datasetName
- the dataset name.geometry
- Geometric object.spatialQueryMode
- spatial query mode.fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields) throws DataException
Gets the elements that specify a geometric object that satisfies a spatial query mode and satisfies the specified attribute filter.
datasourceName
- the name of the datasource.datasetName
- the dataset name.geometry
- Geometric object.spatialQueryMode
- spatial query mode.attributeFilter
- Attribute filter.fields
- An array of fields to be returned. When the parameter is null, all fields are returned.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam) throws DataException
Gets the elements through SQL query criteria.
datasourceName
- the name of the datasource.queryParam
- Query parameters.DataException
- Data service component exception information.java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures) throws DataException
Gets the elements through SQL query criteria.
datasourceName
- the name of the datasource.queryParam
- Query parameters.maxFeatures
- The maximum number of elements that can be returned.DataException
- Data service component exception information.GetFeatureResult getFeature(GetFeatureParameters parameters) throws DataException
Query and return the feature results.
parameters
- Is the encapsulation of other getFeature parameters.DataException
java.util.List<DatasourceInfo> getDatasourceInfos() throws DataException
Gets information for all data sources.
DataException
- Data service component exception information.DatasourceInfo getDatasourceInfo(java.lang.String datasourceName) throws DataException
Gets information about a given data source.
datasourceName
- the name of the datasource.DataException
- Data service component exception information.void updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo) throws DataException
Updates the original data source information with the new data source information.
datasourceName
- the name of the datasource.newDatasourceInfo
- new data source information.DataException
- Data service component exception information.java.util.List<DatasetInfo> getDatasetInfos(java.lang.String datasourceName) throws DataException
Gets all dataset information for the specified data source.
datasourceName
- the name of the datasource.DataException
- Data service component exception information.java.util.List<java.lang.String> getDatasetNames(java.lang.String datasourceName) throws DataException
Gets all dataset names for the current data source.
datasourceName
- the name of the datasource.DataException
DatasetInfo getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets the specified data set information for the specified data source.
datasourceName
- the name of the datasource.datasetName
- the dataset name.DataException
- Data service component exception information.void updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo) throws DataException
In the specified data source, update the information for the specified data set.
datasourceName
- the name of the datasource.datasetName
- The name of the dataset to be updated.newDatasetInfo
- New data source information.DataException
- Data service component exception information.java.util.List<DomainInfo> getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets all the domain information for the specified dataset
datasourceName
- the name of the datasourcedatasetName
- the dataset nameDataException
java.util.List<FieldInfo> getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets all the field information for the specified dataset.
datasourceName
- the name of the datasource.datasetName
- the dataset name.DataException
- Data service component exception information.void updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFiledInfos) throws DataException
Updates the field information for the specified dataset.
Use this method to achieve add, delete, modify operation to the field, that is, the entire data set field (except SuperMap system field) is replaced with the new field.
If you are using SuperMap data, updating the alias of SuperMap system field is not currently supported.
datasourceName
- the name of the datasource.datasetName
- the dataset name.newFieldInfos
- new field information. If you are using SuperMap data, the new field information list can not contain SuperMap's system fields.DataException
- Data service component exception information.double statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode) throws DataException
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
datasourceName
- the name of the datasource.datasetName
- the dataset name.fieldIndex
- Field number.statisticMode
- Statistical methods.DataException
- Data service component exception information.double statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode) throws DataException
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
datasourceName
- the name of the datasource.datasetName
- the dataset name.fieldName
- Field name.statisticMode
- Statistical methods.DataException
- Data service component exception information.GridValue getGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D) throws DataException
Gets the raster value for the specified coordinate position of the raster dataset.
datasoruceName
-datasetName
-point2D
-DataException
GridValues getGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry) throws DataException
datasourceName
-datasetName
-geometry
-DataException
ImageValue getImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D) throws DataException
Gets the image information of the specified coordinate position of the image data set.
datasoruceName
-datasetName
-point2D
-index
- the specified bandDataException
ImageValues getImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry) throws DataException
datasourceName
-datasetName
-geometry
-DataException
java.util.List<Geometry> coordtransfer(Geometry[] geometrys, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys) throws DataException
According to the target coordinate system, converting the geographic object collection coordinate system
geometrys
-sourcePrjCoorSys
-targetPrjCoordSys
-DataException
boolean isDisableQueryCache()