Class RealspaceImpl
- java.lang.Object
-
- com.supermap.services.components.impl.RealspaceImpl
-
- All Implemented Interfaces:
- ComponentContextAware, Realspace, Disposable
public class RealspaceImpl extends java.lang.Object implements Realspace, ComponentContextAware, Disposable
The implementation class for the 3D Services component interface (
Realspace).Three - dimensional service component is a class of GIS service components that encapsulate GIS functions related to three - dimensional.
-
-
Constructor Summary
Constructors Constructor and Description RealspaceImpl()The Constructor.RealspaceImpl(RealspaceContext context)Constructs a RealspaceImpl object based on the three-dimensional context information.
-
Method Summary
Methods Modifier and Type Method and Description booleancleanCacheData(java.lang.String dataName)Clears the cache of dynamic publishing data.voiddispose()Release the resource 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 sceneName, java.lang.String layerName, RealspaceDataParam dataParam)According to the scene name and layer name and tile parameters three-dimensional tile data results.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 fall 3D data information.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()Returns the name of all available 3D scenes.RealspaceTilesRevisionInfogetTilesRevisionInfo(java.lang.String dataName, long revisionNumber)Gets the tile change information for the specified version number.byte[]getVectorIndex(java.lang.String dataName)According to the name of the 3D data to obtain the three-dimensional vector cache data index file.booleanisCacheCanReuse()Whether the three-dimensional cache is allowed to copy and reuse.booleanisDataAvailable(java.lang.String dataName)Whether the three-dimensional data is available.static booleanisDataAvaliableUseLayerName(RealspaceProvider realspaceProvider, java.lang.String layerName)Whether the three-dimensional provider supports the given data, and refers to the data with the layer name.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 dataParam)Generates 3D tiles into memory based on scene name and layer namevoidsetComponentContext(ComponentContext context)Sets the context information.
-
-
-
Constructor Detail
-
RealspaceImpl
public RealspaceImpl()
The Constructor.
-
RealspaceImpl
public RealspaceImpl(RealspaceContext context)
Constructs a RealspaceImpl object based on the three-dimensional context information.- Parameters:
context- Three-dimensional context information.
-
-
Method Detail
-
getSceneNames
public final java.util.List<java.lang.String> getSceneNames() throws RealspaceExceptionReturns the name of all available 3D scenes.- Specified by:
getSceneNamesin interfaceRealspace- Returns:
- List of available scene names.
- Throws:
RealspaceException- 3D exception information.
-
getSceneInfo
public final 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 interfaceRealspace- Parameters:
sceneName- the name of the 3D scene.- Returns:
- 3D scene information.
- Throws:
RealspaceException- 3D exception information.
-
getDataVersion
public final 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 interfaceRealspace- Parameters:
dataName- The name of the 3D data. 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:
- The version of the tile dataware.
- Throws:
RealspaceException- 3D exception information.
-
getDataVersion
public final 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 settings of 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 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 interfaceRealspace- 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.
-
getData
public RealspaceDataResult getData(java.lang.String sceneName, java.lang.String layerName, RealspaceDataParam dataParam) throws RealspaceException
Description copied from interface:RealspaceAccording to the scene name and layer name and tile parameters three-dimensional tile data results.- Specified by:
getDatain interfaceRealspace- Parameters:
sceneName- Scene name.layerName- Layer name.dataParam- Tile parameters.- Throws:
RealspaceException
-
getData
public RealspaceDataResult getData(RealspaceDataParam dataParam) throws RealspaceException
Description copied from interface:RealspaceGets 3D tile data results.- Specified by:
getDatain interfaceRealspace- Parameters:
dataParam- Tile parameters.- Throws:
RealspaceException
-
getDataConfig
public final byte[] getDataConfig(java.lang.String dataName) throws RealspaceExceptionObtains 3D cache data configuration file according to the name of the 3D data.- Specified by:
getDataConfigin interfaceRealspace- 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:RealspaceGets the configuration file for the 3D cache data by name.- Specified by:
getDataConfigin interfaceRealspace- 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.
-
getModelIndex
public final 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 interfaceRealspace- 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 RealspaceExceptionAccording to the name of the 3D data to obtain the three-dimensional vector cache data index file.
The file is in the same parent directory as the "dat" file extension, with the configuration file for the vector cached data (the file with the extension "scv").
- Specified by:
getVectorIndexin interfaceRealspace- Parameters:
dataName- The name of the 3D data. Corresponds to the name of the 3D layer in the SuperMap 3D scene (LayerName).- Returns:
- Vector index file.
- Throws:
RealspaceException- 3D exception information.
-
isDataAvaliableUseLayerName
public static boolean isDataAvaliableUseLayerName(RealspaceProvider realspaceProvider, java.lang.String layerName)
Whether the three-dimensional provider supports the given data, and refers to the data with the layer name.- Parameters:
realspaceProvider-dataName-
-
getDataInfos
public final java.util.List<RealspaceDataInfo> getDataInfos() throws RealspaceException
Gets fall 3D data information.- Specified by:
getDataInfosin interfaceRealspace- Returns:
- 3D data information.
- Throws:
RealspaceException- 3D exception information.
-
isDataAvailable
public final boolean isDataAvailable(java.lang.String dataName) throws RealspaceExceptionWhether the three-dimensional data is available.- Specified by:
isDataAvailablein interfaceRealspace- 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 final boolean isSceneAvailable(java.lang.String sceneName) throws RealspaceExceptionWhether the 3D scene is available.- Specified by:
isSceneAvailablein interfaceRealspace- 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.
-
setComponentContext
public void setComponentContext(ComponentContext context)
Sets the context information.
- Specified by:
setComponentContextin interfaceComponentContextAware- Parameters:
context- Context information
-
dispose
public void dispose()
Release the resource object. All classes that need to achieve releasing resources need to be implemented
().- Specified by:
disposein interfaceDisposable
-
getCacheAccessKey
public java.lang.String getCacheAccessKey() throws RealspaceExceptionReturns the password used to encrypt the cached data.
- Specified by:
getCacheAccessKeyin interfaceRealspace- Returns:
- Returns the password used to encrypt the cached data.
- Throws:
RealspaceException- 3D exception information.
-
isSecurityEnabled
public boolean isSecurityEnabled() throws RealspaceExceptionWhether the security mechanism is enabled.
- Specified by:
isSecurityEnabledin interfaceRealspace- Returns:
- Returns true if the security mechanism is enabled; false otherwise.
- Throws:
RealspaceException- 3D exception information.
-
cleanCacheData
public boolean cleanCacheData(java.lang.String dataName) throws RealspaceExceptionClears the cache of dynamic publishing data.- Specified by:
cleanCacheDatain interfaceRealspace- Parameters:
dataName- Data name whoes cache needs to be cleared.- Returns:
- Returns true if clear successfully, false otherwise.
- Throws:
RealspaceException- 3D exception information.
-
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 interfaceRealspace- Parameters:
sceneName- Name of 3D scene.- Returns:
- Returns the offline package location
- Throws:
RealspaceException- Since:
- 6.1.3
-
isCacheCanReuse
public boolean isCacheCanReuse()
Description copied from interface:RealspaceWhether the three-dimensional cache is allowed to copy and reuse.
- Specified by:
isCacheCanReusein interfaceRealspace- Returns:
-
getTilesRevisionInfo
public RealspaceTilesRevisionInfo getTilesRevisionInfo(java.lang.String dataName, long revisionNumber) throws RealspaceException
Description copied from interface:RealspaceGets the tile change information for the specified version number.- Specified by:
getTilesRevisionInfoin interfaceRealspacerevisionNumber- version number.- Returns:
- Change information.
- Throws:
RealspaceException
-
getLayerPrj
public PrjCoordSys getLayerPrj(java.lang.String sceneName, java.lang.String layerName) throws RealspaceException
Description copied from interface:RealspaceGets the projection information for the specified layer- Specified by:
getLayerPrjin interfaceRealspace- Parameters:
sceneName- Scene name.layerName- Layer name- Returns:
- Layer projection information
- Throws:
RealspaceException
-
outputDataToMemory
public RealspaceDataResult[] outputDataToMemory(java.lang.String sceneName, java.lang.String layerName, Output3DDataToMemoryParam dataParam) throws RealspaceException
Description copied from interface:RealspaceGenerates 3D tiles into memory based on scene name and layer name- Specified by:
outputDataToMemoryin interfaceRealspace- Parameters:
sceneName- Scene name.layerName- Layer name- Returns:
- The generated three-dimensional tiles
- Throws:
RealspaceException
-
getLayerExtendXML
public java.lang.String getLayerExtendXML(java.lang.String sceneName, java.lang.String layerName) throws RealspaceExceptionDescription copied from interface:RealspaceGets the layer extension information for the specified layer- Specified by:
getLayerExtendXMLin interfaceRealspace- Parameters:
sceneName- Scene name.layerName- Layer name- Returns:
- Layer extension information xml
- Throws:
RealspaceException