Specification:Place completion tool
This is the specification for the non official Addon:Place completion tool.
The place completion tool allows the user to manage his places and change data on a set of places with one button action.
- The view should contain a place filter, which determines which places are processed by the tool
- an entry box to allow to parse the place title and assign values to the different attributes. Usefull regular expressions:
|Albany, NY||\s*(?P<city>.+?)\s*[.,]\s*(?P<state>.+?)\s*$||city = Albany, State = NY|
|Brussels (B)||\s*(?P<city>.*?)\s*\(\s*(?P<country>\w+?)\s*\)\s*$||city = Brussels, Country = B|
- a comboentrybox, together with a Filechooser. The users selects in the filechoser the file in which to search data about a place, the comboentrybox allows to give the correct regex expression to search the file. Clicking on the combobox gives some predefined regex expressions allowing to search free resources. Possible resources:
- GNS, Geonet names server. Contains data about all countries except USA, also in localised variants of the names. The data can be downloaded freely with ftp (180 Mb)
- Geonames. Data about all countries can downloaded freely.
- American data state wise from geonames : download
- OpenGeoDb might be worth watching, however this involves querying an SQL database. They have however also free GIS data like polygon maps (boundaries of places).
- A combobox with predefined formats of latitude in longitude. Suggested: Convert to decimal notation (-53.12364874), convert to degree notation ( 50°59.60"N), convert degree notation with minus to valid degree notation (-50°59.60" to 50°59.60"S)
- The above filters, look-ups and parsings are done on clicking a Find action button
- The results are shown in a Treeview, listing the places, with as children the changes that are suggested. The user can do the following actions on the view:
- press delete, to delete the changes proposed in the view
- double click on a top node to call up the place editor, with all children pre-entered. On clicking save, the changes are written to the database
- double click on a child node to call up the place editor with only the suggestion in the child shown in the editor
- An Apply button is given. On clicking the buttons, all suggested changes in the treeview are in a batch process written to the database.
- Help and Close buttons have the expected behaviour