Class UGCRealspaceProvider
- java.lang.Object
-
- com.supermap.services.providers.UGCRealspaceProvider
-
- All Implemented Interfaces:
- Disposable, ProviderContextAware, RealspaceProvider
public class UGCRealspaceProvider extends java.lang.Object implements RealspaceProvider, ProviderContextAware, Disposable
SuperMap 3D service provider.
UGCRealspaceProvider provides SuperMap map related services, encapsulates with the SuperMap 3D-related GIS functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classUGCRealspaceProvider.WorkspaceDataRefreshThe data in the workspace is modified to refresh the workspace.
-
Constructor Summary
Constructors Constructor and Description UGCRealspaceProvider()The Constructor.UGCRealspaceProvider(UGCRealspaceProviderSetting setting)Builds theUGCRealspaceProviderobject with SuperMap 3D service provider configuration.
-
Method Summary
Methods Modifier and Type Method and Description booleancleanCacheData(java.lang.String dataName)Clears the cache of dynamic publishing datavoiddispose()Release object.java.lang.StringgetCacheAccessKey()Returns the password used to encrypt the cached data.RealspaceDataResultgetData(RealspaceDataParam dataParam)Gets 3D tile data results.RealspaceDataResultgetData(java.lang.String dataName, java.lang.String relativePath)Obtains tile data based on relative path.RealspaceDataResultgetData(java.lang.String sceneName, java.lang.String layerName, RealspaceDataParam dataParam)According to the scene name and layer name and tile parameters three-dimensional tile data results.RealspaceDataResultgetData(java.lang.String dataName, java.lang.String relativePath, RelativePathType relativePathType)Obtains tile data based on relative path and relative path type.byte[]getDataConfig(java.lang.String dataName)Obtains 3D cache data configuration file according to the name of the 3D data.byte[]getDataConfig(java.lang.String dataName, CompressType compressType)Gets the configuration file for the 3D cache data by name.java.util.List<RealspaceDataInfo>getDataInfos()Gets all the 3D data of the current Provider.java.lang.ObjectgetdataSetFromWorkspace(Workspace workspace, java.lang.String dataName)Gets the dataset or map object of the workspace in which the workspace is locatedjava.lang.StringgetDataVersion(RealspaceDataParam dataParam)java.lang.StringgetDataVersion(java.lang.String dataName, int xIndex, int yIndex, int level, java.lang.String fileExtension)Obtain the latest version number of the tile data according to the index.java.lang.StringgetDataVersion(java.lang.String dataName, java.lang.String relativePath)Obtains the latest version number of the tile data according to the relative path.java.lang.StringgetLayerExtendXML(java.lang.String sceneName, java.lang.String layerName)Gets the layer extension information for the specified layerPrjCoordSysgetLayerPrj(java.lang.String sceneName, java.lang.String layerName)Gets the projection information for the specified layerbyte[]getModelIndex(java.lang.String dataName)The model index file of the 3D model cache data is obtained according to the name of the 3D data.java.util.List<OfflineDataInfo>getOfflineDataPaths(java.lang.String sceneName, java.lang.String layerName)Gets the location information for all data offline packages for a particular 3D sceneSceneInfogetSceneInfo(java.lang.String sceneName)According to the name of the 3D scene, gets the information of the 3D scene.java.util.List<java.lang.String>getSceneNames()Gets the name of all available 3D scenes for the current service provider.RealspaceTilesRevisionInfogetTilesRevisionInfo(java.lang.String dataName, long revisionNumber)Gets the tile change information for the specified version number.byte[]getVectorIndex(java.lang.String dataName)Obtains the index file of the 3D vector cache data by name.booleanisDataAvailable(java.lang.String dataName)Whether the three-dimensional data is available.booleanisSceneAvailable(java.lang.String sceneName)Whether the 3D scene is available.booleanisSecurityEnabled()Whether the security mechanism is enabled.RealspaceDataResult[]outputDataToMemory(java.lang.String sceneName, java.lang.String layerName, Output3DDataToMemoryParam outputParam)Generates 3D tiles into memory based on scene name and layer namevoidpauseForRefreshWorkspace()Block requests to refresh the workspace.voidrefreshWorkspace()refreshes the workspace.voidrefreshWorkspaceFinished()Ends refreshing the workspace, then continues the request.voidsetProviderContext(ProviderContext context)Sets the service provider context
-
-
-
Constructor Detail
-
UGCRealspaceProvider
public UGCRealspaceProvider()
The Constructor.
-
UGCRealspaceProvider
public UGCRealspaceProvider(UGCRealspaceProviderSetting setting)
Builds the
UGCRealspaceProviderobject with SuperMap 3D service provider configuration.- Parameters:
setting- uperMap 3D service provider setting configures.
-
-
Method Detail
-
getData
public RealspaceDataResult getData(RealspaceDataParam dataParam) throws RealspaceException
Description copied from interface:RealspaceProviderGets 3D tile data results.- Specified by:
getDatain interfaceRealspaceProvider- Parameters:
dataParam- Tile parameters.- Throws:
RealspaceException
-
getData
public RealspaceDataResult getData(java.lang.String sceneName, java.lang.String layerName, RealspaceDataParam dataParam) throws RealspaceException
Description copied from interface:RealspaceProviderAccording to the scene name and layer name and tile parameters three-dimensional tile data results.- Specified by:
getDatain interfaceRealspaceProvider- Parameters:
sceneName- Scene name.layerName- Layer name.dataParam- Tile parameters.- Throws:
RealspaceException
-
outputDataToMemory
public RealspaceDataResult[] outputDataToMemory(java.lang.String sceneName, java.lang.String layerName, Output3DDataToMemoryParam outputParam) throws RealspaceException
Description copied from interface:RealspaceProviderGenerates 3D tiles into memory based on scene name and layer name- Specified by:
outputDataToMemoryin interfaceRealspaceProvider- Parameters:
sceneName- Scene name.layerName- Layer name- Returns:
- The generated three-dimensional tiles
- Throws:
RealspaceException
-
getData
public RealspaceDataResult getData(java.lang.String dataName, java.lang.String relativePath) throws RealspaceException
Obtains tile data based on relative path.
The setting of the relative data of the tile data is as follows:
-
- For terrain and image 3D cache data, the relative path starts with the directory where the cache configuration file (SCT and SCI3D) resides, that is, from the cache layer number, the hierarchical cache data is stored in the cache configuration file. Such as the cache layer number is 12, then the relative path is "12 /.../.../ cache file".
-
- For the three-dimensional cache data of the model, the relative path starts from the parent-level directory of the cache configuration file, that is, the same level as the cache layer number. The model data is different from the terrain and image data. In the hierarchical directory, it is not the data after the cache, but the index of the model cache file. The cache data file (SGM) is stored in the directory of the cache configuration file.
- For KML data, the relative path is set to a KML file.
- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).relativePath- the relative path of tile data.- Returns:
- tile data results.
- Throws:
RealspaceException- 3D exception information.
-
getData
public RealspaceDataResult getData(java.lang.String dataName, java.lang.String relativePath, RelativePathType relativePathType) throws RealspaceException
Obtains tile data based on relative path and relative path type.
If the relative cache configuration file is set, the settings for the tile data relative path are as follows:
- For terrain and image 3D cache data, the relative path starts with the directory where the cache configuration file (SCT and SCI3D) resides, that is, from the cache layer number, the hierarchical cache data is stored in the cache configuration file. Such as the cache layer number is 12, then the relative path is "12 /.../.../ cache file".
- For the three-dimensional cache data of the model, the relative path starts from the parent-level directory of the cache configuration file, that is, the same level as the cache layer number. The model data is different from the terrain and image data. In the hierarchical directory, it is not the data after the cache, but the index of the model cache file. The cache data file (SGM) is stored in the directory of the cache configuration file.
- For KML data, the relative path is set to a KML file.
- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).relativePath- the relative path of tile data.relativePathType- the relative path of tile data.- Returns:
- tile data results.
- Throws:
RealspaceException- 3D exception information.
-
getDataConfig
public byte[] getDataConfig(java.lang.String dataName) throws RealspaceExceptionObtains 3D cache data configuration file according to the name of the 3D data.- Specified by:
getDataConfigin interfaceRealspaceProvider- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).- Returns:
- 3D cache data configuration file.
- Throws:
RealspaceException- 3D exception information.
-
getDataConfig
public byte[] getDataConfig(java.lang.String dataName, CompressType compressType) throws RealspaceExceptionDescription copied from interface:RealspaceProviderGets the configuration file for the 3D cache data by name.- Specified by:
getDataConfigin interfaceRealspaceProvider- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).- Returns:
- 3D cache data configuration file.
- Throws:
RealspaceException- 3D exception information.
-
getDataInfos
public java.util.List<RealspaceDataInfo> getDataInfos()
Gets all the 3D data of the current Provider.- Specified by:
getDataInfosin interfaceRealspaceProvider- Returns:
- 3D data information.
- Throws:
RealspaceException- 3D exception information.
-
getDataVersion
public java.lang.String getDataVersion(java.lang.String dataName, int xIndex, int yIndex, int level, java.lang.String fileExtension) throws RealspaceExceptionObtain the latest version number of the tile data according to the index.- Specified by:
getDataVersionin interfaceRealspaceProvider- Parameters:
dataName- corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).xIndex- the index of the tile data in the X direction.yIndex- the index of the tile data in the Y direction.level- The layer number of the tile data, only the 3D cache data of the model needs to be set.fileExtension- Tile data extension name. Including * .png, *. Jpg, *. bil and so on.- Returns:
- tile version of the data.
- Throws:
RealspaceException- 3D exception information.
-
getDataVersion
public java.lang.String getDataVersion(java.lang.String dataName, java.lang.String relativePath) throws RealspaceExceptionObtains the latest version number of the tile data according to the relative path.
The setting of the relative data of the tile data is as follows:
- For terrain and image 3D cache data, the relative path starts with the directory where the cache configuration file (SCT and SCI3D) resides, that is, from the cache layer number, the hierarchical cache data is stored in the cache configuration file. Such as the cache layer number is 12, then the relative path is "12 /.../.../ cache file".
- For the model three-dimensional cache data, the relative path start from the cache configuration file parent-level directory, that is, from the cache layer number directory, the model data and terrain and image data is different, cached data is not stored in the hierarchical directory, but the model cache file index file (index), the version number refers to the index file version number.
- KML data has no version number.
- Specified by:
getDataVersionin interfaceRealspaceProvider- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).relativePath- the relative path of tile data.- Returns:
- The latest version of the tile data.
- Throws:
RealspaceException- 3D exception information.
-
getDataVersion
public java.lang.String getDataVersion(RealspaceDataParam dataParam) throws RealspaceException
- Throws:
RealspaceException
-
getModelIndex
public byte[] getModelIndex(java.lang.String dataName) throws RealspaceExceptionThe model index file of the 3D model cache data is obtained according to the name of the 3D data.
The file is indexed with "index" as the file extension name, and the configuration file for the model cache data (the file with the extension "scm") is located in the same parent directory.
- Specified by:
getModelIndexin interfaceRealspaceProvider- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).- Returns:
- Model index file.
- Throws:
RealspaceException- 3D exception information.
-
getVectorIndex
public byte[] getVectorIndex(java.lang.String dataName) throws RealspaceExceptionDescription copied from interface:RealspaceProviderObtains the index file of the 3D vector cache data by name.- Specified by:
getVectorIndexin interfaceRealspaceProvider- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).- Returns:
- Vector data index file.
- Throws:
RealspaceException- 3D exception information.
-
getSceneInfo
public SceneInfo getSceneInfo(java.lang.String sceneName) throws RealspaceException
According to the name of the 3D scene, gets the information of the 3D scene.- Specified by:
getSceneInfoin interfaceRealspaceProvider- Parameters:
sceneName- the name of the 3D scene.- Returns:
- 3D scene information.
- Throws:
RealspaceException- 3D exception information.
-
getSceneNames
public java.util.List<java.lang.String> getSceneNames() throws RealspaceExceptionGets the name of all available 3D scenes for the current service provider.- Specified by:
getSceneNamesin interfaceRealspaceProvider- Returns:
- list of available scene names.
- Throws:
RealspaceException- 3D exception information.
-
isDataAvailable
public boolean isDataAvailable(java.lang.String dataName) throws RealspaceExceptionWhether the three-dimensional data is available.- Specified by:
isDataAvailablein interfaceRealspaceProvider- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).- Returns:
- 3D data is available to return true; otherwise it returns false.
- Throws:
RealspaceException- 3D exception information.
-
isSceneAvailable
public boolean isSceneAvailable(java.lang.String sceneName) throws RealspaceExceptionWhether the 3D scene is available.- Specified by:
isSceneAvailablein interfaceRealspaceProvider- Parameters:
sceneName- the name of the 3D scene.- Returns:
- 3D scene is available to return true; otherwise it returns false.
- Throws:
RealspaceException- 3D exception information.
-
setProviderContext
public void setProviderContext(ProviderContext context)
Sets the service provider context
- Specified by:
setProviderContextin interfaceProviderContextAware- Parameters:
context- service provider context
-
dispose
public void dispose()
Release object.
- Specified by:
disposein interfaceDisposable
-
refreshWorkspace
public void refreshWorkspace()
refreshes the workspace.
-
refreshWorkspaceFinished
public void refreshWorkspaceFinished()
Ends refreshing the workspace, then continues the request.
-
pauseForRefreshWorkspace
public void pauseForRefreshWorkspace()
Block requests to refresh the workspace.
-
getCacheAccessKey
public java.lang.String getCacheAccessKey()
Description copied from interface:RealspaceProviderReturns the password used to encrypt the cached data.- Specified by:
getCacheAccessKeyin interfaceRealspaceProvider- Returns:
- Returns the password used to encrypt the cached data.
-
isSecurityEnabled
public boolean isSecurityEnabled()
Description copied from interface:RealspaceProviderWhether the security mechanism is enabled.- Specified by:
isSecurityEnabledin interfaceRealspaceProvider- Returns:
- Returns true if the security mechanism is enabled; false otherwise.
-
cleanCacheData
public boolean cleanCacheData(java.lang.String dataName) throws RealspaceExceptionClears the cache of dynamic publishing data- Specified by:
cleanCacheDatain interfaceRealspaceProvider- Parameters:
dataName-- Returns:
- Throws:
RealspaceException
-
getOfflineDataPaths
public java.util.List<OfflineDataInfo> getOfflineDataPaths(java.lang.String sceneName, java.lang.String layerName) throws RealspaceException
Gets the location information for all data offline packages for a particular 3D scene- Specified by:
getOfflineDataPathsin interfaceRealspaceProvider- Parameters:
sceneName- Name of 3D scene.- Returns:
- Returns the offline package location
- Throws:
RealspaceException- Since:
- 6.1.3
-
getTilesRevisionInfo
public RealspaceTilesRevisionInfo getTilesRevisionInfo(java.lang.String dataName, long revisionNumber)
Description copied from interface:RealspaceProviderGets the tile change information for the specified version number.- Specified by:
getTilesRevisionInfoin interfaceRealspaceProviderrevisionNumber- version number.- Returns:
- Change information.
-
getdataSetFromWorkspace
public java.lang.Object getdataSetFromWorkspace(Workspace workspace, java.lang.String dataName)Gets the dataset or map object of the workspace in which the workspace is located- Parameters:
workspace-dataName- data name- Returns:
-
getLayerPrj
public PrjCoordSys getLayerPrj(java.lang.String sceneName, java.lang.String layerName) throws RealspaceException
Description copied from interface:RealspaceProviderGets the projection information for the specified layer- Specified by:
getLayerPrjin interfaceRealspaceProvider- Parameters:
sceneName- Scene name.layerName- Layer name- Returns:
- Layer projection information
- Throws:
RealspaceException
-
getLayerExtendXML
public java.lang.String getLayerExtendXML(java.lang.String sceneName, java.lang.String layerName) throws RealspaceExceptionDescription copied from interface:RealspaceProviderGets the layer extension information for the specified layer- Specified by:
getLayerExtendXMLin interfaceRealspaceProvider- Parameters:
sceneName- Scene name.layerName- Layer name- Returns:
- Layer extension information xml
- Throws:
RealspaceException