dm_geojson Module

Contains subroutines to convert derived types to GeoJSON format (RFC 7946).


Uses

  • module~~dm_geojson~~UsesGraph module~dm_geojson dm_geojson module~dm_ascii dm_ascii module~dm_geojson->module~dm_ascii module~dm_error dm_error module~dm_geojson->module~dm_error module~dm_json dm_json module~dm_geojson->module~dm_json module~dm_kind dm_kind module~dm_geojson->module~dm_kind module~dm_type dm_type module~dm_geojson->module~dm_type module~dm_util dm_util module~dm_geojson->module~dm_util module~dm_error->module~dm_ascii module~dm_error->module~dm_kind module~dm_json->module~dm_error module~dm_json->module~dm_kind module~dm_json->module~dm_util module~dm_dp dm_dp module~dm_json->module~dm_dp iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_util->module~dm_error module~dm_util->module~dm_kind module~dm_dp->module~dm_error module~dm_dp->module~dm_kind module~dm_time dm_time module~dm_dp->module~dm_time module~dm_time->module~dm_error module~dm_time->module~dm_kind module~dm_time->module~dm_util

Used by

  • module~~dm_geojson~~UsedByGraph module~dm_geojson dm_geojson module~dmpack dmpack module~dmpack->module~dm_geojson

Interfaces

public interface dm_geojson_from

Generic derived type to GeoJSON serialisation functions.

  • private function geojson_from_node(node, comma) result(geojson)

    Returns node as allocatable string in GeoJSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(node_type), intent(inout) :: node

    Node type.

    logical, intent(in), optional :: comma

    Append comma separator.

    Return Value character(len=:), allocatable

    GeoJSON string.

  • private function geojson_from_sensor(sensor, comma) result(geojson)

    Returns sensor as allocatable string in GeoJSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(sensor_type), intent(inout) :: sensor

    Sensor type.

    logical, intent(in), optional :: comma

    Append comma separator.

    Return Value character(len=:), allocatable

    GeoJSON string.

  • private function geojson_from_target(target, comma) result(geojson)

    Returns target as allocatable string in GeoJSON format.

    Arguments

    Type IntentOptional Attributes Name
    type(target_type), intent(inout) :: target

    Target type.

    logical, intent(in), optional :: comma

    Append comma separator.

    Return Value character(len=:), allocatable

    GeoJSON string.

public interface dm_geojson_write

Generic derived type to GeoJSON writer.

  • private function geojson_write_node(node, unit, comma) result(rc)

    Writes node to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(node_type), intent(inout) :: node

    Node type.

    integer, intent(in), optional :: unit

    File unit.

    logical, intent(in), optional :: comma

    Append comma separator.

    Return Value integer

  • private function geojson_write_sensor(sensor, unit, comma) result(rc)

    Writes sensor to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(sensor_type), intent(inout) :: sensor

    Sensor type.

    integer, intent(in), optional :: unit

    File unit.

    logical, intent(in), optional :: comma

    Append comma separator.

    Return Value integer

  • private function geojson_write_target(target, unit, comma) result(rc)

    Writes target to file or standard output.

    Arguments

    Type IntentOptional Attributes Name
    type(target_type), intent(inout) :: target

    Target type.

    integer, intent(in), optional :: unit

    File unit.

    logical, intent(in), optional :: comma

    Append comma separator.

    Return Value integer


Subroutines

public subroutine dm_geojson_feature_point(geojson, type, lon, lat, alt, data, comma)

Returns GeoJSON feature point of given DMPACK type, longitude, latitude, altitude, and type data in JSON. The output string geojson is of the following form:

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=:), intent(out), allocatable :: geojson

Output GeoJSON string.

integer, intent(in) :: type

Point type (TYPE_NODE, TYPE_SENSOR, TYPE_TARGET).

real(kind=r8), intent(in) :: lon

Point longitude (decimal).

real(kind=r8), intent(in) :: lat

Point latitude (decimal).

real(kind=r8), intent(in) :: alt

Point altitude.

character(len=*), intent(in) :: data

Point JSON data.

logical, intent(in), optional :: comma

Append comma separator.