public BytesWritable evaluate ( BytesWritable geomref ) { if ( geomref == null || geomref . getLength ( ) == 0 ) { LogUtils . Log_ArgumentsNull ( LOG ) ; return null ; } OGCGeometry ogcGeometry = GeometryUtils . geometryFromEsriShape ( geomref ) ; if ( ogcGeometry == null ) { LogUtils . Log_ArgumentsNull ( LOG ) ; return null ; } if ( GeometryUtils . getType ( geomref ) == GeometryUtils . OGCType . ST_LINESTRING ) { MultiPath lines = ( MultiPath ) ( ogcGeometry . getEsriGeometry ( ) ) ; int wkid = GeometryUtils . getWKID ( geomref ) ; SpatialReference spatialReference = null ; if ( wkid != GeometryUtils . WKID_UNKNOWN ) { spatialReference = SpatialReference . create ( wkid ) ; } return GeometryUtils . geometryToEsriShapeBytesWritable ( OGCGeometry . createFromEsriGeometry ( lines . getPoint ( lines . getPointCount ( ) - 1 ) , spatialReference ) ) ; } else { LogUtils . Log_InvalidType ( LOG , GeometryUtils . OGCType . ST_LINESTRING , GeometryUtils . getType ( geomref ) ) ; return null ; } }
Return the last point of the ST_Linestring .