Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
A datatype for storing a geographic coordinate. More...
#include <coordinate.h>
Public Member Functions | |
Coordinate * | AllocateCoordinate (double64 x, double64 y) |
Allocate a coordinate for a given latitude and longitude. More... | |
void | InitCoordinate (Coordinate *coord_p) |
Initialise a coordinate as 0,0. More... | |
void | FreeCoordinate (Coordinate *coord_p) |
Free a Coordinate. More... | |
json_t * | GetCoordinateAsJSON (const Coordinate *const coord_p) |
Get the JSON representation of a Coordinate. More... | |
bool | AddCoordinateToJSON (const Coordinate *coord_p, json_t *dest_p, const char *const coord_key_s) |
Add the JSON representation for a given Coordinate to a JSON fragment using a given key. More... | |
bool | SetCoordinateFromJSON (Coordinate *coord_p, const json_t *value_p) |
Set the Coordinate from a JSON representation. More... | |
bool | SetCoordinateElevation (Coordinate *coord_p, double64 elevation) |
Set the elevation for a given Coordinate. More... | |
void | ClearCoordinateElevation (Coordinate *coord_p) |
Clear the elevation for a given Coordinate. More... | |
Data Fields | |
double64 | co_x |
The latitude, in degrees, which has a valid range from -90 and +90 for the southern and northern hemisphere respectively. More... | |
double64 | co_y |
The longitude, in degrees, which has a valid range from -180 and +180 specifying coordinates west and east of the Prime Meridian, respectively. More... | |
double64 * | co_elevation_p |
A pointer to the elevation value, in metres, for this Coordinate. More... | |
A datatype for storing a geographic coordinate.
double64 co_x |
The latitude, in degrees, which has a valid range from -90 and +90 for the southern and northern hemisphere respectively.
double64 co_y |
The longitude, in degrees, which has a valid range from -180 and +180 specifying coordinates west and east of the Prime Meridian, respectively.
double64* co_elevation_p |
A pointer to the elevation value, in metres, for this Coordinate.
This can be NULL
which means that the value has not been set for this Coordinate.