A Field is composed of a name and a type. A Field with a Geometry type can also contain a Projection.
Field f1 = new Field("name","String") Field f2 = new Field("geom","Point", "EPSG:2927")
Type | Name and description |
---|---|
java.lang.String |
name The name |
Projection |
proj The Projection |
java.lang.String |
typ The type |
Constructor and description |
---|
Field
(java.lang.String name, java.lang.String type) Create a new Field with a name and type. |
Field
(java.lang.String name, java.lang.String type, java.lang.Object proj) Create a new Field with a name, type, and Projection. |
Field
(java.util.List parts) Create a Field from a List of parts. |
Field
(Map parts) Create a Field from a Map. |
Field
(Field fld) Create a new Field based on an existing Field |
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
equals(java.lang.Object o) |
|
int |
hashCode() |
|
boolean |
isGeometry() Is the Field spatial? |
|
java.lang.String |
toString() The string representation |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The name
The Projection
The type
Create a new Field with a name and type.
Field f = new Field("name","String")
name
- The name of the Fieldtype
- The type of the FieldCreate a new Field with a name, type, and Projection.
Field f = new Field("geom","Point", "EPSG:2927")
name
- The name of the Fieldtype
- The type of the Fieldproj
- The Projection can either be a Projection object or a StringCreate a Field from a List of parts. The first item is the name. The second part of the type. The optional third item is the Projection.
Field f = new Field(["geom","Point", "EPSG:2927"])
parts
- The List of partsCreate a Field from a Map. The keys are name, type, proj.
Field f = new Field(["name": "geom", "type": "Point", "proj": new Projection("EPSG:2927")])
parts
- A Map with name, type, and optionally proj keys.Create a new Field based on an existing Field
fld
- The existing FieldGroovy Documentation