com.supermap.services.providers

Class GeoPackageMapProvider

    • Constructor Detail

      • GeoPackageMapProvider

        public GeoPackageMapProvider()
        
    • Method Detail

      • getResource

        public java.lang.String getResource(java.lang.String mapName,
                                   ResourceParameter resourceParameter)
        
        Description copied from interface: MapProvider

        Gets the resource image of a specified map according to a resource image parameter.

        Specified by:
        getResource in interface MapProvider
        Overrides:
        getResource in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        resourceParameter - The resource image parameter.
        Returns:
        The resource image address.
      • measureDistance

        public MeasureResult measureDistance(java.lang.String mapName,
                                    Point2D[] points,
                                    MeasureParameter measureParam)
        
        Description copied from interface: MapProvider

        Measures distances on a specified map based on 2D geographic coordinates and a measuring parameter.

        Specified by:
        measureDistance in interface MapProvider
        Overrides:
        measureDistance in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        points - The array of 2D geographic coordinates.
        measureParam - The measuring parameter.
        Returns:
        Measurement result object.
      • measureArea

        public MeasureResult measureArea(java.lang.String mapName,
                                Point2D[] points,
                                MeasureParameter measureParam)
        
        Description copied from interface: MapProvider

        Measures areas on a specified map based on 2D geographic coordinates and a measuring parameter.

        Specified by:
        measureArea in interface MapProvider
        Overrides:
        measureArea in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        points - The array of 2D geographic coordinates.
        measureParam - The measuring parameter.
        Returns:
        Measurement result object.
      • queryByDistance

        public QueryResult queryByDistance(java.lang.String mapName,
                                  Geometry geometry,
                                  double distance,
                                  QueryParameterSet queryParameterSet)
        
        Description copied from interface: MapProvider

        Queries all the geometric objects on a specified map whose distances to a specified geometry are within a certain value.

        Which means to query all the geometries within a circle whose center is the specified geometry.

        Specified by:
        queryByDistance in interface MapProvider
        Overrides:
        queryByDistance in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        geometry - The geometric object.
        distance - The querying distance.
        queryParameterSet - Query parameters can query multiple layers of a map. The query parameters in a single layer can be set in queryParameterSet.queryParams[i] .
        Returns:
        Query result object.
      • queryByGeometry

        public QueryResult queryByGeometry(java.lang.String mapName,
                                  Geometry geometry,
                                  SpatialQueryMode spatialQueryMode,
                                  QueryParameterSet queryParameterSet)
        
        Description copied from interface: MapProvider

        Queries geometric objects that satisfy a certain spatial relationship with a specified geometric object and meet query conditions on a specified map.

        Specified by:
        queryByGeometry in interface MapProvider
        Overrides:
        queryByGeometry in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        geometry - The geometric object, which has spatial information and shape information, but no attribute information.
        spatialQueryMode - The spatial query mode, which defines several spatial relationships between geometries, and it allows users to construct filter conditions to perform querying. For example, searching spatial objects which are contained in specified region object, or which have a disjoint or adjacent relationship with the specified region object.
        queryParameterSet - Query parameters can query multiple layers of a map. The query parameters in a single layer can be set in queryParameterSet.queryParams[i] .
        Returns:
        Query result object.
      • getDefaultMapParameter

        public MapParameter getDefaultMapParameter(java.lang.String mapName)
        
        Description copied from interface: MapProvider

        Gets the default map parameters of the specified map.

        Retrieval of the initial default map parameter depends on the type of the service accessed. For example, if the GIS functions provided by SuperMap Objects Java are accessed, the initial default map parameter is obtained from a workspace file; if the GIS functions of a WMS service are accessed, the default map parameter is determined in the WMS service.

        Specified by:
        getDefaultMapParameter in interface MapProvider
        Overrides:
        getDefaultMapParameter in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        Returns:
        The map parameter object.
      • viewEntire

        public MapImage viewEntire(java.lang.String layerName,
                          MapParameter mapParameter,
                          ImageOutputOption outputOption)
        
        Description copied from interface: MapProvider

        Displays a map in the Full Extent mode according to map layer name, map parameters and image output settings.

        The full geographic map extent to display is the minimum circumscribed rectangle of the specified layer.

        Specified by:
        viewEntire in interface MapProvider
        Overrides:
        viewEntire in class TiledMapProviderBase
        Parameters:
        layerName - Layer name, used to determine the full map extent.
        mapParameter - Map parameters.
        outputOption - Image output settings.
        Returns:
        The Map object.
      • findNearest

        public QueryResult findNearest(java.lang.String mapName,
                              Geometry geometry,
                              double maxDistance,
                              QueryParameterSet queryParameterSet)
        
        Description copied from interface: MapProvider

        Queries the nearest geometric object on a specified map whose distance to a specified geometry is within a certain value. When limit the number of returned geometric objects (specified by QueryParameterSet.expectCount), the query result is the expectCount features nearest to the center in the records. There is no orders of expectCount.

        Specified by:
        findNearest in interface MapProvider
        Overrides:
        findNearest in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        geometry - The geometric object.
        maxDistance - The maximum distance, of which the unit is identical with that of the map specified with mapName parameter.
        queryParameterSet - Query parameters can query multiple layers of a map. The query parameters in a single layer can be set in queryParameterSet.queryParams[i] .
        Returns:
        Query result object.
      • support

        public boolean support(java.lang.String mapName,
                      MapCapability capability)
        
        Description copied from interface: MapProvider
        Determines whether the map supports the specified function.
        Specified by:
        support in interface MapProvider
        Overrides:
        support in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        capability - Function type.
        Returns:
        true means to support; otherwise, false.
      • outputImage

        protected byte[] outputImage(MapParameter param,
                         ImageOutputOption outputOption,
                         double currentResolution)
        
        Description copied from class: TiledMapProviderBase

        Output image in real time. It is stored in the specified path according to the map parameter.

        Overrides:
        outputImage in class TiledMapProviderBase
        Parameters:
        param - Map status
        outputOption - Image parameter
        currentResolution - Resolution
      • getSupportResolutions

        public double[] getSupportResolutions(java.lang.String mapName)
        
        Description copied from class: TiledMapProviderBase

        Returns the resolution of the current service support. If all resolutions are supported, empty is returned.

        Specified by:
        getSupportResolutions in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        Returns:
        The resolution array.
      • initDefaultMapParameter

        protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
        
        Description copied from class: TiledMapProviderBase

        Initializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.

        Specified by:
        initDefaultMapParameter in class TiledMapProviderBase
        Returns:
        Map status mapping. The key is the map name, and the value is the map parameter object.
      • getOrigin

        protected Point2D getOrigin(java.lang.String mapName)
        
        Description copied from class: TiledMapProviderBase

        Get the geographical coordinate of left upper corner of the map.

        Specified by:
        getOrigin in class TiledMapProviderBase
        Parameters:
        mapName - The map name.
        Returns:
        The geographical coordinate of left upper corner of the map.
      • isResolutionEquals

        protected boolean isResolutionEquals(double resolution1,
                                 double resolution2)
        
        Description copied from class: TiledMapProviderBase

        Determines if two resolutions are within the tolerance (1.0E-6)

        Overrides:
        isResolutionEquals in class TiledMapProviderBase
        Parameters:
        resolution1 - double
        resolution2 - double
        Returns:
        Is it equal