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.
|
Go to the documentation of this file.
9 #ifndef TOOLS_GRASSROOTS_GEOCODER_INCLUDE_COORD_H_
10 #define TOOLS_GRASSROOTS_GEOCODER_INCLUDE_COORD_H_
27 #define COORD_UNSET (-1000.0)
57 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59 #ifdef ALLOCATE_COORDINATE_TAGS
60 #define COORDINATE_PREFIX GRASSROOTS_GEOCODER_API
61 #define COORDINATE_VAL(x) = x
63 #define COORDINATE_PREFIX extern GRASSROOTS_GEOCODER_API
64 #define COORDINATE_VAL(x)
76 COORDINATE_PREFIX
const char *
CO_LATITUDE_S COORDINATE_VAL (
"latitude");
const char * CO_ELEVATION_S
The key for the elevation of for a location object for a given record.
Definition: coordinate.h:92
const char * CO_LATITUDE_S
The key for the latitude of for a location object for a given record.
Definition: coordinate.h:76
Coordinate * AllocateCoordinate(double64 x, double64 y)
Allocate a coordinate for a given latitude and longitude.
json_t * GetCoordinateAsJSON(const Coordinate *const coord_p)
Get the JSON representation of a Coordinate.
void InitCoordinate(Coordinate *coord_p)
Initialise a coordinate as 0,0.
void ClearCoordinateElevation(Coordinate *coord_p)
Clear the elevation for a given Coordinate.
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.
const char * CO_LONGITUDE_S
The key for the longitude of for a location object for a given record.
Definition: coordinate.h:84
bool SetCoordinateFromJSON(Coordinate *coord_p, const json_t *value_p)
Set the Coordinate from a JSON representation.
double64 co_x
The latitude, in degrees, which has a valid range from -90 and +90 for the southern and northern hemi...
Definition: coordinate.h:39
bool SetCoordinateFromCompoundJSON(Coordinate *coord_p, const json_t *value_p, const char *const coord_key_s)
double64 co_y
The longitude, in degrees, which has a valid range from -180 and +180 specifying coordinates west and...
Definition: coordinate.h:45
#define GRASSROOTS_GEOCODER_API
Definition: grassroots_geocoder_library.h:46
double64 * co_elevation_p
A pointer to the elevation value, in metres, for this Coordinate.
Definition: coordinate.h:52
bool SetCoordinateElevation(Coordinate *coord_p, double64 elevation)
Set the elevation for a given Coordinate.
void FreeCoordinate(Coordinate *coord_p)
Free a Coordinate.
A datatype for storing a geographic coordinate.
Definition: coordinate.h:34