com.vividsolutions.jump.feature
Class FeatureDatasetFactory

java.lang.Object
  extended by com.vividsolutions.jump.feature.FeatureDatasetFactory

public class FeatureDatasetFactory
extends java.lang.Object

Utility functions to create different kinds of FeatureDatasets


Constructor Summary
FeatureDatasetFactory()
           
 
Method Summary
static FeatureCollection createFromGeometry(java.util.Collection geoms)
          Creates a FeatureCollection from a Collection of Geometrys
static FeatureDataset createFromGeometry(java.util.Collection geoms, FeatureSchema featureSchema)
          Creates a FeatureDataset from a Collection of Geometrys using the given FeatureSchema
static FeatureDataset createFromGeometryWithLength(java.util.Collection geoms, java.lang.String attrName)
          Creates a FeatureCollection from a Collection of Geometrys and adds an attribute containing the length of the Geometry.
static FeatureDataset createFromGeometryWithLengthAndArea(java.util.Collection geoms, java.lang.String attrNameLen, java.lang.String attrNameArea)
          Creates a FeatureCollection from a Collection of Geometrys and adds optional attributes containing the length and area of the Geometry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureDatasetFactory

public FeatureDatasetFactory()
Method Detail

createFromGeometry

public static FeatureCollection createFromGeometry(java.util.Collection geoms)
Creates a FeatureCollection from a Collection of Geometrys

Parameters:
geoms - a collection of Geometrys

createFromGeometryWithLength

public static FeatureDataset createFromGeometryWithLength(java.util.Collection geoms,
                                                          java.lang.String attrName)
Creates a FeatureCollection from a Collection of Geometrys and adds an attribute containing the length of the Geometry. The attribute name is given by the argument attrName

Parameters:
geoms - a collection of Geometrys
attrName - the name to use for the length attribute

createFromGeometry

public static FeatureDataset createFromGeometry(java.util.Collection geoms,
                                                FeatureSchema featureSchema)
Creates a FeatureDataset from a Collection of Geometrys using the given FeatureSchema

Parameters:
geoms - a collection of Geometrys
featureSchema - the schema to use for the feature collection
Returns:
a FeatureDataset containing features for the geometries

createFromGeometryWithLengthAndArea

public static FeatureDataset createFromGeometryWithLengthAndArea(java.util.Collection geoms,
                                                                 java.lang.String attrNameLen,
                                                                 java.lang.String attrNameArea)
Creates a FeatureCollection from a Collection of Geometrys and adds optional attributes containing the length and area of the Geometry.

Parameters:
geoms - a collection of Geometrys
attrNameLen - the name to use for the length attribute (or null if not required)
attrNameArea - the name to use for the length attribute (or null if not required)