Global Positioning System Reference
In-Depth Information
We use polygons to represent the geometry of American municipalities
(Municipalities entity) and the line type to represent American highways
(Highways entity).
In the following, we provide a list of queries used to test the spatial
functionalities provided by the analysed NoSQL systems. The results are
presented ahead.
Q1 - Find all restaurants in New York City .
Q2 - Find all drugstores within a distance of one km from hospitals .
Q3 - How many gas stations are there along the Route 66 ?
Q4 - Which roads cross the city of Chicago ?
Most NoSQL systems analysed in this chapter only allow bounding-
box queries. Queries Q1 and Q2 explore the “WITHIN” operation. Given
a polygon, the “WITHIN” operation obtains all points belonging to it. In
our example, the polygon represents the city of New York and the points
represent restaurants. In Q2, the polygon is built by applying the “BUFFER”
operation to a point. In our example, it is implemented by a buffer of 1km
around each hospital and we look for drugstores within this area.
Queries Q3 and Q4 explore the relationships between lines and points
as well as between lines and polygons, respectively. In Q3, we request
the number of gas stations on the Route 66, while Q4 uses the “CROSS”
operation to fi nd which roads (lines) cross the city of Chicago.
Database Experiments
In the following, we describe how each query was implemented in the
analysed NoSQL systems. Some queries could not be implemented due to
the spatial limitations of the NoSQL systems.
CouchDB
In this section, we describe the HTTP requests submitted to
CouchDB+GeoCouch to answer the formulated queries. Among the
analysed NoSQL systems with spatial support, GeoCouch is the most
limited one because it only offers bounding-box based queries. Due to this
limitation, only query Q1 is detailed. We also provide an idea of how query
Q2 can be performed.
The loading of spatial data (ESRI Shapefi les) into CouchDB can be
performed using the shp2geocouch tool. Consider a fi le containing points
of interest (PoIs) stored in a shape fi le (pois.shp). Figure 4 shows the upload
of this fi le into CouchDB.
Search WWH ::




Custom Search