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.
8 #ifndef TOOLS_GRASSROOTS_GEOCODER_INCLUDE_ADDRESS_H_
9 #define TOOLS_GRASSROOTS_GEOCODER_INCLUDE_ADDRESS_H_
96 #ifndef DOXYGEN_SHOULD_SKIP_THIS
98 #ifdef ALLOCATE_ADDRESS_TAGS
99 #define ADDRESS_PREFIX GRASSROOTS_GEOCODER_API
100 #define ADDRESS_VAL(x) = x
102 #define ADDRESS_PREFIX extern GRASSROOTS_GEOCODER_API
103 #define ADDRESS_VAL(x)
121 ADDRESS_PREFIX
const char *
AD_NAME_S ADDRESS_VAL (
"name");
140 ADDRESS_PREFIX
const char *
AD_STREET_S ADDRESS_VAL (
"streetAddress");
148 ADDRESS_PREFIX
const char *
AD_TOWN_S ADDRESS_VAL (
"addressLocality");
157 ADDRESS_PREFIX
const char *
AD_COUNTY_S ADDRESS_VAL (
"addressRegion");
166 ADDRESS_PREFIX
const char *
AD_COUNTRY_S ADDRESS_VAL (
"addressCountry");
223 GRASSROOTS_GEOCODER_API 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);
char * ad_town_s
The town, city or village that this Address is in.
Definition: address.h:38
const char * AD_COUNTY_S
The key for specifying an object containing the county where the sample was collected.
Definition: address.h:157
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 v...
const char * AD_NAME_S
The key for specifying an object containing the name of an address.
Definition: address.h:121
char * ad_gps_s
The string representation of the geographic coordinate for this Address such as "32....
Definition: address.h:69
double64 * ad_elevation_p
Definition: address.h:91
char * ad_street_s
The street that this Address is on.
Definition: address.h:32
char * GetAddressAsString(const Address *address_p)
Get a string represetnting an Address.
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.
void FreeAddress(Address *address_p)
Free an Address.
Address * GetAddressFromJSON(const json_t *address_json_p)
Get a new Address from a JSON representation.
char * ad_name_s
The building name or number for this Address.
Definition: address.h:27
A datatype for storing a postal address as well as its geographic coordinates if possible.
Definition: address.h:21
json_t * GetAddressAsJSON(const Address *address_p)
Get the JSON representation of an Address.
Coordinate * ad_gps_centre_p
A pointer to the Coordinate for the central point of this Address.
Definition: address.h:75
char * ad_country_s
The country that this Address is in.
Definition: address.h:49
Coordinate * ad_gps_south_west_p
A pointer to the Coordinate for the south-west bounds of this Address.
Definition: address.h:89
Address * ParseSchemaOrgAddress(const json_t *values_p, const char *address_key_s)
char * ad_country_code_s
The ISO 3166-1 alpha-2 country code for the country that this Address is in.
Definition: address.h:60
const char * AD_CENTRE_LOCATION_S
The key for the central location object for a given record.
Definition: address.h:183
const char * AD_NORTH_EAST_LOCATION_S
The key for the north-eastern bounds for the location object for a given record.
Definition: address.h:190
#define GRASSROOTS_GEOCODER_API
Definition: grassroots_geocoder_library.h:46
char * ad_postcode_s
The postal code for this Address.
Definition: address.h:54
char * ad_county_s
The county that this Address is in.
Definition: address.h:44
const char * AD_ADDRESS_S
Definition: address.h:114
const char * AD_COUNTRY_S
The key for specifying an object containing the country where the sample was collected.
Definition: address.h:166
const char * AD_LOCATION_S
The key for the location object for a given record.
Definition: address.h:175
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 value...
bool ConvertAddressToJSON(const Address *address_p, json_t *dest_p)
Store the JSON-based representation of an Address in a given JSON fragment.
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 v...
const char * AD_SOUTH_WEST_LOCATION_S
The key for the south-western bounds for the location object for a given record.
Definition: address.h:198
Coordinate * ad_gps_north_east_p
A pointer to the Coordinate for the north-east bounds of this Address.
Definition: address.h:82
A datatype for storing a geographic coordinate.
Definition: coordinate.h:34
const char * AD_POSTCODE_S
The key for specifying an object containing the postal code where the sample was collected.
Definition: address.h:130
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 posta...
const char * AD_TOWN_S
The key for specifying an object containing the town where the sample was collected.
Definition: address.h:148
void ClearAddress(Address *address_p)
Clear all of the values within an Address.
const char * AD_STREET_S
The key for specifying an object containing the street address where the sample was collected.
Definition: address.h:140
char * GetAddressAsDelimitedString(const Address *address_p, const char *sep_s)
Get a string represetnting an Address.