public class FeatureFactory extends Object
| Constructor and Description |
|---|
FeatureFactory()
Creates a new instance of FeatureFactory
|
| Modifier and Type | Method and Description |
|---|---|
static org.locationtech.jts.jump.feature.BasicFeature |
createFeature(Object[] attributes,
String[] columnames,
org.locationtech.jts.jump.feature.FeatureSchema fs)
Creates a feature
|
static org.locationtech.jts.jump.feature.BasicFeature |
createPointFeature(Object[] attributes,
String[] columnames,
double x,
double y,
org.locationtech.jts.jump.feature.FeatureSchema fs,
boolean useMultiPoint)
Creates a point feature from a array of objects.
|
static org.locationtech.jts.jump.feature.BasicFeature |
createPointFeature(Object[] attributes,
String[] columnames,
int xIndex,
int yIndex,
org.locationtech.jts.jump.feature.FeatureSchema fs,
boolean xyAsAttribute,
boolean useMultiPoint)
Creates a point feature from a array of objects.
|
public static org.locationtech.jts.jump.feature.BasicFeature createPointFeature(Object[] attributes, String[] columnames, int xIndex, int yIndex, org.locationtech.jts.jump.feature.FeatureSchema fs, boolean xyAsAttribute, boolean useMultiPoint)
attributes - The attributes of the Feature.columnames - The columnames corresponding the attribute names in the FeatureSchema. It gives the order of adding attributes to the Feature.
If columnames is null the attributes are added in that order. Not recommended
example: the columname at index 0 is used to look up the index (n) of the attribute where attributename equals the columnname at index 0 then that index (n) is used to at the attribute to the feature.
So in this example the attribute at index 0 is added to the feature at index n.xIndex - The index in the object array that is used as x coord for creating the pointyIndex - The index in the object array that is used as y coord for creating the pointfs - The feature schema that is needed to create a featurexyAsAttribute - If true the x and y coords are also stored as attribute.useMultiPoint - If true create a MultiPoint for the coordinatespublic static org.locationtech.jts.jump.feature.BasicFeature createPointFeature(Object[] attributes, String[] columnames, double x, double y, org.locationtech.jts.jump.feature.FeatureSchema fs, boolean useMultiPoint)
attributes - The attributes of the Feature.columnames - The columnames corresponding the attribute names in the FeatureSchema. It gives the order of adding attributes to the Feature.
If columnames is null the attributes are added in that order. Not recommended
example: the columname at index 0 is used to look up the index (n) of the attribute where attributename equals the columnname at index 0 then that index (n) is used to at the attribute to the feature.
So in this example the attribute at index 0 is added to the feature at index n.x - the x coord used for creating the pointy - the y coord used for creating the pointfs - The feature schema that is needed to create a featureuseMultiPoint - If true create a MultiPoint for the coordinatesCopyright © 2022 B3Partners B.V.. All rights reserved.