Package org.oscim.theme.carto
Class BasicFeature
- java.lang.Object
-
- org.oscim.theme.carto.BasicFeature
-
- All Implemented Interfaces:
io.jeo.vector.Feature
public class BasicFeature extends java.lang.Object implements io.jeo.vector.FeatureBasic feature implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBasicFeature.Storage
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringidfeature identifierprotected BasicFeature.StoragestorageUnderlying feature storage.
-
Constructor Summary
Constructors Modifier Constructor Description BasicFeature(java.lang.String id)Constructor taking a feature identifier.BasicFeature(java.lang.String id, io.jeo.vector.Schema schema)Constructor taking a feature identifier and an explicit schema object.BasicFeature(java.lang.String id, java.util.List<java.lang.Object> values)Constructs a feature from an identifier and a list of values.BasicFeature(java.lang.String id, java.util.List<java.lang.Object> values, io.jeo.vector.Schema schema)Constructs a feature from an identifier, a list of values, and a schema.BasicFeature(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> values)Constructs a feature from an identifier and a map of values.BasicFeature(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> values, io.jeo.vector.Schema schema)Constructs a feature from an identifier, a map of values, and a schema.protectedBasicFeature(java.lang.String id, BasicFeature.Storage storage)Constructor taking an identifier and feature storage object directly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicFeaturecrs(org.osgeo.proj4j.CoordinateReferenceSystem crs)booleanequals(java.lang.Object obj)com.vividsolutions.jts.geom.Geometrygeometry()java.lang.Objectget(java.lang.String key)booleanhas(java.lang.String key)inthashCode()java.lang.Stringid()java.util.Map<java.lang.String,java.lang.Object>map()BasicFeatureput(com.vividsolutions.jts.geom.Geometry g)BasicFeatureput(java.lang.String key, java.lang.Object val)java.lang.StringtoString()
-
-
-
Field Detail
-
id
protected java.lang.String id
feature identifier
-
storage
protected BasicFeature.Storage storage
Underlying feature storage.
-
-
Constructor Detail
-
BasicFeature
public BasicFeature(java.lang.String id)
Constructor taking a feature identifier.- Parameters:
id- The feature id, ifnullan identifier will be generated.
-
BasicFeature
public BasicFeature(java.lang.String id, io.jeo.vector.Schema schema)Constructor taking a feature identifier and an explicit schema object.- Parameters:
id- The feature id, ifnullan identifier will be generated.schema- The feature schema, ifnullthe schema will be always be derived
-
BasicFeature
public BasicFeature(java.lang.String id, java.util.List<java.lang.Object> values)Constructs a feature from an identifier and a list of values.- Parameters:
id- The feature id, ifnullan identifier will be generated.values- The feature values.
-
BasicFeature
public BasicFeature(java.lang.String id, java.util.List<java.lang.Object> values, io.jeo.vector.Schema schema)Constructs a feature from an identifier, a list of values, and a schema.- Parameters:
id- The feature id, ifnullan identifier will be generated.values- The feature values.schema- The feature schema, ifnullthe schema will be always be derived
-
BasicFeature
public BasicFeature(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> values)Constructs a feature from an identifier and a map of values.- Parameters:
id- The feature id, ifnullan identifier will be generated.values- The feature values.
-
BasicFeature
public BasicFeature(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> values, io.jeo.vector.Schema schema)Constructs a feature from an identifier, a map of values, and a schema.- Parameters:
id- The feature id, ifnullan identifier will be generated.values- The feature values.schema- The feature schema, ifnullthe schema will be always be derived
-
BasicFeature
protected BasicFeature(java.lang.String id, BasicFeature.Storage storage)Constructor taking an identifier and feature storage object directly.This constructor is typically only used for subclasses that need to implement custom feature storage.
-
-
Method Detail
-
id
public java.lang.String id()
- Specified by:
idin interfaceio.jeo.vector.Feature
-
crs
public BasicFeature crs(org.osgeo.proj4j.CoordinateReferenceSystem crs)
-
has
public boolean has(java.lang.String key)
- Specified by:
hasin interfaceio.jeo.vector.Feature
-
get
public java.lang.Object get(java.lang.String key)
- Specified by:
getin interfaceio.jeo.vector.Feature
-
put
public BasicFeature put(java.lang.String key, java.lang.Object val)
- Specified by:
putin interfaceio.jeo.vector.Feature
-
put
public BasicFeature put(com.vividsolutions.jts.geom.Geometry g)
- Specified by:
putin interfaceio.jeo.vector.Feature
-
geometry
public com.vividsolutions.jts.geom.Geometry geometry()
- Specified by:
geometryin interfaceio.jeo.vector.Feature
-
map
public java.util.Map<java.lang.String,java.lang.Object> map()
- Specified by:
mapin interfaceio.jeo.vector.Feature
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-