Jump to content
TNG Community

Linking two places


stores

Recommended Posts

One request that I have made to Darrin a couple times over the years, which has not materialized, is the ability to link two different places to each other, much like the ability we currently have to link a cemetery that you build in TNG to the Cemetery Place in TNG so that when you look that the Cemetery Place, you can see a link to the built cemetery as in the attached image showing the Acton Cemetery.

While I use the actual name and place of a Cemetery as it is today for where people are laid to rest, I try to record birth, death, and all other events as what the place was when the event occurred, so I have many places in the tree like in the attached New Mexico Place List image where I have Albuquerque, Bernalillo County, New Mexico and Albuquerque, Bernalillo County, New Mexico Territory which are actually the same place, just at different times. 

I also have many towns that were in one county when an event occurred but due to state and county formations down the line, the town is now in another place, and so I would like to be able to link the two places so that I am reminded of the other place.

I know I can use html in the notes of places to link them but I prefer to use the notes for short paragraphs of historical information or to record the dates of county formation and what not. 

Ideally, I would like the linked place to show up as Places, under the map, much like the Acton Cemetery on the attached image shows up under Cemeteries. You would actually link or connect the two places via Admin/Places where an option to link to a place would show say between Cemeteries: and Notes:.

That said, I thought I would throw up a query and see if any one has created a mod or a way for linking two places in a TNG tree as described above.

New Mexico Places.jpg

Cemetery Link.jpg

Link to comment
Share on other sites

  • 1 year later...

I would add my vote for this suggestion.  I deal mostly with the region that included colonial VA and NC, which later became US, then subdivided into new states (KY and WV from VA; TN from NC).  Subsequently the states subdivided counties many times.  It is a nightmare to keep track of.

Link to comment
Share on other sites

  • 1 month later...
Robin Richmond

A link from one place to another has several limitations. e.g. Does each place have to link to the other - or. more problematically, what happens when there are three redundant places?

However, if your placenames all have the same geocoordinate, then, well, there are your links!

Of course, you still need to link them in placesearch.php.  That could be done through this code, where $prow represents the record for the current place.
 

$dupquery = "SELECT place FROM places
             WHERE latitude='{$prow['latitude']}' AND longitude = '{$prow['longitude']}'
                 AND gedcom='{$prow['gedcom']}'";
$dupresult = tng_query($pquery);
while( $duprow = tng_fetch_assoc( $dupresult ) ) {
       echo $dupresult['place'];
}

- Robin

Link to comment
Share on other sites

Thank you for the reply Robin, and the code which i will try. 

As i have said, i like to add what a place was called when the event occurred because that might point to other places to look for records and like DMOHN points out in his reply, it can be a nightmare at times to keep track of these things without linking them in some way. While i can and do create links between places using html and the notes field, a simple fix in my eyes is a link option in tng which would give both places the same Lat/Long, just like with cemeteries.

Providing the two places are in TNG, an option to link them in TNG would just make life so much easier as this occurs often, especially in the 1800's but yes, i can see where this could get problematic if you have say three or more places.

However, another option could be to not look at this from the individual places point of view, but look at this from the geocode itself. Under say the caption, Historical, list/link any place with the same numerical Lat/Long, excluding places not yet geocoded and places with no proper geocode which would rule out things like Union Army, United States Navy, etc... so that when you click on a place, the map shows as usual, listing all Births, Deaths etc... but one field would be Historical with any place listed, with the appropriate link to that place, that has the same Lat/Long as the place you are looking at on the map.

Anyway, just spitballing here as they say. 

Thank you for the reply, was beginning to think my post would never get a hit (ha ha).

Jim 

Link to comment
Share on other sites

Robin Richmond

This is an interesting problem. If matching on geocoordinates is not going to work. I wonder how one might link among matching locations. Let's take two names for the same place:

  1. Ramah, McKinley County. New Mexico Territory
  2. Ramah, McKinley County. New Mexico

You mentioned cemeteries that link to places as a model for what you want.  But there are several issues

Cemeteries can link to exactly one placename, so if there is a cemetery in Raman, you can't link it to both placenames.  You could create a cemetery for New Mexico Territory and another for New Mexico, but you would not be able to get a list of burials in the cemetery.

To connect two places there could be a link field to the places table, where each Ramah would link to the other.  If I understand what you said about following the precedent of cemeteries, the Place Detail page (placesearch.php) for  Ramah in New Mexico Territory would mention Ramah in New Mexico (and vice versa), but neither page would list all events in Ramah.

But a third matching placename

      3. Ramah, Valencia County, New Mexico Territory

introduces another problem.  The single-ink field no longer works, as each of the placenames needs to link to each of the others. In theory. you could form a ring of links (#1 to #2, #2 to #3, #3 to #1), but that is terribly hard to maintain, and hard to query. 

What kind of linking scheme do you think might work?

- Robin

 

Edited by Robin Richmond
accidentally posted too soom
Link to comment
Share on other sites

Perhaps cemeteries is not a good example because i do not use U.S.A at the end of the places in my tree since 95 percent of the places in my tree are in the United States. TNG links the Cemetery Place, Acton Cemetery, Hood County, Texas, to the Cemetery you build separately, Acton Cemetery, Hood County, Texas, United States.

But what i was trying to point out in my original post is that when you look at the Cemetery Place, Acton Cemetery, Hood County, Texas, you also see the Cemetery you built, under Cemeteries, which has the United States at the end. It is this view that i was trying to show.

Unlike places, where i use what a place was called when the event occurred, for cemeteries, i use what it is called today because that is where the person is physically laid to rest and i simply add the other names the cemetery is or was known as in the notes so cemeteries would never get the links i am talking about, even if the cemetery moved from one county to another.

The linking i am talking about would be for Towns and Cities.

So that when i view the map for Ramah, McKinley County, New Mexico, i would also see among the Births, Deaths, Census Reports, below the map, another field, lets call is Places, and under Places, i would see Ramah, McKinley County, New Mexico Territory, since it has the same geocode.

Another Example, David was born in Golden Grove, Jasper County, Missouri in 1845, in 1855, Barton County, Missouri was formed and now Golden Grove falls within Barton County, Missouri. Both places have the same geocode as the town never moved, just the county boundaries. So when viewing one place, i would like to see the other listed under Places, with a hyperlink to that place when i view the map, to jog my memory to look in that place as well for records.

With that in mind, what would be nice is a Mod that would add this option, listing other Places with the same Lat/Long when you view a given place.

Matching on Names would probably not be a good idea but matching or sorting on Lat/Long would probably be best since they are more precise.

This is an old post, and dmohn is the only one who chimed in on wanting something similar, so perhaps this would not be a popular project, which is perhaps why Darrin never did anything with it as i asked him about this feature a few times in the past.

Link to comment
Share on other sites

Another idea would be to use the current place name so people could find it today and also have a table that captures any historical names and the dates that the historical name was used. You could then report out something like:

current name, current county, current state

 —    Historic name, historic county, historic state 18-56 to 1925

etc.

just an idea

 

marc Irish

Link to comment
Share on other sites

So basically what you want would take the row returned from the places table that has the lat, long, and id.  From that run another query on the places table to get the rows that have the same lat and long but are not the existing place id.  Then just output that list of place names as a block "Alternate Place Names" and the list of those places with a magnifying glass search link after the alternate name, just like a place is displayed on the getperson page and others, would be displayed in that block so that you could see it and remember to check the alternate place name.  That isn't too far from the code Robin posted, it just needs a little change to get it to exclude the existing row and then a little work to make the display a little bit prettier on the placesearch page.  It does really simplify the linking between places, since the link is really through the geocode instead of any actual database link ids or other database tables, etc.

Link to comment
Share on other sites

Yes bhemph, that sounds like what i am looking for, just something that simplifies the process in a mod that would not have to be reviewed often to ensure all places are linked to alternate places.

What i currently do is create a hyperlink (As per attached) in the notes for a place which works fine but requires me to review the places from time to time to see if i added new places but did not add links in the notes. 

The attached image shows my current system of hyperlinks to the Territory as well as a little bio on the formation of Bernalillo County, New Mexico.

Example.jpg

Link to comment
Share on other sites

Robin Richmond

Oops. Jim -  I though that you said in an earlier message that using the geocoordinates might not work for you, and then I got all overanalytical (and whiny) on you - for which I apologize. If you  are content to use the geocoordinates, then we really are almost there.

I don't want to get all obsequious on you, but I'm glad to see Brent and Marc in the discussion, since I know that you bring us to a solution.

So I'll add to the code I proposed:

# Get other placenames with the same geocoordinates
$dupquery = "SELECT place FROM places
             WHERE latitude='{$prow['latitude']}' AND longitude = '{$prow['longitude']}'
                 AND place<>\"$psearch\"";
# Make sure that we're in the same tree if a tree has been specified
if ($tree) $dupquery .= " AND gedcom='$tree'";
$dupresult = tng_query($pquery);
echo "Matching places:";
while( $duprow = tng_fetch_assoc( $dupresult ) ) {
	$rrplacename = urlencode($dupresult['place'];
    echo "<div>- <a href=\"placesearch.php?psearch=$rrplace\">$dupresult['place']}<img src='img/tng_search_small.gif'
          title="Display information about this place' alt=''></a></div>;
}

I think that's all we need.

Would you want this list to be inserted above or below the map?  If below, should it before or after the place image, which comes before the cemetery and event tables?

- Robin

p.s. The query above should say "FROM $places_table", not "FROM places"
(This is a correction to the posting I made a few minutes ago;  the editor wouldn't let me correct the code block)

Edited by Robin Richmond
corrected a mistake in the PHP code
Link to comment
Share on other sites

Not a problem Robin, and yes, i am more than content to use the geocoordinates. I will play with the code and see what happens... Thank you... Jim

Link to comment
Share on other sites

Robin Richmond

I can't help but think that it would be useful - at some point - to see a combined list of events at all of the matching places.  And I believe that would be pretty easy to do.  We would take advantage of the fact that all of the results tables in placesearch.php redundantly display the placename on every result row.   (I really don't know why Darrin did that, but here, it is convenient that he did.)

I won't specify the required code changes unless Jim says that he would like that capability.  But FWIW, I think that it would only requre

  1. Two new lines in the the PHP code I specified in my previous message, and
  2. The replacement of exactly one line of code in placesearch.php.

Really! That's all it would take! (I think)

- Robin

Link to comment
Share on other sites

1 hour ago, Robin Richmond said:

 

p.s. The query above should say "FROM $places_table", not "FROM places"
(This is a correction to the posting I made a few minutes ago;  the editor wouldn't let me correct the code block)

Robin - if you go to Edit the post, then double click the code block, the code editor will appear and let you make that change

Roger

Link to comment
Share on other sites

i think it would be great to have another section on the person page that documents the current name and historic names (with dates if possible) of the events pertaining to that person.  We could even link up to wiki pages for those historic places if they exist.

 

Marc

Link to comment
Share on other sites

Robin, i have tried your code in a couple different places in the placesearch.php file and i keep getting the following error...

Parse error: syntax error, unexpected ';', expecting ',' or ')' in D:\wamp\www\placesearch.php on line 412

I currently have your code inserted at line 403 of the attached placesearch.php, any ideas?

Just so we are on the same sheet of paper, i am running tng v11.1.2

Jim

placesearch.php

Link to comment
Share on other sites

  • 3 months later...

Realizing that I am coming in very late kn this discussion,  but it caught my attention today. The use of New Mexico Territory is a good example for historical names, as I have some Arizona locations during that era that are New Mexico Territory as well. This would also help with the problem of British (or Dutch or French) Colonial America as well - something thing I wish the "Big Name Players" (FTM, Legacy, etc.) would figure out as well.

(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...