super( 1, fieldDeclaration );
}
public void operate( FlowProcess flowProcess, FunctionCall functionCall )
{
TupleEntry argument = functionCall.getArguments();
double tree_lat = argument.getDouble( 0 );
double tree_lng = argument.getDouble( 1 );
double lat0 = argument.getDouble( 2 );
double lng0 = argument.getDouble( 3 );
double lat1 = argument.getDouble( 4 );
double lng1 = argument.getDouble( 5 );
// approximation in meters, based on a euclidean approach
// for a better metric, try using a Haversine formula
//double tree_dist = pointToLineDistance( lat0, lng0, lat1, lng1, tree_lat, tree_lng );