Managing Latitude and Longitude
From TNG Wiki
TNG users who use the mapping features of both TNG and Legacy should choose just one of these programs to hold the master list of coordinates. Both cases are documented in this article.
The discussion tab above is active.
Master List of Coordinates Held in Legacy
In this case you would add/update your mapping coordinates in Legacy and then transfer them to TNG.
Transfer Coordinates From Legacy To TNG
- Create a GEDCOM File from Legacy with the option "Produce a File for Legacy" (Not for "GEDCOM 5.5"). During TNG import, check the box "Import latitude / longitude data if present." This will overwrite coordinates already present in TNG.
Preserving Coordinates From TNG (That You Worked So Hard to Create)
- You may already have created coordinates in TNG for many places. Go to phpMyAdmin (or equivalent) and export the tng_places table as a file of your choice (text, spreadsheet etc.). Coordinates in Legacy that may need to be touched up include historical names and some counties. When you adjust a geo-code in Legacy then select "Geo-code > Do not auto geo-code the current location" so that your changes will not be overwritten.
Orphaned Places in TNG
- If you "Replace all Data" when you import a GEDCOM into TNG then Places in TNG that have latitude and longitude assigned will not be deleted before the import. This is to preserve Place Level and Zoom Level during the update. It also means that if you delete a location in Legacy and that location has coordinates in TNG, then TNG will retain the Place name as an orphan. Whenever you delete a location in Legacy, either by using Delete, by using Combine With Other Location, by renaming the location, you should blank the coordinates for that Place in TNG so that TNG will remove it on the next update if using "Replace All Data." (This section subject to correction and verification.)
Import New Places and Coordinates to TNG Without Overwriting Existing Coordinates
- For users that format locations in Legacy as:
- city, county, state, country AND
- , county, state, country AND
- , , state, country AND
- , , , country
- If you haven't completely transferred your coordinates to Legacy but still want to add new location coordinates to TNG during an update without overwring existing TNG coordinates, then there is a tool posted at http://www.reynolds-lake.ca (RHS near the bottom) that will do this.
- The process is as follows:
- a) Create a GEDCOM from Legacy in Legacy format (same GEDCOM you use for the TNG update)
- b) Run the tool to create a text file (on your desktop) containing SQL commands
- c) Use phpMyAdmin or equivalent to update the TNG Places table.
- More complete instructions are shown when you run the program.
- (Always backup your tables!)
Create Place Level and Zoom Level for Coordinates Imported From Legacy
Place Level determines the color of the ballon that appears on maps. Zoom level only affects maps with a single balloon.
Hand Coding
- In TNG go to Admin>Places and enter Place and Zoom Levels manually. These will not be overwritten the next time you upload a GEDCOM.
Automated
- For users that format locations in Legacy as:
- city, county, state, country AND
- , county, state, country AND
- , , state, country AND
- , , , country
- For users that format locations in Legacy as:
- Latitude and Longitude are imported from Legacy without an assigned Place Level and Zoom Level. The tool mentioned in the paragraph above at http://www.reynolds-lake.ca can be used to add Place and Zoom Levels to existing TNG Places. This tool counts the number of leading commas to determine Place Level and then assigns a Zoom Level according to Place Level. Zoom Levels can be edited with Search and Replace in Notepad. The phrase " AND LONGITUDE IS NULL;" needs to be replaced with ";" in each record of the SQL command file (Notepad Search and Replace again) so that all Places are updated, not just those with Null Longitude.
- (Backup tables please if using this!)
Master List of Coordinates Held in TNG
In this case you would add/update your mapping coordinates in TNG and then transfer them to Legacy.
- (You should consider that transfering coordinates from TNG to Legacy is not practical.)
