Changes

Jump to: navigation, search

Addon:Place completion tool

272 bytes removed, 15:28, 5 January 2013
m
no edit summary
A tool to bring the places in your GRAMPS database in accordance with the GRAMPS requirements: batch add country, county; look-up latitude-longitude; set description (title); ...
There is a version are versions for 3.1, 3.2, 3.3 and 3.4.x, as well as an old version that works with GRAMPS version 3.0.x or 2.2.5+ ! [[Place_completion_tool#Download|Download]].
== Place Completion tool ==
#Download geonames country files. You can do this [http://download.geonames.org/export/dump/ here freely]. Geonames parses fastest, so is the advised format to use
#Download geonames USA state files. You can do this [http://geonames.usgs.gov/domestic/download_data.htm here freely]. This is advised for USA searches, as the data in the USA country file contains many doubles, which can be avoided by searching state per state. State info also contains county information.
#download GNS Geonet country files (not available for usa). You can do this [ftp://ftp.nga.mil/pubpub2/gns_data here freely with ftp].
Watch out, some of these downloads are '''VERY''' large, especially USA data. Only download what you need! If the download is a compressed zip file, you will need to extract the data file before you can use it.
=== Starting the tool ===
You will find the plugin under 'Tools > Utilities > Interactive place completionPlaceCompletion'
=== The dialog explained ===
== Advanced usage ==
 
 
This is for advanced users who know how to use [http://en.wikipedia.org/wiki/Regular_expression regular expressions].
=== Parse title details ===
 
 
In 'Parsing and Conversion of existing title or position', 'Parse title' and 'Change title into' provide some pre-defined options for extracting location values from a Place Title. Otherwise regex parsing is needed.
'''Example 1'''
Some French Place Titles take For France, some [http://www.geneawiki.com/index.php/Informatique_-_saisie_des_lieux practical rules] could be useful for seizing place. It needs : * the form of 5 strings city name + [http://en.wikipedia.org/wiki/INSEE_code#Geographical_codes INSEE code] (Town, at option). This code is unique and can identify with certainty a numeric Postal Codecommon (with the county, Departmentdistrict, Region, Countrytownship and municipality). It can identify with a common insurance even if it has changed its name. This code is used in Archives. ''Using postal code is not advisable ...'' * a subdivision: identifies a parish or a place called within a municipality * the state (at option) ''or county but is already on [http://en.wikipedia.org/wiki/INSEE_code#Geographical_codes INSEE code]'' * the country (at option). Ideally it should still take the country. It is understandable that this is tedious. ''Maybe do not enter the country if the genealogy is mostly of one country and seize enter the country for events outside the country's main. Everyone will appreciate.''
e.g. Avignon,84000,Vaucluse,Provence-Cote-d'Azur,FRANCE,
where some fields may be missing :  e.g. Woerth,,,Alsace,FRANCE,
the regex:
<code>\s*(?P<city>[^,]+)[,]\s*(?P<zip>\d*)[,](?P<county>[^,]*)[,](?P<state>[^,]*)[,](?P<country>[^,]*)[,]*$ </code>
treating the comma character as an end-of-string delimiter, will distribute
Regex A:
<code>\s*(Of[,]*\s*)*(?P<city>[^,]+?)[,]\s*(?P<county>[^,]+?)[,]\s*((?P<country>[^,]+?)){1,1}$</code>
Regex B:
<code>\s*(Of[,]*\s*)*(?P<parish>[^,]+?)[,]\s*(?P<city>[^,]+?)[,]\s*(?P<county>[^,]+?)[,]\s*((?P<country>[^,]+?)){1,1}$</code>
To avoid this, when using Regex B click on 'Find' to display the records proposed for change and delete all the 3-string 'Of,' records before clicking 'Apply'.
 
 
'''NOTE: take care when pasting a Regex (for example, after testing in a regex editor) into the Parse title details field'''
 
'''Pasting adds redundant spaces before or after the Regex that will prevent it working properly in the Place Completion Tool'''
* global install: <code>place_to_gramps_install/src/plugins</code>
If you use Gramps 3.2 , then you will need [http://gramps-addonssvn.svncode.sourceforgesf.net/viewvcp/gramps-addons/code/branches/gramps32/download/PlaceCompletion.addon.tgz this addon], use the [[3.2_Addons|automatic installation]].
If you use Gramps 3.3 , then you will need [http://gramps-addonssvn.svncode.sourceforgesf.net/viewvcp/gramps-addons/code/branches/gramps33/download/PlaceCompletion.addon.tgz this addon], use the [[3.3_Addons|automatic installation]].
{{man warn|WarningIf you use Gramps 3.4 , then you will need [http://svn.code.sf.net/p/gramps-addons/code/branches/gramps34/download/PlaceCompletion.addon.tgz this addon], use the [[3.4_Addons|DO NOT BETA TEST WITH YOUR RESEARCH DATAautomatic installation]]. EXPORT DATA FIRST TO HAVE A BACKUP, THEN RUN THE TOOL}}
== Patches ==
 === Parsing place title === For France, some [http{{man warn|Warning://www.geneawiki.com/index.php/Informatique_-_saisie_des_lieux practical rules] could be useful for seizing place. We need :* the city name + INSEE code (at option). This code is unique and can identify with certainty a common (with the county, district, township and municipality). It can identify with a common insurance even if it has changed its name. This code is used in Archives. ''Using postal code is not advisable ...''* a subdivision: identifies a parish or a place called within a municipality* the state (at option) ''or county but is already on INSEE code''* the country (at option). Ideally it should still take the country. It is understandable that this is tedious. ''Maybe do not enter the country if the genealogy is mostly of one country and seize enter the country for events outside the country's main. Everyone will appreciate.'' If you have a place name like :'''City, code, state, country''', you could try this patch on current ''Place completion tool'' for parsing place title on location fields : 1080a1081 + code_translated = _('zip') 1091a1093 + codegr = r'(?P<'+code_translated +r'>' 1100a1103,1106 + ("citycodestatecountry", "City[,|DO NOT BETA TEST WITH YOUR RESEARCH DATA.] Code[EXPORT DATA FIRST TO HAVE A BACKUP,|.] State[,|.] Country", + _("City[,|.] Code[,|.] State[,|.] Country") + , r'\s*'+citygr+r'.*?)\s*[.,]\s*'+codegr+r'.*?)\s*[.,]\s*' + +stategr+r'.*?)\s*[.,]\s*'+countrygr+r'.*?)\s*$'), Note: this patch does not work with locale set to french (e.g. LANGUAGE=fr_FR.UTF-8). Before getting this fixed, users should temporarily move to english locale to use it.THEN RUN THE TOOL}}
[[Category:Proposed Tool Specifications]]
[[Category:Plugins]]
[[Category:Developers/General]]
[[Category:Tools]]

Navigation menu