public class GeometryCollection extends Geometry
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
static Parcelable.Creator<GeometryCollection> |
CREATOR |
static String |
JSON_GEOMETRIES |
JSON_COORDINATESJSON_TYPECONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Constructor and Description |
|---|
GeometryCollection()
Creates an empty geometry collection.
|
GeometryCollection(JSONObject json)
Parses the given
JSONObject as a geometry collection. |
| Modifier and Type | Method and Description |
|---|---|
void |
addGeometry(Geometry geometry)
Adds a
Geometry to this geometry collection. |
List<Geometry> |
getGeometries()
Returns a list of all the
Geometry contained within this geometry
collection. |
String |
getType()
The type of GeoJSON object.
|
void |
removeGeometry(Geometry geometry)
Removes the given
Geometry from this geometry collection. |
void |
setGeometries(List<Geometry> geometries)
Sets the list of geometries contained within this geometry collection.
|
JSONObject |
toJSON()
Formats the object's attributes as GeoJSON.
|
describeContents, readParcel, writeToParcelpublic static final String JSON_GEOMETRIES
public static final Parcelable.Creator<GeometryCollection> CREATOR
public GeometryCollection()
public GeometryCollection(JSONObject json)
JSONObject as a geometry collection.json - public void addGeometry(Geometry geometry)
Geometry to this geometry collection.geometry - public void removeGeometry(Geometry geometry)
Geometry from this geometry collection.geometry - public List<Geometry> getGeometries()
Geometry contained within this geometry
collection.Geometry in this geometry collection.public void setGeometries(List<Geometry> geometries)
geometries - public String getType()
GeoJSON, such as GeoJSON.TYPE_FEATURE.getType in class GeoJSONObjectpublic JSONObject toJSON() throws JSONException
toJSON in class GeometryJSONObjectJSONException