com.supermap.services.wms

Class DefaultWMS

  • java.lang.Object
    • com.supermap.services.wms.DefaultWMS
  • All Implemented Interfaces:
    WMS


    public class DefaultWMS
    extends java.lang.Object
    implements WMS
    

    The default realization class of the WMS service interface.

    The WMS 1.1.1 standard realization based on OGC (Open Geospatial Consortium).

    • Constructor Detail

      • DefaultWMS

        public DefaultWMS(Map mapImpl,
                  WMSConfig wmsConfig)
                   throws OGCException
        

        Construct the DefaultWMS object according to the description information of the map service component, map name, and the published WMS service.

        Parameters:
        mapImpl - the map service component.
        wmsConfig - WMS configuration information.
        Throws:
        OGCException - it occurs the exception when there is map name error.
    • Method Detail

      • getCapabilities

        public WMSCapabilities getCapabilities(java.lang.String version)
                                        throws OGCException
        

        Get WMS service meta data.

        The method is used to obtain the service metadata, and the metadata is used to describe the server information content and the acceptable request parameter value, which is a machine readable (and suitable for people to read) description.

        Specified by:
        getCapabilities in interface WMS
        Parameters:
        version - WMS service version.
        Returns:
        WMSCapabilities object.
        Throws:
        OGCException - OGC exception information.
      • getCapabilitiesHeadInfo

        protected static ServiceDescription getCapabilitiesHeadInfo()
                                                             throws OGCException
        
        Get the service description information of Capabilities.
        Returns:
        Service description info.
        Throws:
        OGCException - OGC exception information.
      • getFeatureInfo

        public WMSFeatureInfo[] getFeatureInfo(java.lang.String version,
                                      WMSQueryParameter wmsQueryParam)
                                        throws OGCException
        

        Get the feature information.

        This method is used to get the map element information, and the map is returned by the GetMap operation, therefore, to access the GetFeatureInfo operation should first visit the GetMap operation to obtain the map, the user selects a point in the acquired map (point (i, j)) for more information. The user can specify the pixels to be searched, the layers of the query, and the format of the returned information.

        The operation is valid for the layer whose queryable attribute is "1", for other layers the client can not send GetFeatureInfo operation request. When the WMS service receives an unsupported GetFeatureInfo

        Specified by:
        getFeatureInfo in interface WMS
        Parameters:
        version - WMS service version.
        wmsQueryParam - WMS query parameters.
        Returns:
        WMSFeatureInfo array.
        Throws:
        OGCException - OGC exception information.
      • pointPixelToPoint2D

        protected static Point2D pointPixelToPoint2D(Point point,
                                  MapParameter mapParam)
        
        Convert the pixel coordinates into 2D geographical coordinates.
        Parameters:
        point - pixel coordinates.
        mapParam - map parameters.
        Returns:
        2D geographical coordinates.
      • getMap

        public byte[] getMap(java.lang.String version,
                    WMSMapParameter wmsMapParam)
                      throws OGCException
        

        Get the binary stream of the map tiles.

        Specified by:
        getMap in interface WMS
        Parameters:
        version - WMS service version.
        wmsMapParam - WMS map parameters.
        Returns:
        The binary stream of the map tiles.
        Throws:
        OGCException - OGC exception information.