
NoSQL Geographic Databases: An Overview 93
To import data into MongoDB, the import tool (mongoimport) can be
used as shown in Fig. 10. The -d option indicates the database in which
data will be imported, in our example, gisdb. The -c option specifi es the
data collection and the last parameter is the fi le input (pois.json).
Then, the indexes can be created to allow spatial queries, as illustrated
in Fig. 11.
The following algorithms were written using the JavaScript API for
the MongoDB shell. The algorithms assume that the data were imported
into the “gisdb” database, the corresponding items were created, and the
connection to the database was ...