org.deegree.services.wps.provider.sextante
Class VectorLayerAdapter

java.lang.Object
  extended by org.deegree.services.wps.provider.sextante.VectorLayerAdapter

public class VectorLayerAdapter
extends Object

The VectorLayerAdapter has methods to create a IVectorLayer from a Geometry,
Feature or FeatureCollection and methods to create a Geometry, Feature or FeatureCollection from a IVectorLayer .

Version:
$Revision: $, $Date: $
Author:
Jens Pabel, last edited by: $Author: pabel $

Field Summary
static String APP_NS
           
static String APP_PREFIX
           
 
Constructor Summary
VectorLayerAdapter()
           
 
Method Summary
static Feature createFeature(es.unex.sextante.dataObjects.IVectorLayer l)
          Creates a Feature from an IVectorLayer.
static GenericFeatureCollection createFeatureCollection(es.unex.sextante.dataObjects.IVectorLayer l)
          Creates a FeatureCollection from an IVectorLayer.
static Geometry createGeometry(es.unex.sextante.dataObjects.IVectorLayer l)
          Creates a Geometry from an IVectorLayer.
static VectorLayerImpl createVectorLayer(Feature f)
          Creates an IVectorLayer from a Feature.
static VectorLayerImpl createVectorLayer(FeatureCollection c)
          Creates an IVectorLayer from a FeatureCollection.
static VectorLayerImpl createVectorLayer(Geometry g)
          Creates an IVectorLayer from a Geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_NS

public static final String APP_NS
See Also:
Constant Field Values

APP_PREFIX

public static final String APP_PREFIX
See Also:
Constant Field Values
Constructor Detail

VectorLayerAdapter

public VectorLayerAdapter()
Method Detail

createVectorLayer

public static VectorLayerImpl createVectorLayer(FeatureCollection c)
Creates an IVectorLayer from a FeatureCollection.

Parameters:
c - The FeatureCollection must contain simple Features, this means that a Feature has only one geometry and only properties with different names. If a Feature has more geometries, it will be used the first. If a Feature has more properties with the same name, it will be used the first. Some cases can't handled, if the Features contains other Features. A Feature without geometry will be skipped.
Returns:
An IVectorLayer with IFeatures. The IFeatures contains only one Geometry and only properties with different names.

createVectorLayer

public static VectorLayerImpl createVectorLayer(Feature f)
Creates an IVectorLayer from a Feature.

Parameters:
f - The Feature must be simple, this means that a Feature has only one geometry and only properties with different names. If a Feature has more geometries, it will be used the first. If a Feature has more properties with the same name, it will be used the first. A case can't handled, if the Feature contains other Features. If the Feature is a FeatureCollection, it can handled. A Feature without geometry will be skipped.
Returns:
An IVectorLayer with a IFeature. The IFeature contains only one Geometry and only properties with different names.

createVectorLayer

public static VectorLayerImpl createVectorLayer(Geometry g)
Creates an IVectorLayer from a Geometry.

Parameters:
g - If the Geometry isn't simple, it will be linearized.
Returns:
An IVectorLayer with a IFeature. The IFeature contains only one Geometry and no properties.

createFeatureCollection

public static GenericFeatureCollection createFeatureCollection(es.unex.sextante.dataObjects.IVectorLayer l)
                                                        throws es.unex.sextante.exceptions.IteratorException,
                                                               IllegalArgumentException,
                                                               InstantiationException,
                                                               IllegalAccessException
Creates a FeatureCollection from an IVectorLayer.

Parameters:
l - Every IVectorLayer.
Returns:
FeatureCollection
Throws:
es.unex.sextante.exceptions.IteratorException
IllegalArgumentException
InstantiationException
IllegalAccessException

createFeature

public static Feature createFeature(es.unex.sextante.dataObjects.IVectorLayer l)
                             throws es.unex.sextante.exceptions.IteratorException,
                                    IllegalArgumentException,
                                    InstantiationException,
                                    IllegalAccessException
Creates a Feature from an IVectorLayer.

Parameters:
l - IVectorLayer
Returns:
feature
Throws:
es.unex.sextante.exceptions.IteratorException
IllegalArgumentException
InstantiationException
IllegalAccessException

createGeometry

public static Geometry createGeometry(es.unex.sextante.dataObjects.IVectorLayer l)
                               throws es.unex.sextante.exceptions.IteratorException
Creates a Geometry from an IVectorLayer.

Parameters:
l - Every IVectorLayer.
Returns:
Returns a Geometry. If the IVectorLayer contains more than one IFeature, they will be merged to a MultiGeometry.
Throws:
es.unex.sextante.exceptions.IteratorException


Copyright © 2011. All Rights Reserved.