Contains subroutines to convert derived types to GeoJSON format (RFC 7946).
Generic derived type add to GeoJSON Feature Collection functions.
Adds node to GeoJSON Feature Collection.
The function returns the following error codes:
E_BOUNDS
if collection is full.E_INVALID
if collection has not been created.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(geojson_feature_collection_type), | intent(inout) | :: | collection |
GeoJSON Feature Collection type. |
||
type(node_type), | intent(inout) | :: | node |
Node type. |
Adds sensor to GeoJSON Feature Collection.
The function returns the following error codes:
E_BOUNDS
if collection is full.E_INVALID
if collection has not been created.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(geojson_feature_collection_type), | intent(inout) | :: | collection |
GeoJSON Feature Collection type. |
||
type(sensor_type), | intent(inout) | :: | sensor |
Sensor type. |
Adds target to GeoJSON Feature Collection.
The function returns the following error codes:
E_BOUNDS
if collection is full.E_INVALID
if collection has not been created.Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(geojson_feature_collection_type), | intent(inout) | :: | collection |
GeoJSON Feature Collection type. |
||
type(target_type), | intent(inout) | :: | target |
Target type. |
Generic derived type to GeoJSON serialisation functions.
Returns node as allocatable string in GeoJSON format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(node_type), | intent(inout) | :: | node |
Node type. |
GeoJSON string.
Returns sensor as allocatable string in GeoJSON format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sensor_type), | intent(inout) | :: | sensor |
Sensor type. |
GeoJSON string.
Returns target as allocatable string in GeoJSON format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(target_type), | intent(inout) | :: | target |
Target type. |
GeoJSON string.
Generic derived type to GeoJSON writer.
Writes node to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(node_type), | intent(inout) | :: | node |
Node type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
Writes sensor to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sensor_type), | intent(inout) | :: | sensor |
Sensor type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
Writes target to file or standard output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(target_type), | intent(inout) | :: | target |
Target type. |
||
integer, | intent(in), | optional | :: | unit |
File unit. |
Opaque GeoJSON Feature Collection type.
Returns GeoJSON Feature Collection as GeoJSON string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(geojson_feature_collection_type), | intent(inout) | :: | collection |
GeoJSON Feature Collection type. |
GeoJSON string.
Creates new GeoJSON Feature Collection if given maximum size.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(geojson_feature_collection_type), | intent(out) | :: | collection |
GeoJSON Feature Collection type. |
||
integer, | intent(in) | :: | max_size |
Max. size of Feature Collection. |
Returns GeoJSON feature point of given DMPACK type, longitude, latitude, elevation, and type properties in JSON. The returned allocatable string is of the following form:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | type |
Point type ( |
||
real(kind=r8), | intent(in) | :: | longitude |
Point longitude (decimal). |
||
real(kind=r8), | intent(in) | :: | latitude |
Point latitude (decimal). |
||
real(kind=r8), | intent(in) | :: | elevation |
Point elevation. |
||
character(len=*), | intent(in) | :: | json |
Point JSON data. |
GeoJSON string.
Destroys GeoJSON Feature Collection.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(geojson_feature_collection_type), | intent(inout) | :: | collection |
GeoJSON Feature Collection type. |