X
Query Language Instructions
Primitive Search Unit
  • Syntax: Each unit consists of "Start Location" Distance "property keyword" . For example "Times square" 500m "book shop"
    The start location and property keywords have to be placed in double quotations, else an error will be returned.
  • Search by Distance: The distance could be in meters (use m only) or kilometers (use km only). For example "Times square" 1km "book shop" Try it!
  • Search by Space key: If no distance is entered, the query would identify and return the nearest shops based on the number of empty spaces. For example "Times square" "book shop" would show the three nearest book shops from Times square Try it!
Supported Spatial Operators
  • Addition Operator (+): Identifies all the venues located between two start locations. For example "Times square" 500m "book shop" + "Empire State Building" 500m "book shop" will find all the book shop within 500m of Times square and the Empire state building. Try it!
  • Difference Operator (-): Identifies all the venues located within one start location but is not within another start location. For example "Times square" 1km "book shop" - "Empire State Building" 1km "book shop" will find all the book shop located within 1km of Times square but are further than 1km from the Empire state building. Try it!
  • Joint Operator (*): Identifies all the venues located which are located between two start locations. For example "Times square" 1km "book shop" * "Empire State Building" 1km "book shop" will find all the book shop located within 1km of Times square and is also within 1km from the Empire state building. Try it!
Supported Directional & Range Operators
Note: In the current system, the range operators can not be combined together (i.e. no "Times square" [200-400]@20 "book shop" )
  • North direction (^): Limits the venues to those located north of the start location. Place the operator before the distance. For example "Empire State Building" ^1000m "book shop" will find all the book shop within 1000m north of the Empire state building. Try it!
  • South direction (_): Limits the venues to those located south of the start location. For example "Times square" _1km "book shop" will find all the book shop within 1km South of Times square. Try it!
  • Angle direction (@): Limits the venues to those located within a specific angle. Angle calculation starts from the east direction and moves counterclockwise (North is 90, South is 270 etc.). For example "Times square" 1km@45 "book shop" will find all the book shop 45 degrees counterclockwise from the horizontal plane Try it!
  • Range Operator ([x-y]): Limits the venues to those within a specific range. For example "Times square"[400m-1000m]"book shop", will search for book stores within 400m to 1000m of time square Try it!
Complex Queries
These operations could be combined to produce complex queries. Give it a try!
  • example 1: ("Times square" _1km "book shop")*("Empire State" 1km "book shop"- "Empire State" 500m "book shop") Try it!
  • example 2: ("Union Square San Francisco" 1km "restaurant")*("Grace Cathedral" 1km "restaurant" * "Ritz Carlton San Francisco" 1km "restaurant") Try it!
Example use cases
  • Use Case 1: to create a "meet up feature" for a messenger application (i.e. What's app, Line) to identify potential meeting places for users based on their starting locations
    Example : When one user works near Times Square and the other near Grand Central and the final near Pennsylvania station and the system would need to find a restaurant that is equally near to all three of their workplaces for them to meet for lunch
    Example query: (("Times Square" 700m "restaurant")*("Grand Central New York" 1km "restaurant"))*("Pennsylvania station " 1km "restaurant") Try it!
  • Use Case 2: In a tourist application, to create a feature which enables users to view what venues are avaliable within walking distance of the different famous landmarks they are visiting
    Example : A tourist in Kyoto would be visiting three famous landmarks, Daitokuji, Kinkakuji and Ryoanji and would like a list of potential shops they could drop by near those land marks
    Example query: ("Daitoku ji" 300m "shop")+("Kinkaku ji" 300m "shop")+("Ryoan ji" 300m "shop") Try it!
Spatial Query Demo
Loading...