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 postal address as well as its geographic coordinates if possible. More...
#include <address.h>
Public Member Functions | |
Address * | AllocateAddress (const char *name_s, const char *street_s, const char *town_s, const char *county_s, const char *country_s, const char *postcode_s, const char *country_code_s, const char *gps_s) |
Allocte a new Address object. More... | |
void | FreeAddress (Address *address_p) |
Free an Address. More... | |
void | ClearAddress (Address *address_p) |
Clear all of the values within an Address. More... | |
char * | GetAddressAsString (const Address *address_p) |
Get a string represetnting an Address. More... | |
char * | GetAddressAsDelimitedString (const Address *address_p, const char *sep_s) |
Get a string represetnting an Address. More... | |
json_t * | GetAddressAsJSON (const Address *address_p) |
Get the JSON representation of an Address. More... | |
Address * | GetAddressFromJSON (const json_t *address_json_p) |
Get a new Address from a JSON representation. More... | |
bool | ConvertAddressToJSON (const Address *address_p, json_t *dest_p) |
Store the JSON-based representation of an Address in a given JSON fragment. More... | |
bool | ParseAddressForSchemaOrg (const Address *address_p, json_t *values_p, const char *address_key_s) |
Populate a JSON fragment with the values from a given Address conforming to the definition of a postal address from schema.org given at https://schema.org/PostalAddress. More... | |
bool | SetAddressCentreCoordinate (Address *address_p, const double64 latitude, const double64 longitude, const double64 *elevation_p) |
Set the Coordinate for the central point of a given address to the given latitude and longitude values. More... | |
bool | SetAddressNorthEastCoordinate (Address *address_p, const double64 latitude, const double64 longitude, const double64 *elevation_p) |
Set the Coordinate for the north-east bounds of a given address to the given latitude and longitude values. More... | |
bool | SetAddressSouthWestCoordinate (Address *address_p, const double64 latitude, const double64 longitude, const double64 *elevation_p) |
Set the Coordinate for the south-west bounds of a given address to the given latitude and longitude values. More... | |
Data Fields | |
char * | ad_name_s |
The building name or number for this Address. More... | |
char * | ad_street_s |
The street that this Address is on. More... | |
char * | ad_town_s |
The town, city or village that this Address is in. More... | |
char * | ad_county_s |
The county that this Address is in. More... | |
char * | ad_country_s |
The country that this Address is in. More... | |
char * | ad_postcode_s |
The postal code for this Address. More... | |
char * | ad_country_code_s |
The ISO 3166-1 alpha-2 country code for the country that this Address is in. More... | |
char * | ad_gps_s |
The string representation of the geographic coordinate for this Address such as "32.4567, 12.1234" for a latitude of 32.4567 degrees and a longitude of 12.1234 degrees. More... | |
Coordinate * | ad_gps_centre_p |
A pointer to the Coordinate for the central point of this Address. More... | |
Coordinate * | ad_gps_north_east_p |
A pointer to the Coordinate for the north-east bounds of this Address. More... | |
Coordinate * | ad_gps_south_west_p |
A pointer to the Coordinate for the south-west bounds of this Address. More... | |
double64 * | ad_elevation_p |
A datatype for storing a postal address as well as its geographic coordinates if possible.
char* ad_name_s |
The building name or number for this Address.
char* ad_street_s |
The street that this Address is on.
char* ad_town_s |
The town, city or village that this Address is in.
char* ad_county_s |
The county that this Address is in.
char* ad_country_s |
The country that this Address is in.
char* ad_postcode_s |
The postal code for this Address.
char* ad_country_code_s |
The ISO 3166-1 alpha-2 country code for the country that this Address is in.
char* ad_gps_s |
The string representation of the geographic coordinate for this Address such as "32.4567, 12.1234" for a latitude of 32.4567 degrees and a longitude of 12.1234 degrees.
This can be NULL
and the value from Address::ad_gps_centre_p should always be used, where possible, instead of this.
Coordinate* ad_gps_centre_p |
A pointer to the Coordinate for the central point of this Address.
This can be NULL
if it has not yet been calculated
Coordinate* ad_gps_north_east_p |
A pointer to the Coordinate for the north-east bounds of this Address.
This can be NULL
if it has not yet been calculated
Coordinate* ad_gps_south_west_p |
A pointer to the Coordinate for the south-west bounds of this Address.
This can be NULL
if it has not yet been calculated
double64* ad_elevation_p |