com.supermap.services.providers

Class RestRealspaceProvider

  • All Implemented Interfaces:
    Disposable, ProviderContextAware, RealspaceProvider


    public class RestRealspaceProvider
    extends RestProviderBase
    implements RealspaceProvider, ProviderContextAware
    

    Rest realspace service provider.

    RestRealspaceProvider provides access to SuperMap 3D related services from iServer realspace REST service and encapsulates GIS functionality related to SuperMap 3D.


    RestRealspaceProvider supports access to 3D scenes and 3D datasets; does not support symbol operations; does not support 3D data caching.

    • Constructor Detail

      • RestRealspaceProvider

        public RestRealspaceProvider()
        

        The Constructor.

      • RestRealspaceProvider

        public RestRealspaceProvider(RestRealspaceProviderSetting setting)
        

        The Constructor.

        Parameters:
        setting - Rest realspace service provider parameter object.
    • Method Detail

      • getDataConfig

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

        Gets the model index file for the 3D cache data by name.

        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 RealspaceProvider
        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
        
        Description copied from interface: RealspaceProvider
        Obtains the index file of the 3D vector cache data by name.
        Specified by:
        getVectorIndex in interface RealspaceProvider
        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.
      • isDataAvailable

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

        public boolean isSecurityEnabled()
        
        Description copied from interface: RealspaceProvider
        Whether the security mechanism is enabled.
        Specified by:
        isSecurityEnabled in interface RealspaceProvider
        Returns:
        Returns true if the security mechanism is enabled; false otherwise.
      • getCacheAccessKey

        public java.lang.String getCacheAccessKey()
        
        Description copied from interface: RealspaceProvider
        Returns the password used to encrypt the cached data.
        Specified by:
        getCacheAccessKey in interface RealspaceProvider
        Returns:
        Returns the password used to encrypt the cached data.
      • getOfflineDataPaths

        public java.util.List<OfflineDataInfo> getOfflineDataPaths(java.lang.String sceneName,
                                                          java.lang.String layerName)
        
        Description copied from interface: RealspaceProvider
        Gets all offline data paths for a particular 3D layer under a particular 3D scene

        Specified by:
        getOfflineDataPaths in interface RealspaceProvider
        Parameters:
        sceneName - Name of 3D scene.
        Returns:
        Returns the offline package location
      • getDataVersion

        public java.lang.String getDataVersion(java.lang.String dataName,
                                      int xIndex,
                                      int yIndex,
                                      int level,
                                      java.lang.String fileExtension)
                                        throws RealspaceException
        
        Description copied from interface: RealspaceProvider
        Obtain the latest version number of the tile data according to the index.
        Specified by:
        getDataVersion in interface RealspaceProvider
        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 RealspaceException
        
        Description copied from interface: RealspaceProvider

        Obtains 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:
getDataVersion in interface RealspaceProvider
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.
  • getLayerPrj

    public PrjCoordSys getLayerPrj(java.lang.String sceneName,
                          java.lang.String layerName)
    
    Description copied from interface: RealspaceProvider
    Gets the projection information for the specified layer
    Specified by:
    getLayerPrj in interface RealspaceProvider
    Parameters:
    sceneName - Scene name.
    layerName - Layer name
    Returns:
    Layer projection information
  • getLayerExtendXML

    public java.lang.String getLayerExtendXML(java.lang.String sceneName,
                                     java.lang.String layerName)
                                       throws RealspaceException
    
    Description copied from interface: RealspaceProvider
    Gets the layer extension information for the specified layer
    Specified by:
    getLayerExtendXML in interface RealspaceProvider
    Parameters:
    sceneName - Scene name.
    layerName - Layer name
    Returns:
    Layer extension information xml
    Throws:
    RealspaceException