Class TLcdWMSGeoJsonGetFeatureInfoEncoder
java.lang.Object
com.luciad.wms.server.viewencoder.TLcdWMSGeoJsonGetFeatureInfoEncoder
- All Implemented Interfaces:
ILcdWMSGetFeatureInfoRequestEncoder
@LcdService(service=ILcdWMSGetFeatureInfoRequestEncoder.class,
priority=20000)
public class TLcdWMSGeoJsonGetFeatureInfoEncoder
extends Object
implements ILcdWMSGetFeatureInfoRequestEncoder
Feature info encoder that encodes the features as GeoJSON.
The geometries of the features are converted to WGS-84.
Geometries that are not supported within GeoJSON are converted to discretized versions of supported geometries.
If they cannot be discretized, the bounds are used as fallback.
- Since:
- 2017.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a feature info encoder that encodes the features as GeoJSON.TLcdWMSGeoJsonGetFeatureInfoEncoder(boolean aUseDisplayNames) Creates a feature info encoder that encodes the features as GeoJSON. -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(ILcdGXYLayerSubsetList aSelectionSublist, OutputStream aOutputStream, ILcdGXYView aGXYView, TLcdWMSRequestContext aWMSRequestContext) Encodes the given selection in theTLcdGXYLayerSubsetListfrom a givenILcdGXYViewand sends it to the givenOutputStream.Returns the content MIME type of the encoder.
-
Constructor Details
-
TLcdWMSGeoJsonGetFeatureInfoEncoder
public TLcdWMSGeoJsonGetFeatureInfoEncoder()Creates a feature info encoder that encodes the features as GeoJSON. Thedata property nameis used as key for the feature info properties. -
TLcdWMSGeoJsonGetFeatureInfoEncoder
public TLcdWMSGeoJsonGetFeatureInfoEncoder(boolean aUseDisplayNames) Creates a feature info encoder that encodes the features as GeoJSON.- Parameters:
aUseDisplayNames- If true thedisplay nameis used as key for the feature info properties. Whenfalsethedata property nameis used as key for the feature info properties.- Since:
- 2025.0
-
-
Method Details
-
getContentType
Description copied from interface:ILcdWMSGetFeatureInfoRequestEncoderReturns the content MIME type of the encoder.- Specified by:
getContentTypein interfaceILcdWMSGetFeatureInfoRequestEncoder- Returns:
- the MIME-type as
String.
-
encode
public void encode(ILcdGXYLayerSubsetList aSelectionSublist, OutputStream aOutputStream, ILcdGXYView aGXYView, TLcdWMSRequestContext aWMSRequestContext) throws jakarta.servlet.ServletException Description copied from interface:ILcdWMSGetFeatureInfoRequestEncoderEncodes the given selection in theTLcdGXYLayerSubsetListfrom a givenILcdGXYViewand sends it to the givenOutputStream.- Specified by:
encodein interfaceILcdWMSGetFeatureInfoRequestEncoder- Parameters:
aSelectionSublist- aTLcdGXYLayerSubsetListcontaining the selection to be encoded.aOutputStream- theOutputStreamto write the output to.aGXYView- theILcdGXYViewin which the elements are selected .aWMSRequestContext- a container for the original request and other related request parameters.- Throws:
jakarta.servlet.ServletException- for writing and sending exceptions.
-