Format a GeoJson object easily.
- Implements:
- Source:
- See:
Methods
addElement(object)
Add th given GeoJSONObject to the output Json object.
Parameters:
Name | Type | Description |
---|---|---|
object |
GeoJSONObject | The GeoJSONObject to add to the output. |
feature(geometry) → {FeatureRecord}
Create a new FeatureRecord GeoJSONObject.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
geometry |
Geometry | The Geometry to set in the feature. |
Returns:
The created FeatureRecord.
- Type
- FeatureRecord
featureCollection(collection) → {FeatureCollectionRecord}
Create a FeatureCollectionRecord containing the initial list of Feature.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
collection |
Array.<Feature> | The initial Feature collection. |
Returns:
The created FeatureCollectionRecord.
geometryCollection(collection) → {GeometryCollectionRecord}
Create a GeometryCollectionRecord containing the initial list of Geometry.
Can be used in a Feature and GeometryCollection.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
collection |
Array.<Geometry> | The initial Geometry collection. |
Returns:
The created GeometryCollectionRecord.
multiPoint(positions) → {MultiPointRecord}
Create a MultiPointRecord containing the initial positions.
Can be used in a Feature and GeometryCollection.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array.<Array.<double>> | The list of positions in either [lat, lnt] or [lat, lnt, alt] format. |
Returns:
The created MultiPointRecord
- Type
- MultiPointRecord
multiPolygon(collection) → {MultiPolygonRecord}
Create a MultiPolygonRecord containing the initial list of Polygon.
Can be used in a Feature and GeometryCollection.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
collection |
Array.<Polygon> | The initial Polygon collection. |
Returns:
The created MultiPolygonRecord.
- Type
- MultiPolygonRecord
point(lat, lng) → {PointRecord}
Creates a PointRecord GeoJSONObject without altitude.
Can be used in a Feature and GeometryCollection.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
lat |
double | Latitude. |
lng |
double | Longitude. |
Returns:
The created PointRecord.
- Type
- PointRecord
point(lat, lng, alt) → {PointRecord}
Creates a PointRecord GeoJSONObject.
Can be used in a Feature and GeometryCollection.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
lat |
double | Latitude. |
lng |
double | Longitude. |
alt |
double | Altitude. |
Returns:
The created PointRecord.
- Type
- PointRecord
polygon(ring) → {PolygonRecord}
Create a PolygonRecord.
Can be used in a Feature and GeometryCollection.
Can be set to GeoJsonRecord#addElement(GeoJSONObject) method
or directly into io.apisense.sdk.core.sting.DBHelperSting#save(DBRecord).
Parameters:
Name | Type | Description |
---|---|---|
ring |
Ring | The first ring to add. |
Returns:
The created PolygonRecord.
- Type
- PolygonRecord
ring(positions) → {Ring}
Create a Ring.
Can be used in a Polygon.
Parameters:
Name | Type | Description |
---|---|---|
positions |
Array.<Array.<double>> | The list of positions in either [lat, lnt] or [lat, lnt, alt] format. |
Returns:
The created Ring
- Type
- Ring
toJson() → {string}
Transform the DBRecord to a compatible Json representation.
- Implements:
- Source:
Returns:
The representation as String.
- Type
- string