Location is a type that contains latitude, longitude and address. It may be accessed as an object with 3 keys in it. These keys are:
latitude
of the location. This may be null, if the object has been recently uploaded. This must be decimal degrees, for example: 41.8657007325722
longitude
of the location. This may be null, if the object has been recently uploaded. This must be in decimal degrees, for example: -87.76110202195098
human_address
, which is a JSON object containing the U.S. address of the location. This may be null. The object has the following keys:
address
– The street address of the location.city
– The city this address is instate
– The state this address is inzip
– The zip code for this addressThe following functions can be used with location
fields:
Keyword Name | Description | Availability |
---|
Function Name | Description | Availability |
---|---|---|
case(...) |
Returns different values based on the evaluation of boolean comparisons | 2.1 |
within_box(...) |
Returns the rows that have geodata within the specified box, defined by latitude, longitude corners | 2.0 and 2.1 |
within_circle(...) |
Returns the rows that have locations within a specified circle, measured in meters | 2.0 and 2.1 |
For example, to query for all of the Seattle Fire 911 Calls calls within 500 meters of the Socrata offices in Seattle: