I've just moved these posts and re-read them I've thus realised that you might not be getting what I think is a fundamental point. The Google Geocoding process is not deterministic thus you cannot just replace one bit of text with another and hope that will get the right lat/long the next time round. That is very messy solution and I'd actively avoid coding something like that. You want something that users can actively rely on adding a Google lookup into the equation then introduces randomness that would destroy the objective of having a reliable end result.
What we need is a table that has
Country, County, town/parish, lat, long, viewport
ie: a fixed table so that if a user has entered a county name in its Victorian format the it will be in the list and will map to lat/long coordinates. So the table Tim suggested would be :
England, Lancashire,, y1, x1, vp1 (this first one is just the county name no town or parish)
England, Lancashire, Barrow-In-Furness, y2, x2, vp2
England, Lancashire, Prestcot, y3, x3, vp3
England, Lancashire, Ulverston, y4, x4, vp4
England, Lancashire, Speke, y5, x5, vp5
England, Lancashire, West Derby, y6, x6, vp6
Now why is this better? Well think about it. It is very simple to generate a table that lists all the parishes in England, Wales, Ireland, Scotland with their old county name in the above format. Excluding the lat, long, viewport stuff. Various websites have that details.
What do we do with such a file. Hmm lets think, well we could simply create a very quick GEDCOM from it and load it directly into FTAnalyzer. eg: using Excel it is trivial to create a line of CSV for each parish name and attach a header row eg: for a RESIdence record. paste that into a GEDCOM file that has a dummy header and dummy individual and hey presto you have a GEDCOM file where a dummy individual is resident in every parish in the UK.
Then we would USE THE EXISTING CODE to geocode the locations in a fresh database. That file can then be geocoded using the existing tools, knowing that the database thus created is in exactly the format that FTAnalyzer needs. It can be a collaborative process eg: farm out different counties to different people so each volunteer works on a specific county. The database of old locations thus grows and can be collated into a central repository. This is what I mean by crowdsourcing. Spreading the load of checking the locations amongst lots of volunteers in exactly the same way FreeCEN did with census records.
What we need is a table that has
Country, County, town/parish, lat, long, viewport
ie: a fixed table so that if a user has entered a county name in its Victorian format the it will be in the list and will map to lat/long coordinates. So the table Tim suggested would be :
England, Lancashire,, y1, x1, vp1 (this first one is just the county name no town or parish)
England, Lancashire, Barrow-In-Furness, y2, x2, vp2
England, Lancashire, Prestcot, y3, x3, vp3
England, Lancashire, Ulverston, y4, x4, vp4
England, Lancashire, Speke, y5, x5, vp5
England, Lancashire, West Derby, y6, x6, vp6
Now why is this better? Well think about it. It is very simple to generate a table that lists all the parishes in England, Wales, Ireland, Scotland with their old county name in the above format. Excluding the lat, long, viewport stuff. Various websites have that details.
What do we do with such a file. Hmm lets think, well we could simply create a very quick GEDCOM from it and load it directly into FTAnalyzer. eg: using Excel it is trivial to create a line of CSV for each parish name and attach a header row eg: for a RESIdence record. paste that into a GEDCOM file that has a dummy header and dummy individual and hey presto you have a GEDCOM file where a dummy individual is resident in every parish in the UK.
Then we would USE THE EXISTING CODE to geocode the locations in a fresh database. That file can then be geocoded using the existing tools, knowing that the database thus created is in exactly the format that FTAnalyzer needs. It can be a collaborative process eg: farm out different counties to different people so each volunteer works on a specific county. The database of old locations thus grows and can be collated into a central repository. This is what I mean by crowdsourcing. Spreading the load of checking the locations amongst lots of volunteers in exactly the same way FreeCEN did with census records.