Admin Places Geocode

Aus TNG_Wiki
Zur Navigation springen Zur Suche springen
Admin Places Geocode
Summary Among other things, establishes the precision (number of desired decimal digits) of geocoordinates and rounds all geocoordinates calculated from maps.
Validation
Mod Updated 23 Sep 2023
Download link v14.0.0.6c
TNG 14.0
Download stats
Author(s) Robin Richmond
Homepage this page
Mod Support My Mod Support form
Contact Developer My Mod Support form
Latest Mod 14.0.0.6c
Min TNG V 10.1
Max TNG V 14.0.3
Files modified
admin_editplace, admin_geocode, admin_geocodeform, geocodelib, googlemaplib2, admin_genconfig, admin_updateconfig, places_help, English cust_text.php
Related Mods
Notes

Purpose of the Mod

  1. To enhance (from my perspective) the batch geocoding process at Admin>>Places>>Geocode
    • The "kickoff form" has clearer labels for the existing options and two new filters that can ignore certain problematic placename components.
    • The code that processes a batch of places has been moved from admin_geocode.php to admin_geocodeform.php so that the results can be displayed next to the kickoff form. This allows users to see geocoding results while deciding what to do next.
  2. To provide a mechanism for rounding latitude and longitude values in several programs and processes, by
    • Defining a mod setting for "The number of decimal digits to which geocoordinates will be rounded", which is saved as $rrconfig['geodigits'] and
    • Modifying TNG functions that read geocodes from mapping systems.

Mod Options

  1. The number of decimal digits that latitude and longitude values will be rounded to.
    • This settings is a non-negative integer (where 0 means "do not round"), with a default of 5 decimal digits, which is accurate to about 10 meters.
    • This setting is used by several other mods that handle geocoodinates. See Related Mods

These mod options are custom TNG settings, defined and edited in a Mod Settings Block in the form at Admin>>Setup>>General Settings, in a new subform named Mod Settings Blocks. The Mod Settings Blocks mod is a prerequisite for the installation of this mod.


Side Effects

This mod modifies TNG's google map PHP functions to round geocoordinate when any program reads geocoordinates from the map, whether that means doing a place search in the map or clicking on the map. This modification affects the Cemetery and Media edit pages without making any changes to those pages.

Compatibility

This mod is compatible with Places Subject to Deletion, Tree ID Mod, Admin Places Search, TreeID-One Column, Placename Format, Google Maps - More Place Levels Mod, and Google maps 15, all of which also affect Admin>>Places.

The Geocode Assist Mod v10.0.0.2 will suppress the Geocode Globe if the place level is set to -1 (Do not Geocode).

If you import your data, this value may not be preserved across an import. See the Do Not Geocode section in the Geocode Assist Mod on how to preserve the value across an import.

Related Mods

The Mod Settings Blocks mod packages this mod's options into what I call a "Mod Settings Block", which is a set of form fields that formatted and labeled so that it stands out among other options in an Admin>>Setting form. Mod Settings Blocks is a prerequisite for this mod; it must be installed before this mod can be installed.

Mods that use this mod's geocoordinate precision setting

  • Admin Cemetery Edit, which does rounding both in the Cemetery search page (admin_cemeteries.php) and the Cemetery Edit page (admin_editcemeteries.php)
  • Admin Places Search, which rounds geocoordinates that are displayed in the Places search results table (admin_places.php). The places search page does not save any rounded geocoordinate; it simply truncates them so that they take less space in the results table.

Installation

This mod includes a typical mod subfolder, with the same base name as the mod's .cfg file. The subfolder is atypical in that no files in it are installed to working TNG folders. However, it does contain critical files that contain the mod's language strings, which the mod does not add to standard cust_text.php files. Instead, the PHP code modified by this mod loads the language strings from files in the mod's languages/ subfolder. Read more about this technique.

[Show Standard Installation Process]

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.

Procedure

  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.

Problems?

  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.
[Hide Details]

Visualizations

BEFORE: The Admin >> Places >> Geocode Kickoff form, and the results page

Note that the "Reset" checkbox, which causes all "geoignore" flags in the selected tree to be reset, was introduced with TNGv11, but the mod also works for TNGv10.1, which does not have that checkbox.
Admin places geocode-before.png

AFTER: The initial kickoff form

Admin places geocode-after1.png

AFTER: Geocoding results, with the kickoff form on same page

Admin places geocode-after2.png

BEFORE: The Admin >> Places Editor

(It may look a little odd with the map hidden)
Geocode-before-editplace.jpg

AFTER: The Admin >> Places Editor

The "number of decimal digits" option is set to 5. If stored values have more than 5 decimal digits, they will be rounded as they are read, and a note will let the user know that this rounding occurred.
Geocode-after-editplace.jpg

AFTER: New text in the Places help file

Admin places geocode-help.png
This mod also adds text to the "Add New/Edit" section of the help file, but that text is not shown here.

Revision History

Mod Version TNG Version Date Note
v14.0.0.6c 14 23 Sep 2023 No functional changes; Accomodated TNGv14.0.1, improved MM installation logic. Addressed issues that seem to be the result of changes to the Google libraries
v14.0.0.6b

apg

13 Mar 2023 Upgraded to TNGv14
13.0.0.6 13.0 - 13.0.2 21 Dec 2020 Upgraded to TNGv13
  • Removed target locations that created and used the 'Do not geocode' placelevel, since that feature is now native to TNGv13
  • Defines the mod option in a Mod Settings Block, and implements the Inner Mod Menu mod.
12.0.0.4 12.0 - 12.2+ 30 Sep 2019 The Mod option at Admin>>Setup>>General Settings>Miscellaneous now use an include file that is shared with other mods.
12.0.0.3a 12.0+ 14Nov2018 Small improvements: Better error checking; deals with trailing spaces, displays the placename before trying to geocode it so that the log will more clearly show where the process crashed.
12.0.0.3 12.0+ 4May2018 No functional changes; made compatible with TNGv12.
12.0.0.3 12.0+ 4May2018 No functional changes; made compatible with TNGv12.
10.1.0.3 10.1 10Nov2017 Defines a TNG system parameter that establishes the number of desired decimal digits in Geocodes and rounds all Geocodes calculated from maps. Provides new filters can ignore certain problematic placename components.
10.1.0.1 10.1 19Apr2017 New mod.

Sites using this mod

If you download and install this mod, please add your site to the table below.

URL User Note Mod-Version TNG-Version User-language
Robin's Roots Robin Richmond (developer) Thumbnail-generations on the mod authors test site] id/pw: a/a 14.0.0.6c 14+ English
Joseph Oran Holtz Genealogy Pages Jim Holt Not a Public Site 10.1.0.3 11.1.2 English
Our Roy and Boucher Family Ken Roy 10.1.0.2 beta 11.1.1 English
The Cole / Tanner Family Tree David Cole Public/Private see here see here EN, DE, FR, ES, NL
Skeel, Schaffalitzky. Find navne i Danmarks Adels Aarbog Finn Holbek public & private 12.1 DA,EN,DE,CS,ES - etc. Danish
Our Family Histories Bryan S. Larson Public - T8 customized see here see here EN
The Duttons of New England Darrin65 Public / Private 14.0.0.6b 14.0.1 EN
Joseph Oran Holtz Genealogy Pages Jim Holt Private See Here See Here EN