Class DefaultWMS
- java.lang.Object
-
- com.supermap.services.wms.DefaultWMS
-
-
Constructor Summary
Constructors Constructor and Description DefaultWMS(Map mapImpl, WMSConfig wmsConfig)Construct theDefaultWMSobject according to the description information of the map service component, map name, and the published WMS service.
-
Method Summary
Methods Modifier and Type Method and Description protected Rectangle2DgetApproximateBounds(Rectangle2D layerBounds, Rectangle2D mapBounds)WMSCapabilitiesgetCapabilities(java.lang.String version)Get WMS service meta data.protected static ServiceDescriptiongetCapabilitiesHeadInfo()Get the service description information of Capabilities.WMSFeatureInfo[]getFeatureInfo(java.lang.String version, WMSQueryParameter wmsQueryParam)Get the feature information.byte[]getMap(java.lang.String version, WMSMapParameter wmsMapParam)Get the binary stream of the map tiles.protected static Point2DpointPixelToPoint2D(Point point, MapParameter mapParam)Convert the pixel coordinates into 2D geographical coordinates.
-
-
-
Constructor Detail
-
DefaultWMS
public DefaultWMS(Map mapImpl, WMSConfig wmsConfig) throws OGCException
Construct the
DefaultWMSobject 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:
getCapabilitiesin interfaceWMS- Parameters:
version- WMS service version.- Returns:
- WMSCapabilities object.
- Throws:
OGCException- OGC exception information.
-
getApproximateBounds
protected Rectangle2D getApproximateBounds(Rectangle2D layerBounds, Rectangle2D mapBounds)
-
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:
getFeatureInfoin interfaceWMS- 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 OGCExceptionGet the binary stream of the map tiles.
- Specified by:
getMapin interfaceWMS- Parameters:
version- WMS service version.wmsMapParam- WMS map parameters.- Returns:
- The binary stream of the map tiles.
- Throws:
OGCException- OGC exception information.
-
-