Open main menu

Gramps β

Addon:PlaceCleanupGramplet/he

Revision as of 15:37, 11 July 2025 by Avma (talk | contribs) (תצוגה ראשית: typo)


Gramps-notes.png

נא להשתמש בזהירות מרבית ורק לאחר גיבוי הנתונים. להמשך שיפור התוסף, נא לדווח כל סוגיה או הערה ליוצר, או בעמוד מעקב תקלים
אלא אם צוין אחרת בעמוד זה. ניתן להוריד ולהתקין תוסף זה על־פי הנחיות ההתקנה.
לתשומת־לב, למקצת מהתוספים דרישות קדם לחבילות ו/או ספריות אותם יש למלא ולהתקין לפני שניתן יהיה להשתמש בהם.
מערכת תוספים/מתקעים זו נשלטת על ידי מנהל המתקעים


Gramps-notes.png
שוחרר עבור גרסאות גרמפס ‪5.x.x‬ ואילך

גרמפלט ניקוי מקומות

גרמפלט ניקוי מקומות משתמש בתכונת שירותי המרשתת (WebServices) של מסד־הנתונים הגאוגרפי GeoNames.org כדי לחפש עד 2,000 שמות מקומות ביום. (למידע נוסף קוד גאוגרפי.) ניתן להחיל פריטים נבחרים מהמידע המאומת ישירות אל תוך גרמפס כדי לתקן ולשפר רשומות מקום חסרות או חלקיות.

מטרת הגרמפלט

גרמפלט זה נועד לסייע בניקוי מקומות שכבר קיימים במסד־הנתונים. ניתן להשתמש בו גם בעת יצירת מקום חדש, אך יש ליצור תחילה את המקום באמצעות הוספה ← מקום, ולבחור את המקום החדש בחלון העליון לפני השימוש בגרמפלט.

בעת התחלה עם אילנות־יוחסין שיובאו מקובץ GEDCOM, לעיתים קרובות מקומות חדשים שנוצרים הם חלקיים, או שאינם מממשים את מלוא יכולות גרמפס. שמות מקומות וכותרותיהם נשארים לעיתים כמחרוזות פשוטות של שמות מופרדים בפסיקים.

גם בעת תיעוד אירועים ממפקדי אוכלוסין או ממקורות אחרים, ייתכן והנתונים על המקום יהיו מעורפלים – למשל, לא ברור איזו רשות מינהלית מכילה מקום מסוים, ואילו רשויות מכילות את אות ו המקום בתורן. לעיתים המקומות הוזנו במדרג נכון של הקשרים מינהליים, אך ללא נקודות ציון (קו אורך ורוחב), שדרושות כדי להציג מקומות על מפת גרמפס.

במקום להפסיק את רצף הזנת הנתונים או את חקר־היוחסין כדי לאמת כל מקום בנפרד, יעיל יותר לחזור לאחר סיום ההזנה לניקוי המקומות כמקבץ.

בעבר, ניקוי הליקויים הללו דרש עבודה ידנית רבה.

הגרמפלט מסייע באיחוד מקומות חדשים עם מקומות שכבר קיימים במסד הנתונים של גרמפס. כאשר מחפשים מקום, אם מתגלה כי המקום כבר קיים בבסיס הנתונים ומכיל מידע מלא יותר, ניתן לאחד את הרשומות.

הגרמפלט שואב מידע ממסד־הנתונים של GeoNames דרך המרשתת, ומשתמש בו כדי להשלמת פרטי מקומות.

Gnome-important.png
אזהרה: עדכונים אוטומטיים הם מסוכנים!

כרגיל, מומלץ לגבות את אילן־היוחסין לפני השימוש בכלי המעדכן או עורך נתונים באופן אוטומטי. אמנם ניתן לבטל שינויים בודדים במהלך שיח פעיל, אך ייתכן ויהיה צורך לחזור למצב מוקדם יותר.
למידע נוסף יצירת גיבוי בקובץ גרמפס XML


שימוש

התקנת גרמפלט ניקוי מקומות

ניתן להתקין את הגרמפלט כמו כל תוסף אחר; ראו התקנת תוספים בגרמפס.

לאחר ההתקנה, יש להציב את הגרמפלט בסוג־אב מקומות – בין אם במצג מדרג מקומות או במצג מקומות, לפי ההעדפה. לטעינת הגרמפלט בסרגל התחתון, יש להקיש על לחצן [[Gramps_Template:Version manual_Wiki_Manual_-_Main_Window/he#סרגל_תחתון_וצד| ∨]] (החץ כלפי מטה, המכונה גם תפריט גרמפלטים) בצידו הימני העליון של סרגל הגרמפלטים, ובחירה בפריט התפריט הוספת גרמפלט.

דרישת חשבון GeoNames

הוספת שירותי רשת חינמיים למסך ההתחברות

בפעם הראשונה שמנסים לבצע חיפוש, תתקבל תזכורת ליצור ולציין את מזהה משתמש (User ID) באתר GeoNames — דרישה חיונית לשימוש בנתונים שלהם. ניתן להירשם לקבלת מזהה משתמש בקישור הבא: http://www.geonames.org/login.

הליך ההרשמה מחייב קבלת אישור בדוא"ל.

עם זאת, יצירת חשבון בסיסי באתר GeoNames אינה מספיקה. הגרמפלט נדרש לגישה ל־Web Services. לאחר אישור החשבון בדוא"ל, יש לשוב למסך הכניסה באתר וללחוץ על הקישור המאפשר את שירותי הרשת החינמיים (Free Web Services), כפי שמוצג בצילום המסך משמאל.

לאחר הכניסה לחשבון באתר GeoNames, כל הבקשות שמגיעות מגרמפס באותו מחשב ייחשבו כחלק מאותה שיח. אם תוקף השיח יפוג או אם ייחצה מספר הבקשות המותר ליום, הגרמפלט ידווח על כישלון באיתור התאמות לשמות מקומות. אם כמות הכישלונות גבוהה בצורה מחשידה, כדאי לנסות להתחבר מחדש לאתר.

לאחר יצירת מזהה משתמש, יש להזינו לגרמפלט בבאמצעות לחצן ההעדפות. פרטים נוספים בהמשך.

העדפות

"סמל העדפות"
גרמפלט ניקוי מקומות - העדפות

את העדפות הגרמפלט ניתן לפתוח באמצעות לחצן העדפות (בחלק העליון־ימני של חלון הגרמפלט, בסמוך לשדה הכותרת).




חלון ההעדפות כולל את ההגדרות הבאות:

  • השארת קישורי מרשתת — תיבת סימון. מסד הנתונים של GeoNames כולל קישורים שונים למקורות נוספים ברשת, המשויכים לכל מקום. לדוגמה, מקומות רבים כוללים קישור לוויקיפדיה. סימון אפשרות זו יגרום לגרמפלט לשמור את הקישורים האלו בלשונית מרשתת בחלון העריכה של המקום.
  • הוספת מובאות ומקורות למקום — תיבת סימון. סימון אפשרות זו יוסיף מובאה לכל מקום, עם ציון המקור כ־"GeoNames" והמאגר המתאים. המובאה תכיל ערך בשדה "כרך/עמוד" עם מזהה ה־GeoNames של המקום. תהיה מובאה נפרדת לכל מקום, אך מקור ומאגר משותפים לכולם.
  • GeoNames מזהה משתמש — שדה להזנת מזהה המשתמש שנרשם באתר GeoNames. ניתן להירשם בקישור הבא: http://www.geonames.org/login.
  • שמות שפות חלופיות להשארה — שדה להזנת קודי שפות (קוד בן שתי אותיות לפי תקן ISO-639-1), המופרדים ברווחים:

en de fr he it es וכן הלאה. בעת העבודה עם הגרמפלט תופיע רשימת שמות חלופיים למקום (אם קיימים), בצירוף קוד שפת השם. הוספת הקוד לרשימה זו תגרום לסימון אוטומטי של השם לשילוב במאגר המקומות של גרמפס.

  • מקומות מוכלים נוכחיים — כאשר מאשרים מקום מהתוצא*

תצוגה ראשית

Gnome-important.png
יש לנהוג בזהירות מיוחדת בעת שינוי שדה הכותרת

הנתונים שיובאו וישמשו לעדכון תצוגת המקום תלויים בתוכן שדה זה. אם משנים אותו באופן בלתי־מדויק, ייתכן שמידע על מקום שגוי ייקשר לרשומה הנוכחית.
לדוגמה, אם הרשומה הפעילה בתצוגת המקומות היא "Berlín, Usulután", והוזנה ידנית כותרת מקום כמו "Berlin, Germany", ולאחר מכן התקבל ונבחר מקום זה — אזי תירשם בגרמפס החלפה שגויה של הרשומה המקורית (עיר באל סלבדור) ברשומה חדשה (עיר באירופה)!

ארגון מקומות - איתור כותרת מקום מסוימת

החלון הראשי כולל מספר לחצנים, שדה כותרת, תצוגת סטטוס של התאמות ומסך רשימת תוצאות או התאמות.

  • שדה כותרת – שדה זה מציג את שם המקום הנבדק כעת. שם זה ישמש במחרוזת החיפוש למקום הרצוי. השדה משתנה אוטומטית בהתאם לכותרת המקום שנבחר בתצוגת המקומות של גרמפס. ניתן גם לערוך את השדה ידנית בעת הצורך, למשל כשיש קיצורים בלתי־שגרתיים, מדרג היסטורי שונה, או בעיות אחרות המפריעות להתאמה בבסיס הנתונים של GeoNames. (לדוגמה, אם הדרג של המקום בגרמפס הוא "west berliner, west germany", ולא מתקבלות התאמות – ייתכן שב־GeoNames נשמרו שמות רק לאחר איחוד גרמניה. במקרה כזה, ייתכן שהבעיה היא בכלל שגיאת הקלדה כמו סיומת מיותרת 'er', ויש לנסות במקום זאת את "west berlin, west germany").
  • סטטוס התאמות – שדה סטטוס קטן הממוקם בצד שמאל של הגרמפלט, מתחת לתווית כותרת. מציג את מספר המקומות שנמצאו התואמים את החיפוש, ומציין גם האם נמצאו בתצוגה המקומית של גרמפס או בבסיס הנתונים של GeoNames.
  • רשימת מקומות תואמים – אזור זה מציג את רשימת ההתאמות שנמצאו. המשתמש בוחר את ההתאמה הנכונה, ולוחץ על בחר, או לוחץ פעמיים/מקיש Enter או רווח, כדי להמשיך למסך העריכה.
יש שתי עמודות: שמות (כותרות מקוננות של המקומות כפי שהוזנו) ו־סוגים. כאשר מציגים מקומות מגרמפס, העמודה מציגה את הסוג שהוקצה בגרמפס. כאשר מציגים מקומות מ־GeoNames, מציגה העמודה את קוד המאפיין לפי הסיווג שלהם: אות קבוצה (כמו A, P, S) ואחריה סוג, לפי הקוד של GeoNames.
Tango-Dialog-information.png
הימנעות מכפילויות

אם מחפשים מקום מ־GeoNames שכבר קיים במסד הנתונים המקומי, ייתכן שחלק מהתוצאות יופיעו בקו חוצה אדום. משמעות הדבר היא שהמקום כבר מוכנס תחת המקום הפעיל הנוכחי ולכן אינו ניתן לבחירה.

קוד הסוג משמש להכוונה בלבד. סוגי GeoNames לא תמיד ברורים מאליהם. התחביר כולל תחילה קוד קבוצה: 'A' (מקום מנהלי), 'P' (מקום מיושב), 'S' (אתר). מתוך 9 קבוצות GeoNames, לא נתמכות הקטגוריות הבאות: 'H', 'L', 'R', 'T', 'U', 'V'. ניתן לסנן קטגוריות רצויות באמצעות תיבות סימון (ראו בהמשך).
  • מיושב – אם סומן, ייכללו בתוצאות GeoNames גם מקומות מיושבים (ערים, עיירות, כפרים וכו'). הגדרה זו לא משפיעה על החיפוש המקומי. ברירת מחדל: פעיל.
  • מינהלי – אם סומן, ייכללו בתוצאות GeoNames גם חלוקות מינהליות (מדינות, מחוזות וכו'). ברירת מחדל: פעיל.
  • אתר – אם סומן, ייכללו בתוצאות GeoNames גם אתרים נקודתיים (משקים, מבנים, אתרי קבורה וכו'). ברירת מחדל: כבוי.
  • עזרה – פותח את עמוד העזרה הנוכחי.
  • חפוש – מחפש את שם המקום שהוזן בשדה כותרת, בשני שלבים:
    • שלב ראשון – חיפוש בתצוגת המקומות המקומית, רק בין מקומות 'שלמים' (מכילים נקודות ציון וסוג מקום). רק הקטע הראשון של המחרוזת נבדק. לדוגמה, אם תחפשו 'Paris, FR' והנתונים כוללים גם את 'Paris, Lamar, Texas, United States' וגם את 'Paris, Paris, Île-de-France, France' – שניהם יוצגו.
    • שלב שני – אם לא נמצאו התאמות בשלב הראשון, יבוצע חיפוש ב־GeoNames. אם נמצאו התאמות אך אינן מתאימות, ניתן ללחוץ שוב על חפש כדי ליזום את חיפוש GeoNames. השירות מציג עד 10 תוצאות בכל פעם. אם המקום הרצוי לא נמצא – יש ללחוץ שוב כדי לראות עשר נוספות.
Gramps-notes.png
חיפוש מקומי קודם לחיפוש מרשתתי

לאחר חיפוש מקומי, משתנה לחצן חפוש לחפש ב־GeoNames כדי לרמוז שאפשר להרחיב את החיפוש החוצה אם לא נמצאה התאמה.

  • בחירה – לאחר בחירת התאמה, עובר למסך תוצאה/עריכה.
  • עריכה – מאפשר לעבור למסך עריכה ישירות, אם לא נמצאו התאמות. שימושי כששם המקום מפורט מדי ואינו קיים ב־GeoNames (כמו 'My Estate, Paris, TX').
  • מקום הבא – מדלג למקום הלא־שלם הבא בתצוגת המקומות. מקום לא שלם הוא כזה שחסרים לו קואורדינטות או סוג. אם מדובר במקום בלתי־משויך או שאינו נמצא בשימוש – תופיע התראה המציעה למחוק אותו.

Result/Edit view

Place Cleanup Result View

This view presents the found place data for review and potential editing.

At the top of this view is the full title of the Current place, in bold text.

  • Primary Name field. This field is displayed based on the name chosen as primary from the list of available names. It is not editable.
  • Postal Code field. This field displays the postal code(s). It can be edited. There is a small Orig checkbox just above this field, if checked, the Original postal code from the place is used instead of the found postal code. Note that this checkbox is disabled if there is no original postal code.
  • Type field. This field displays the place type. It can be edited. There is a small Orig checkbox just above this field, if checked, the Original place type from the place is used instead of the found place type. Note that this checkbox is disabled if there is an 'Unknown' original place type.
Gramps-notes.png
NOTE

The GeoNames database does NOT provide Gramps Place Type data. This Gramplet uses the available data to make a 'best guess' at the correct Place Type. You should always check and make sure that the value is correct, and fix it if necessary.

  • Latitude and Longitude fields. These fields displays the Latitude and Longitude. They can be edited. There is a small Orig checkbox just above these fields, if checked, the Original Latitude and Longitude from the place is used instead of the found Latitude and Longitude. Note that this checkbox is disabled if there is no original Latitude and Longitude.
  • ID field. This field displays the Gramps ID. It cannot be edited. There is a small Orig checkbox just above this field, if checked, the Original ID from the place is used instead of the found ID. Note that this checkbox is disabled if there is no original ID.
  • The Names list. This list contains the names associated with the found place. Each name has an associated Language and Date. There is also an 'Inc' column which displays the include status of the name in that row. If there is a 'P' in the 'Inc' column, that name is used as the Primary name. If the column has a checkmark '✔' the name will be included in the final Place alternative names list. If you double-click, press 'Enter' or 'Space' on a selected row, that will toggle the include status.
  • Keep button. If one or more of the places in the names list is selected, pressing this button will cause the associated names to be marked for inclusion in the final Place alternative names list.
  • Primary button. If one or more of the places in the names list is selected, pressing this button will cause the topmost associated name to be marked as the Primary name.
  • Discard button. If one or more of the places in the names list is selected, pressing this button will cause the associated names to be unmarked so they will not be included in the final Place alternative names list.
  • Cancel button. Pressing this button returns the view to the main search view. No changes are saved.
  • Ok button. Pressing this modifies the selected place with the new values. In addition, the next level of the place hierarchy will be set into the place. If that next level is already present in the local Gramps place list, and has a matching GeoNames ID, the modifications are completed. If not, the next level in the place hierarchy is shown in the results view.

FAQ

  • GeoNames data is primarily intended for present day usage. It contains little historical information. I have heard that it is pretty complete for United States, Canada, and less so for Europe, although it seems to have all the European cities I have tested so far. If you find an error or omission in the GeoNames data, you may want to tell GeoNames about it http://www.geonames.org/manual.html.
  • GeoNames finds multiple places: Example, 'Santa Rosa, CA'. GeoNames finds both 'Santa Rosa, Sonoma, California, United States' and 'City of Santa Rosa, Sonoma, California, United States'. The way the GeoNames database is structured, they have a 'Populated Place', which generally has lots of Alternate names and postal codes, and an 'Administrative subdivision' for the same place. The 'City of' version is the Administrative subdivision, which generally doesn't have postal codes and alternate names. I personally prefer the first version, which should appear first in the 'Choices' list.
  • Timeouts: When using the GeoNames web database with a free account, you will sometimes get a timeout. The Timeout is set to 20 seconds for each request, unfortunately some actions take several requests, so the user may see unresponsive Gramps for up to 40 seconds. You can always try the request again by pressing the last used button. According to the GeoNames web site, if you pay for an account, you may get better performance, as the paid accounts use more lightly loaded servers.
  • Not Found: While the GeoNames database contains some historical names, it mostly tries to be up to date with the current times. Many places in a typical family tree are described as of the time the event occurred. So it is entirely possible that the described place no longer exists. It may now belong to a different country, or other administrative subdivision. Or it may have been subsumed within another larger place. Initially you should try removing the intermediate place data, leaving only the initial segment and the country. You may get a lot of matches, but that may give you a better clue as to the current situation. Or you may have to do some research outside the Gramplet to figure out what it might be called now.
  • Place Types: Since GeoNames does not have place 'type' data, the same way that Gramps does, this addon uses an algorithm to attempt to pick an appropriate place type. If a country is known to have a rigid administrative place type structure, such as the United States with its City/County/State/Country, then the various parts of the place hierarchy are typed accordingly.
If the structure is not always known or used, then the algorithm attempts to assign place types by looking at the place name. For example if the place name includes a word that matches a place type, such as "Harris County" or "Smith Township", then the place type is set accordingly. To do this, all the various place alternate names are scanned, in case the primary name does not include a suitable word.
If you know that a particular country has a rigid (or even mostly rigid) hierarchical structure, and this addon seems to be getting it wrong a lot, please let the author know at paulr2787 at gmail.com. I can modify the code to make it work better if I understand the correct country structure.
  • IDs: When GeoNames is the source of place data, the normal place ID ('P0001') is replaced by a GeoNames specific ID ('GEO12345'). The number portion of this ID is the GeoNames identifier for the place. By using this type of ID, the addon can easily identify when enclosing places are already present in your database, which means that the user doesn't have to do a local search for and selection of each level of enclosing place.
  • GetGov, how does this interoperate with the data from GetGov? At this time it does not integrate with that data. If you already have places loaded from the GetGov addon, then the ID field will have a GovID. If you want to do a lookup with GeoNames for that place, you should probably set the Place Cleanup preferences for the enclosure to keep the current values. In addition, you should probably use the 'Orig' checkbox for the ID to keep the original Gov ID.

Issues

This tool is fairly complex. Please report any issues or desired enhancements to paulr2787 at gmail.com.

I have included a French translation of the tool, mostly as a test of the internationalization code. Since I don't speak French (USA Texas version of English only), please excuse my French.