In another article, we covered importing data table schemas, relations and data objects to Backendless with CSV files. The data import feature can also work with geolocation storage. The process is extremely simple – browse to a CSV file with the geolocation data and let Backendless process it.
A file you import may include as many geopoints as you need. For each geopoint, you can provide the latitude and longitude coordinates, the categories the data point should belong to, and the geopoint metadata. Consider the following example of a geolocation CSV file:
[table caption=”Sample Geo Data” width=”470″]
latitude,longitude,category name,metadata
29.76328,-95.36327,”personals”,”city=Houston|burgers=true|hiking=false|chinese=true|gender=male”
33.15067,-96.82361,”personals”,”city=Frisco|burgers=false|hiking=false|chinese=true|gender=female”
32.73569,-97.10807,”personals”,”city=Arlington|burgers=false|hiking=false|chinese=false|gender=female”
33.01984,-96.69889,”personals”,”city=Plano|burgers=false|hiking=true|chinese=false|gender=male”
32.78306,-96.80667,”personals”,”city=Dallas|burgers=true|hiking=true|chinese=false|gender=female”
[/table]
Geolocation CSV files must adhere to the following structure:
Once Backendless completes the import of the data, it sends an email to the application developer’s email address with a status report about the import procedure. If all the data is successfully processed, you can see it in the geolocation screen of Backendless Console. For example, the data from the table shown above is rendered as: