Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

within_box(...)

within_box(...)

Returns the rows that have geodata within the specified box, defined by latitude, longitude corners

Works with the following datatypes:

This function works with 2.0 and 2.1 endpoint(s). What does this mean? »

The within_box(...) function is used in the $where parameter filter for Point or Location values within a box defined by two points. It accepts four parameters:

  • The field name of a Location or Point
  • The latitude of your northwest point
  • The longitude of your northwest point
  • The latitude of your southeast point
  • The longitude of your southeast point

For example, to query for all of the Seattle Fire 911 Calls calls within the stadium district:

https://data.seattle.gov/resource/kzjm-xkqj.json?$where=within_box(report_location, 47.5998951, -122.33707, 47.5942794, -122.3270522)