org.ala.layers.dao
Class LayerIntersectDAOImpl

java.lang.Object
  extended by org.ala.layers.dao.LayerIntersectDAOImpl
All Implemented Interfaces:
LayerIntersectDAO

@Service(value="layerIntersectDao")
public class LayerIntersectDAOImpl
extends java.lang.Object
implements LayerIntersectDAO

Implementation of the sampling.

Author:
adam

Constructor Summary
LayerIntersectDAOImpl()
           
 
Method Summary
 IntersectConfig getConfig()
          Get initialised IntersectConfig.
 java.lang.String reload()
          Refresh properties and table images.
 java.util.HashMap<java.lang.String,java.lang.String> sampling(double longitude, double latitude)
          Sampling one point, all cached fields.
 java.util.ArrayList<java.lang.String> sampling(IntersectionFile[] intersectionFiles, double[][] points)
          Sampling
 java.util.ArrayList<java.lang.String> sampling(java.lang.String[] fieldIds, double[][] points)
          Sampling
 java.util.ArrayList<java.lang.String> sampling(java.lang.String[] fieldIds, double[][] points, IntersectCallback callback)
          Sampling
 java.lang.String sampling(java.lang.String fieldIds, double longitude, double latitude)
          Single coordinate sampling.
 java.util.ArrayList<java.lang.String> sampling(java.lang.String fieldIds, java.lang.String pointsString)
          Sampling
 java.util.Vector samplingFull(java.lang.String fieldIds, double longitude, double latitude)
          Sampling one point, multiple fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayerIntersectDAOImpl

public LayerIntersectDAOImpl()
Method Detail

reload

public java.lang.String reload()
Description copied from interface: LayerIntersectDAO
Refresh properties and table images. Returns null if successful, else error as String.

Specified by:
reload in interface LayerIntersectDAO

samplingFull

public java.util.Vector samplingFull(java.lang.String fieldIds,
                                     double longitude,
                                     double latitude)
Description copied from interface: LayerIntersectDAO
Sampling one point, multiple fields. Full result returned Must have local access to layer files and db connection.

Specified by:
samplingFull in interface LayerIntersectDAO
Parameters:
fieldIds - fields to intersect as field table ids in comma separated String. e.g. "cl22,cl23"
longitude - longitude as double
latitude - latitude as double
Returns:
full result of sampling returned as Vector containing one Map for each fieldId. Map objects contain, "fieldid", "value", "layername", and in addition for shape results "pid", "description"

sampling

public java.lang.String sampling(java.lang.String fieldIds,
                                 double longitude,
                                 double latitude)
Single coordinate sampling.

Specified by:
sampling in interface LayerIntersectDAO
Parameters:
fieldIds - comma separated field ids.
longitude -
latitude -
Returns:
the intersection value for each input field id as a \n separated String.

sampling

public java.util.HashMap<java.lang.String,java.lang.String> sampling(double longitude,
                                                                     double latitude)
Description copied from interface: LayerIntersectDAO
Sampling one point, all cached fields. Must have local access to layer files and db connection.

Specified by:
sampling in interface LayerIntersectDAO
Parameters:
longitude - longitude as double
latitude - latitude as double
Returns:
full result of sampling returned as Map with key as field id and value String or Float

sampling

public java.util.ArrayList<java.lang.String> sampling(java.lang.String fieldIds,
                                                      java.lang.String pointsString)
Description copied from interface: LayerIntersectDAO
Sampling

Specified by:
sampling in interface LayerIntersectDAO
Parameters:
fieldIds - fields to intersect as field table ids in comma separated String. e.g. "cl22,cl23"
pointsString - latitude,longitude pairs, comma separated. e.g. "-20,120,-23,145"
Returns:
one string for each fieldId, containing new line separated intersection values of the field and pointsString pairs. As ArrayList.

sampling

public java.util.ArrayList<java.lang.String> sampling(java.lang.String[] fieldIds,
                                                      double[][] points,
                                                      IntersectCallback callback)
Description copied from interface: LayerIntersectDAO
Sampling

Specified by:
sampling in interface LayerIntersectDAO
Parameters:
fieldIds - fields to intersect as field table ids in String [].
points - longitude, latitude coordinates as double [][2]. [][0] is longitude, [][1] is latitude.
Returns:
one string for each fieldId, containing new line separated intersection values of the field and pointsString pairs. As ArrayList.

sampling

public java.util.ArrayList<java.lang.String> sampling(java.lang.String[] fieldIds,
                                                      double[][] points)
Description copied from interface: LayerIntersectDAO
Sampling

Specified by:
sampling in interface LayerIntersectDAO
Parameters:
fieldIds - fields to intersect as field table ids in String [].
points - longitude, latitude coordinates as double [][2]. [][0] is longitude, [][1] is latitude.
Returns:
one string for each fieldId, containing new line separated intersection values of the field and pointsString pairs. As ArrayList.

sampling

public java.util.ArrayList<java.lang.String> sampling(IntersectionFile[] intersectionFiles,
                                                      double[][] points)
Description copied from interface: LayerIntersectDAO
Sampling

Specified by:
sampling in interface LayerIntersectDAO
Parameters:
intersectionFiles - fields to intersect as IntersectionFile []
points - longitude, latitude coordinates as double [][2]. [][0] is longitude, [][1] is latitude.
Returns:
one string for each fieldId, containing new line separated intersection values of the field and pointsString pairs. As ArrayList.

getConfig

public IntersectConfig getConfig()
Description copied from interface: LayerIntersectDAO
Get initialised IntersectConfig.

Specified by:
getConfig in interface LayerIntersectDAO
Returns:
IntersectConfig


Copyright © 2014. All Rights Reserved.