Admin Places Geocode
Admin Places Geocode | |||
---|---|---|---|
Summary | Among other things, establishes the number of desired decimal digits in geocoordinates and rounds all geocoordinates calculated from maps. | ||
Validation | |||
Mod Updated | 21 Dec 2020 | ||
Download link | v13.0.0.6
v12.0.0.4
| ||
Download stats | |||
Author(s) | Robin Richmond | ||
Homepage | Robin Richmond's Genealogy Database | ||
Mod Support | My Mod Support form or TNG Community Forums | ||
Contact Developer | My Mod Support form | ||
Latest Mod | v13.0.0.6 | ||
Min TNG V | 10.1 | ||
Max TNG V | 13.0.2 | ||
Files modified | admin_geocodeform.php, admin_geocode.php, admin_editplace.php, googlemaplib2.php, places_help.php, admin_genconfig.php, admin_updateconfig.php | ||
Related Mods | |||
Notes |
Purpose of the Mod
Defines an improved workflow for and limits on the batch geocoding process at Admin>>Places>>Geocode
- Defines a TNG system parameter that establishes the number of desired decimal digits in geocoodinates (latitude and longitude),
- Rounds all geocoodinates that originate in maps (in all TNG programs that do so),
- In the Admin>>Places>>Geocode 'batch' Geocoding program:
- In Admin>>Places>>Edit, geocoordinates are rounded automatically as they are read from the database (though users can enter and save values with more digits,
- Geocoding results are displayed right on the Geocode form, and
- New filters can ignore certain problematic placename components.
In the distributed TNG code, admin_geocodeform.php displays the kickoff form, which invokes admin_geocode.php to do the geocoding. After admin_geocode.php displays the results, it displays a link back to the kickoff form in admin_geocodeform.php. This mod moves the PHP code that does geocoding into admin_geocodeform.php so that the results can be displayed on the same web page as another kickoff form. With this change, admin_geocode.php is no longer used at all.
Mod Options
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. [TNGv12 considerations]
- Most of my TNGv12 mods use classic Mod Manager Parameters rather than Mod Settings Blocks (if they have options at all). Those mods require no special installation considerations.
- A few of my TNGv12 mods use Mod Settings Blocks, but the TNGv12 Mod Settings Blocks code is installed with the mod, not as a separate mod. And, in TNGv12, the Admin>>Setup>>General&nsbp;Settings subform for Mod Settings Blocks is titled "Robin's Mods". See details in the Installation section below.
The only mod option is the number of decimal digits that will be saved by various program.
This mod uses its option to affect how geocoordinates are read from Google maps or OpenStretMap, and to affect how geocoordinates are read by the Places Edit page. However, the option is not applied when the Places Edit page saves the geoordinates. Thus, if you type more decimal digits than are specified by the option into the latitude and longitude fields, the longer value will be saved to the database.
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. The Mod Settings Blocks is a prerequisite for this mod; it must be installed before this mod can be installed.
- The optional mod Inner Mod Menus displays an "Inner Mod Menu" in the TNG "inner menu" (just below the tab menu). The Inner Mod Menu that is defined by this mod is visible only if Inner Mod Menus mod is installed. Inner Mod Menus are visible only to TNG administrators; never to end-users. I highly recommend that you install the Inner Mod Menus mod because Inner Mod Menus provide links to handy information - particularly to the mod settings blocks for this mod's options.
- This mod gathers data that can be used by the optional mod Show Mod Names, but there is no dependency on Show Mod Names
- Admin Cemetery Edit modifies the Admin>>Cemeteries>>Edit form to use this mod's option (number of decimal digits to which the cemetery geocoordinates will be rounded) as it reads the geocoordinates from the database or writes the geocoordinates to the database.
Installation
In TNGv13, 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.
[TNGv12 considerations]
In TNGv12 only, there is a second mod subfolder, which is shared by several mods. The folder RR-shared_mod_includes_v12.0.0.4 contains Include files that help to manage mod options in many of my mods:
- rrshared_modsettingsblocks4.php - Mod Settings Blocks
- img/rrshared_wikilogo.gif - An icon that links to a mod's TNG Wiki page from a Mod Settings Block
Each mod that contains the shared folder may install some or all of its shared files, depending on whether those files already exist. Once a file from the shared folder has been installed (by any mod), that file will not be overwritten or removed by the subsequent installation or un-installation of any mod (including this one), nor will its presence or absence generate any Mod Manager errors.
If you unzip mod distribution files directly into your mods folder, then the presence of the shared subfolder and the installation of its files should be invisible to you. But if you generally copy mod subfolders to your mods folder after you have unzipped the distribution file, then you need to make sure to copy the folder RR-shared_mod_includes_v12.0.0.4 (well, unless you are confident that it is already in your mods folder because it was part of another mod).
[Show Installation Details]
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
- Remove and delete previous version of this mod.
- Backup the files updated by this mod. They are listed in the panel at the upper right.
- Download the .zip file, Extract its .cfg file to the mods folder.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.
Problems?
- Try using the Mod Manager Remove capability
- Contact me through My Mod Support form.
Visualizations
AFTER: New text in the Places help file
|
Revision History
Mod Version | TNG Version | Date | Note |
---|---|---|---|
13.0.0.6 | 13.0 - 13.0.2 | 21 Dec 2020 | Upgraded to TNGv13
|
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 Richmond's Genealogy Database | Robin Richmond | Mod developer | 13.0.0.6 | 13.0.2 | 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 | 13.0.0.6 | 13.0.2 | EN |
Joseph Oran Holtz Genealogy Pages | Jim Holt | Private | See Here | See Here | EN |