Difference between revisions of "merge"

From GeneWeb
Jump to: navigation, search
(Concatenation of bases)
m (A2 moved page Merge to merge: minuscule)
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{languages|merge}}
 
{{languages|merge}}
  
This section explains how to "merge multiple GeneWeb bases".
+
This section explains how to “merge multiple GeneWeb bases”.
  
Merging bases is performed in three steps: concatenation of bases, suppression of redendant "doubles", cleanup.
+
Merging bases is performed in three steps: concatenation of bases, suppression of redendant “doubles”, cleanup.
  
If you are not specialists of terminal command lines, you may use [[gwsetup|gwsetup]] which will guide you if the bases are already installed in your environment.
+
If you are not specialists of terminal command lines, you may use [[gwsetup]] which will guide you if the bases are already installed in your environment.
[[File:Merge1.JPG|thumb|right|400px|Merging bases in [[gwsetup|gwsetup]]: choosing bases to merge.]]
+
[[File:Merge1.JPG|thumb|right|400px|Merging bases in [[gwsetup]]: choosing bases to merge.]]
  
=== Concatenation of bases ===
+
== Merging bases ==
If you have two bases {{c|toto}} et {{c|titi}}, create the corresponding [[GWformat/fr|GW format]] files with the [[man/fr#Exporter un fichier GW (gwu)|'''gwu''' command]] :
+
If you have two bases {{c|toto}} et {{c|titi}}, create the corresponding [[GWformat|GW format]] files with the [[Gwu|'''gwu''']] command:
  
 
<pre>
 
<pre>
Line 17: Line 17:
 
</pre>
 
</pre>
  
Create a new union base, for instance {{c|tutu}}, with the  [[man/fr#Créez une base de données (gwc, gwc1, gwc2)| '''gwc''' command]]: 
+
Create a new union base, for instance {{c|tutu}}, with the  [[Gwc|'''gwc''']] command: 
 
<pre>gwc toto.gw titi.gw -o tutu</pre>
 
<pre>gwc toto.gw titi.gw -o tutu</pre>
[[File:Merge2.JPG|thumb|right|400px|Merging bases in [[gwsetup|gwsetup]]: confirmation.]]
+
[[File:Merge2.JPG|thumb|right|400px|Merging bases in [[gwsetup]]: confirmation.]]
  
It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurence combination in both bases.  
+
It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurrence combination in both bases.  
  
To remove this errors, the gwc option {{c|-sep}} will offset automatically occurence numbers thus avoiding confilcts: <!-- are all occurrences offset ?? -->
+
To remove this errors, the gwc option {{c|-sep}} will offset automatically occurrence numbers thus avoiding conflicts: <!-- are all occurrences offset ?? -->
  
 
<pre>gwc toto.gw -sep titi.gw -o tutu</pre>
 
<pre>gwc toto.gw -sep titi.gw -o tutu</pre>
 
Note: in order to give you more control over this process, there is an additional parameter forcing the offset to a specified value.
 
Note: in order to give you more control over this process, there is an additional parameter forcing the offset to a specified value.
<!-- find this additional parameter !! -->
 
<!-- Note here that gwc *.gw -sep -o tutu works, but in command line only.
 
Making it available from gwsetup reqires a small change in the code (consider *.gw to be a valid file name, and leave to gwc the task of discovering whether the file really exists or not).
 
-->
 
You now have a valid base named tutu containing the sum of the two previous bases, and you can proceed to update the content of this new base, in particular merging multiply defined persons as explained below. GeneWeb maintains the memory of which file data about each family came from, and you will later be able to reconstruct those files as explaine [[divide|here]].
 
  
In order to determine which file a particular family comes from, add {{c|1=;opt=from}} to the URL as in:
+
You now have a valid base named tutu containing the sum of the two previous bases, and you can proceed to update the content of this new base, in particular merging multiply defined persons as explained below. GeneWeb remembers which file a aprticular family comes from, and you will later be able to reconstruct those files as explained [[divide|here]].
 +
 
 +
In order to display which file a particular family comes from, add {{c|1=;opt=from}} to the URL as in:
 
<pre>http://localhost:2317/tutu?i=357;opt=from</pre>
 
<pre>http://localhost:2317/tutu?i=357;opt=from</pre>
<!-- Individu ou famille!!! %origin_fine; n'existe pas dans le contexte d'une personne !! -->
+
The {{c|.gwf}} parameter {{c|1=origin_file=on}} sets this feature permanently for a base.
  
=== Merging persons ===
+
== Merging persons ==
 +
After concatenation of several bases, with or without the {{c|-sep}} option, you may have multiply defined persons in your new base. In order to merge these double entries, you must follow the instructions of the section on [[fusion|merging two persons]] or families as much as needed.
  
After concatenation of several bases, with or without the {{c|-sep}} option, you may have multiply defined persons in your new base. In order to merge these double entries, you must follow the instructions of the section on [[Update#Merging two persons|merging two persons]] or families as much as needed.
+
== Cleanup ==
 
+
After this person and families merging steps, the memory space used by these doubles is not automatically reclaims (you will notice that the total number of persons in the base remains constant). It is therefore useful to perform a [[clean]]up of the new base:
=== Cleanup ===
+
 
+
After this person and families merging steps, the memory space used by these doubles is not automatically reclaimes (you will notice that the total number of persons in the base remains constant). It is therefore useful to perform a [[clean|cleanup]] of the new base:
+
 
<pre>
 
<pre>
 
gwu tutu > tutu.gw
 
gwu tutu > tutu.gw
Line 52: Line 47:
 
<pre>gwc tutu.gw -o toto -f</pre>
 
<pre>gwc tutu.gw -o toto -f</pre>
  
[[Category:Manuel]]
+
 
 +
{{manual}}
 +
 
 +
[[Category:Manual]]

Latest revision as of 13:19, 22 April 2016

150px-Geographylogo svg.png Language: English • français

This section explains how to “merge multiple GeneWeb bases”.

Merging bases is performed in three steps: concatenation of bases, suppression of redendant “doubles”, cleanup.

If you are not specialists of terminal command lines, you may use gwsetup which will guide you if the bases are already installed in your environment.

Merging bases in gwsetup: choosing bases to merge.

Merging bases

If you have two bases toto et titi, create the corresponding GW format files with the gwu command:

gwu toto > toto.gw
gwu titi > titi.gw

Create a new union base, for instance tutu, with the gwc command: 

gwc toto.gw titi.gw -o tutu
Merging bases in gwsetup: confirmation.

It is possible that gwc will display error messages triggered by persons bearing the same lastname, firstname, occurrence combination in both bases.

To remove this errors, the gwc option -sep will offset automatically occurrence numbers thus avoiding conflicts:

gwc toto.gw -sep titi.gw -o tutu

Note: in order to give you more control over this process, there is an additional parameter forcing the offset to a specified value.

You now have a valid base named tutu containing the sum of the two previous bases, and you can proceed to update the content of this new base, in particular merging multiply defined persons as explained below. GeneWeb remembers which file a aprticular family comes from, and you will later be able to reconstruct those files as explained here.

In order to display which file a particular family comes from, add ;opt=from to the URL as in:

http://localhost:2317/tutu?i=357;opt=from

The .gwf parameter origin_file=on sets this feature permanently for a base.

Merging persons

After concatenation of several bases, with or without the -sep option, you may have multiply defined persons in your new base. In order to merge these double entries, you must follow the instructions of the section on merging two persons or families as much as needed.

Cleanup

After this person and families merging steps, the memory space used by these doubles is not automatically reclaims (you will notice that the total number of persons in the base remains constant). It is therefore useful to perform a cleanup of the new base:

gwu tutu > tutu.gw
gwc tutu.gw -o tutu

If you know you want to suppress the previous version of the new base, use option -f:

gwc tutu.gw -o toto -f



GeneWeb Manual

Rembrandt Old Man Reading a Book.jpg

Use and manage genealogical databases

Technical annex