com.supermap.services.components.impl

Class RealspaceImpl

  • java.lang.Object
    • com.supermap.services.components.impl.RealspaceImpl
    • 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
      boolean cleanCacheData(java.lang.String dataName)
      Clears the cache of dynamic publishing data.
      void dispose()
      Release the resource object.
      java.lang.String getCacheAccessKey()
      Returns the password used to encrypt the cached data.
      RealspaceDataResult getData(RealspaceDataParam dataParam)
      Gets 3D tile data results.
      RealspaceDataResult getData(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.String getDataVersion(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.String getDataVersion(java.lang.String dataName, java.lang.String relativePath)
      Obtains the latest version number of the tile data according to the relative path.
      java.lang.String getLayerExtendXML(java.lang.String sceneName, java.lang.String layerName)
      Gets the layer extension information for the specified layer
      PrjCoordSys getLayerPrj(java.lang.String sceneName, java.lang.String layerName)
      Gets the projection information for the specified layer
      byte[] 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 scene
      SceneInfo getSceneInfo(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.
      RealspaceTilesRevisionInfo getTilesRevisionInfo(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.
      boolean isCacheCanReuse()
      Whether the three-dimensional cache is allowed to copy and reuse.
      boolean isDataAvailable(java.lang.String dataName)
      Whether the three-dimensional data is available.
      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.
      boolean isSceneAvailable(java.lang.String sceneName)
      Whether the 3D scene is available.
      boolean isSecurityEnabled()
      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 name
      void setComponentContext(ComponentContext context)
      Sets the context information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 RealspaceException
        
        Returns the name of all available 3D scenes.
        Specified by:
        getSceneNames in interface Realspace
        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:
        getSceneInfo in interface Realspace
        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 RealspaceException
        
        Obtain the latest version number of the tile data according to the index.
        Specified by:
        getDataVersion in interface Realspace
        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 RealspaceException
        

        Obtains 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:
getDataVersion in interface Realspace
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.
  • getDataConfig

    public final byte[] getDataConfig(java.lang.String dataName)
                               throws RealspaceException
    
    Obtains 3D cache data configuration file according to the name of the 3D data.
    Specified by:
    getDataConfig in interface Realspace
    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 RealspaceException
    
    Description copied from interface: Realspace
    Gets the configuration file for the 3D cache data by name.
    Specified by:
    getDataConfig in interface Realspace
    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 RealspaceException
    

    The 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:
    getModelIndex in interface Realspace
    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 RealspaceException
    

    According 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:
    getVectorIndex in interface Realspace
    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 -
  • isDataAvailable

    public final boolean isDataAvailable(java.lang.String dataName)
                                  throws RealspaceException
    
    Whether the three-dimensional data is available.
    Specified by:
    isDataAvailable in interface Realspace
    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 RealspaceException
    
    Whether the 3D scene is available.
    Specified by:
    isSceneAvailable in interface Realspace
    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.
  • dispose

    public void dispose()
    

    Release the resource object. All classes that need to achieve releasing resources need to be implemented ().

    Specified by:
    dispose in interface Disposable
  • getCacheAccessKey

    public java.lang.String getCacheAccessKey()
                                       throws RealspaceException
    

    Returns the password used to encrypt the cached data.

    Specified by:
    getCacheAccessKey in interface Realspace
    Returns:
    Returns the password used to encrypt the cached data.
    Throws:
    RealspaceException - 3D exception information.
  • isSecurityEnabled

    public boolean isSecurityEnabled()
                              throws RealspaceException
    

    Whether the security mechanism is enabled.

    Specified by:
    isSecurityEnabled in interface Realspace
    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 RealspaceException
    
    Clears the cache of dynamic publishing data.
    Specified by:
    cleanCacheData in interface Realspace
    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:
    getOfflineDataPaths in interface Realspace
    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: Realspace

    Whether the three-dimensional cache is allowed to copy and reuse.

    Specified by:
    isCacheCanReuse in interface Realspace
    Returns:
  • getLayerPrj

    public PrjCoordSys getLayerPrj(java.lang.String sceneName,
                          java.lang.String layerName)
                            throws RealspaceException
    
    Description copied from interface: Realspace
    Gets the projection information for the specified layer
    Specified by:
    getLayerPrj in interface Realspace
    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 RealspaceException
    
    Description copied from interface: Realspace
    Gets the layer extension information for the specified layer
    Specified by:
    getLayerExtendXML in interface Realspace
    Parameters:
    sceneName - Scene name.
    layerName - Layer name
    Returns:
    Layer extension information xml
    Throws:
    RealspaceException