Package org.codice.alliance.libs.klv
Class LatitudeLongitudeHandler
java.lang.Object
org.codice.alliance.libs.klv.BaseKlvHandler
org.codice.alliance.libs.klv.LatitudeLongitudeHandler
- All Implemented Interfaces:
KlvHandler,Trimmable
This handler expects pairs of latitude and longitude values. It generates WKT Points.
-
Constructor Summary
ConstructorsConstructorDescriptionLatitudeLongitudeHandler(String attributeName, String latitudeFieldName, String longitudeFieldName) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaccept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement) The handler accepts the incoming KLV metadata.Optional<ddf.catalog.data.Attribute>AfterKlvHandler.accept(KlvDataElement)has been called with all of the incoming data, this method will convert it to anAttribute.asSubsampledHandler(int subsampleCount) voidreset()Reset the handler to its initial state.voidtrim()Trim the arrays of lat and lon values to the same length.Methods inherited from class org.codice.alliance.libs.klv.BaseKlvHandler
asAttribute, getAttributeName, getMinimumListSize, subsample
-
Constructor Details
-
LatitudeLongitudeHandler
-
-
Method Details
-
getLongitudeFieldName
-
getLatitudeFieldName
-
getRawGeoData
-
asAttribute
Description copied from interface:KlvHandlerAfterKlvHandler.accept(KlvDataElement)has been called with all of the incoming data, this method will convert it to anAttribute. If there is insufficient data to create an Attribute, then the Optional will be empty.- Specified by:
asAttributein interfaceKlvHandler- Returns:
- optional attribute
-
asSubsampledHandler
-
trim
public void trim()Trim the arrays of lat and lon values to the same length. -
accept
public void accept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement) Description copied from interface:KlvHandlerThe handler accepts the incoming KLV metadata. If the incoming KLV metadata is not the datatype expected by this handler, then the handler should log a warning and return.- Specified by:
acceptin interfaceKlvHandler- Parameters:
klvDataElement- incoming klv metadata
-
reset
public void reset()Description copied from interface:KlvHandlerReset the handler to its initial state.- Specified by:
resetin interfaceKlvHandler
-
accept
-