2,037
edits
Changes
From Gramps
New page: This is the specification for the non official Place completion tool. {| {{Prettytable}} style="width:235px; line-height:2.25em; font-size:90%;" align=right |- |bgcolor="#8DA7D6"|'''...
This is the specification for the non official [[Place completion tool]].
{| {{Prettytable}} style="width:235px; line-height:2.25em; font-size:90%;" align=right
|-
|bgcolor="#8DA7D6"|'''Task'''
|bgcolor="#8DA7D6"|'''Status'''
|-
|Specification draft
|style="color:red;" |started
|-
|Approval
|style="color:red;"|unofficial plugin
|-
|Implementation
|style="color:orange;"|v0.1
|}
==Introduction==
The [[place completion tool]] allows the user to manage his places and change data on a set of places with one button action.
==Example/Screenshot==
An example:
TODO
----
==Specification==
=== View===
*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:
{| {{prettytable}} style="margin-left:1cm;"
!Title!!Regular Expression!!Attributes
|-
|Albany, NY || <nowiki>\s*(?P<city>.+?)\s*[.,]\s*(?P<state>.+?)\s*$</nowiki> || city = Albany, State = NY
|-
|Brussels (B) || <nowiki>\s*(?P<city>.*?)\s*\(\s*(?P<country>\w+?)\s*\)\s*$</nowiki> || 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, [http://earth-info.nga.mil/gns/html/ Geonet names] server. Contains data about all countries except USA, also in localised variants of the names. The data can be [ftp://ftp.nga.mil/pub/gns_data downloaded freely with ftp] (180 Mb)
** Geonames. Data about all countries can [http://download.geonames.org/export/dump/ downloaded freely].
** American data state wise from geonames : [http://geonames.usgs.gov/domestic/download_data.htm 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
{| {{Prettytable}} style="width:235px; line-height:2.25em; font-size:90%;" align=right
|-
|bgcolor="#8DA7D6"|'''Task'''
|bgcolor="#8DA7D6"|'''Status'''
|-
|Specification draft
|style="color:red;" |started
|-
|Approval
|style="color:red;"|unofficial plugin
|-
|Implementation
|style="color:orange;"|v0.1
|}
==Introduction==
The [[place completion tool]] allows the user to manage his places and change data on a set of places with one button action.
==Example/Screenshot==
An example:
TODO
----
==Specification==
=== View===
*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:
{| {{prettytable}} style="margin-left:1cm;"
!Title!!Regular Expression!!Attributes
|-
|Albany, NY || <nowiki>\s*(?P<city>.+?)\s*[.,]\s*(?P<state>.+?)\s*$</nowiki> || city = Albany, State = NY
|-
|Brussels (B) || <nowiki>\s*(?P<city>.*?)\s*\(\s*(?P<country>\w+?)\s*\)\s*$</nowiki> || 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, [http://earth-info.nga.mil/gns/html/ Geonet names] server. Contains data about all countries except USA, also in localised variants of the names. The data can be [ftp://ftp.nga.mil/pub/gns_data downloaded freely with ftp] (180 Mb)
** Geonames. Data about all countries can [http://download.geonames.org/export/dump/ downloaded freely].
** American data state wise from geonames : [http://geonames.usgs.gov/domestic/download_data.htm 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