Submitting an AoI classification task
Before using CityZones you must register for an account. Just go to the Sign up page, fill in the form with you data and submit it. You will be redirected to the Login page. Just enter your registered e-mail and password to have access to the platform.
This web application is intended to provide an easy interface to submit map processing tasks to the RiskZones algorithms module (version 2.0), and to display the result in different ways. For that, the first step is to create a polygon of the AoI (Area of Interest) on the map. Just click the points that make a polygon surrounding the intended AoI. When the first point is clicked again, the polygon is closed. To start over, click "Clear map".
For an existing GeoJSON file containing the FeatureCollection with the polygon for the intended AoI, that file can be uploaded just clicking on the "Send GeoJSON" option. The application will reload the page with the marked AoI.
After selecting an AoI, the classification parameters can be set through the form below the map. In the available configuration options, Zone length is the size of each zone side in meters. Lower values gives a better resolution, but also takes longer for the classification to complete. The checkboxes are used to select which types of PoIs (Points of Interest) have to be considered for the classification. One must make sure to select at least one PoI, or the classification will be null.
Finally, there is the "Submit task" option. The web interface will save the task in the proper database so a Maps-services worker can get it (through its Worker module) and perform the risks classification. The page will reload and show a message on top indicating that the task has been successfully submitted with an identification number. Keep it!
Viewing the results
On the Tasks page there is a list of all tasks that you submitted. Any task will be on this list, each onde identified by a proper ID number.
The list shows also the timestamp of the task (i.e, when it was created). After the submission, the task will be in the "Queued" stage. This mean that the task is in our database waiting for a Maps-service device to get it.
When a Maps-service worker requests a task, the web application will send the first task on queue. The task then gets into the "Processing" stage.
After finishing the processing of a task, a Maps-service device sends its result to the web application and the tasks enters the "Done" stage. The "Show map" button will be displayed at the right of the list. The final results of the performed classification on the target map can be accessed there. If the results files are too large, a ⚠️ icon will be shown on the button for alerting purposes. The others icons displayed at the right are described as follows:
- Download a ZIP file containing the CSV data of the classification that can be used in Google Earth Engine. Use the example script in the project's GitHub repository.
- Download a ZIP file containing the configuration JSON and the AoI GeoJSON to be used with the RiskZones tool. Use these files to run the classification tool locally on a computer.
- Re-opens the Map view with the AoI used for this task. This feature allows the re-creation of a task with other options.
- Deletes the task and its results.
Sometimes something wrong may happen on a Maps-service device and the task does not get finished. 120 minutes after a worker gets a task. If the results are not received by the web application, the tasks enters the "Expired" state. This does not mean that a requested task will not be computed. Actually, the task returns to the queue, so another Maps-service device can get it and finish. This can also happen if an AoI is too big and the worker takes more than an hour to serve it. Even if a task gets into the expired state, if the worker returns the result it will be received by the web application and displayed on the page.
Finally, any task may fail. A failure usually occurs if there are no PoIs inside a defined AoI. In this case, the worker will not be able to return a result. If a task is requested 3 times and gets no result after the expiration period, it is considered as a failed task and it will enter the "Failed" state. In this state the task will not be given to a worker anymore.