GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Geocoder for GenoPro

Click to view RSS...
Author A browser-based Javascript app to add location coordinates to Place records in your .gno file
Posted Sunday, March 12, 2017 - Post #37728
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 minutes ago
Posts: 3,337, Visits: 25,589
Hi All,
I have been working for sometime on a tool to allow automatic geocoding (ie. determining latitude and longitude) of places in GenoPro data.  I originally started the project using prototype GenoProX data files (json format) but then decided to try and get it to work with .gno files. Fortunately I found a useful open source javascript library to help with the unzipping and zipping of .gno files (compressed XML)

http://support.genopro.com/Uploads/Images/0488873d-437a-44ff-ab92-3b9e.png


I am using Google Maps and the Google Geocoder API. The tool takes a ,gno file, unzips it and then proceeds to create markers on a Google Map for each place. Places with existing latitude and longitude values are also marked.  The results can be saved into a new .gno file. 

Marker colours are set as follows 

Blue - places already geocoded, i.e. Place record already has Latitude & Longitude tags set.
Green - places successfully matched and geocoded by Google
Yellow - places only partially matched by Google. The location values for these places are not saved in .gno file unless confirmed by you.
Light Blue - places manually located by you positioning the marker.

The markers can be repositioned by dragging or removed if required.

You can click on a place in the drop down list to zoom to it on the map. e.g. clicking on a place highlighted in yellow zooms to it and a dialogue allows you to confirm the position or remove it. Hover over a place in that list to see its status.  Places that fail automatic geocoding are shown in red.

Google imposes quotas on the number and rate of geocoding requests made. If the quota is reached then the script backs off for an increasing delay period before resuming the process. If you have more than a few hundred places then the delay can be become excessive and so I suggest if that happens you halt the process, save the results so far and resume another day.

Once geocoding is complete or after halting the process you can review the results, moving or removing markers as you see fit. You can then click again for the download dialogue. There can be a delay before the download window appears so be patient. You can resume processing after download e.g. make more corrections, and then download the results again.

This software is supplied 'as is' and no warranty whatsoever is given or implied.  I strongly suggest that you do not download overwriting your existing data but instead choose a new filename. Load the saved .gno in GenoPro to check results.

I have only tested this with Google's Chrome browser and will not be invesigating any issues that arise with other browsers. 

N.B. this package is NOT a GenoPro Report Generator skin.  You may download and unzip it into any folder you choose.  See later posts in this topic for updated zip to download. Double click the index.htm file to run the app. You can also run the app from a Web Server but in that case you will need to obtain a Google Maps JavaScript API key (see https://developers.google.com/maps/documentation/javascript/get-api-key#key)and include it in the query string of the URL used to launch the app  e.g. http://www.mywebserver.org/index.htm?key=your-google-javascript-api-key-goes-here




'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Edited: Friday, March 31, 2017 by genome
Posted Monday, March 13, 2017 - Post #37730
Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 45 minutes ago
Posts: 1,576, Visits: 31,220
Downloaded and tried to run in Firefox. It spent ages unzipping but I gave up and downloaded Chrome Version 57.0.2987.98 (64-bit). No better.
Can not move initial box; no problem. However loaded the attached file and it spent ages unzipping and no result in parent directory. I used Inspect and it highlights div#map. However I do not know/understand what is going on (or not going on) so will wait for comment


Whear.gno (396 views, 6.97 KB)
Posted Monday, March 13, 2017 - Post #37731
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 minutes ago
Posts: 3,337, Visits: 25,589
Your .gno ran fine for me in Chrome and FireFox, unzipping in the blink of an eye.  

However I usually click on the box and use the 'Open' dialogue to locate the .gno.  I just noticed that if you use drag and drop then the file must be dropped on the control button/box, not on the map, otherwise a 'Save As' dialogue appears. I need to fix that.

Does that help?


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Monday, March 13, 2017 - Post #37732
Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 45 minutes ago
Posts: 1,576, Visits: 31,220
Have tried again on two different PCs running Win7 and even a laptop with XP. No luck
Any thoughts? Is it the OS, download or just me?
Posted Monday, March 13, 2017 - Post #37733
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 minutes ago
Posts: 3,337, Visits: 25,589
No it's not you it's me and the download!   There are some files missing from the download.   I had forgotten I had moved some javascript libraries out to a shared folder.  So I blame it on a (another) 'senior moment'.  Apologies, I only discovered this when I tried downloading it on to another PC.

I have now updated the zip file in my original post in this thread and tested it by downloading to a Windows 7 PC


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Tuesday, March 14, 2017 - Post #37734
Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 45 minutes ago
Posts: 1,576, Visits: 31,220
It is now happily (I hope) running on a largeish file - 1300 places. What does 'waiting 1s' mean? Google is slow to respond?
I should have mentioned in my first post that when running the initial download I could not move the first box and the selection of area was a small box without any options. In addition on the slow XP machine it did mention a missing file, but this was not consistent and I was not sure that it was my installation was at fault. Should have mentioned this as clue to what was not happening.
Just noticed it took 4s to find Saxmundham Suffolk and 8s for Tasmania
I have always been disappointed that the Google API knows where Uxbridge is in Canada but not in England. Looking forward to seeing the final result of Geocode
Posted Tuesday, March 14, 2017 - Post #37735
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 minutes ago
Posts: 3,337, Visits: 25,589
The waiting messages indicate that a quota limit imposed by Google on geocoding requests has been reached, as indicated in my first post. I think the published limits are around 2500 per day and 25 per second but in practice I seem to get less than that. When a limit is reached, the script waits 1 second before re-attempting the request. If it is refused again the delay is doubled, this continues until the request is accepted.  You can halt the process at anytime if the delay becomes to great, then you save the results in a new .gno and then continue with that updated .gno another day when you will have fewer places to geocode and a fresh daily quota.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Tags:
`


Edited: Tuesday, March 14, 2017 by genome
Posted Tuesday, March 14, 2017 - Post #37737
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Sunday, March 21, 2021
Posts: 716, Visits: 12,927
Its a great tool but it makes me think how to organize certain families, because there are just too many places in my summary file. Another problem is there are a number of double place names due to the fact that immigrants named there new place in the USA or otherwise according to their home place at home(Germany/Denmark).
Posted Wednesday, March 15, 2017 - Post #37740
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 minutes ago
Posts: 3,337, Visits: 25,589
Rather than reorganize the way you record families maybe I can improve the way the geocoder works.   I am going to introduce an option not to add markers for places that are already geocoded in the ,gno file.  In this way if you have many many places then you will be able to geocode for example 500 places, then halt the process and save the results, then run again excluding already geocoded places and geocode the next 500 places and so on. 

Double place names should not be a problem if the country is included in the place name, either directly in the name or via hierarchic places or address details. 

If the tool proves popular I can also provide for 'localization' so that interested users can submit translations of the texts in the app.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Thursday, March 16, 2017 - Post #37754
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 minutes ago
Posts: 3,337, Visits: 25,589
I have now added an option not to create markers for previously geocoded places.  Thus the map is less cluttered with markers and geocoding can be performed as a series of 'chunks' of places if required.

The 'app' seems to run OK in Chrome, Firefox and MS Edge but not IE.  I have added code to check for required HTML5 featues and give an error message if features are not available.

see later post for an updated zip file to download.

Rather than me providing different language versions of the app, it is possible to install the 'Google Translate' Chrome Extension and use that to translate the app running under Chrome

e.g

http://support.genopro.com/Uploads/Images/4b143494-a9fd-44f9-858e-e546.png



I have no idea whether or not Google Translate makes a reasonable attempt of translating my English text so any feedback appreciated.  I notice that parts of Place names in the drop down list are also translated but makes no difference to the result.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Edited: Saturday, March 18, 2017 by genome


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse