Page 1 of 2
Place Exceptions plugin error
Posted: 15 Nov 2022 21:25
by johnhanson
I was talking to the Derek Heritage group this evening and tried to show the Place Exceptions plugin
It worked fine on small projects so I tried on the Halstead study database which as 25,000 place names and it errored with the following message

- PLugin-error.jpg (24.53 KiB) Viewed 1948 times
Re: Place Exceptions plugin error
Posted: 15 Nov 2022 22:28
by tatewise
Sorry John, it is caused by a Place name that contains an unmatched opening parenthesis.
i.e. East ( London, England
The attached prototype plugin version should work around that issue.
Re: Place Exceptions plugin error
Posted: 15 Nov 2022 23:02
by johnhanson
Mike
Thanks that fixed the problem
However, all the entries with a "(" have a closing one ")"
But I did notice this one
, , , at sea (Sulawesa Tengah, Indonesia)
and wondered if the "," in the middle would throw it out?
Re: Place Exceptions plugin error
Posted: 16 Nov 2022 11:56
by tatewise
Yes, that is the problem entry because the Place name is primarily split on the comma separators.
So it treats at sea (Sulawesa Tengah and Indonesia) as two separate place parts.
I wonder if a 'better' solution is for the plugin to ignore commas enclosed by any form of bracket pairs.
However, I think not, as FH does NOT ignore such commas, so the plugin should mimic FH just as it does now.
Re: Place Exceptions plugin error
Posted: 16 Nov 2022 15:53
by johnhanson
Mike
Thanks for the explanation.
I have changed it to at sea (Sulawesa Tengah; Indonesia)
Something I picked on in a comment of Simon's somewhere which means it fits a single part in the place name
Re: Place Exceptions plugin error
Posted: 06 Jan 2023 20:35
by neil40
Hi Mike
I have run 1.1 and the amended 1.1.1 version in this thread, but both give this error:

- Plugin error.jpg (16.35 KiB) Viewed 1386 times
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 11:18
by tatewise
Sorry about that Neil.
It is in the section looking at Places with similar names to find Lat/Longitude outliers, i.e. potential faulty plots.
There must be some unusual boundary condition that the plugin does not cater for.
I have added a diagnostic report to the attached Place Exceptions plugin Version 1.1.2 Date 7 Jan 2023.
Please run this version and post the report so I can analyse the details.
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 17:22
by neil40
This is what resulted in the output Mike

- Output.jpg (22.68 KiB) Viewed 1321 times
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 18:12
by tatewise
Thanks Neil.
The -nan(ind) indicates the Lat/Longitude calculations to find outliers are malfunctioning for some reason.
Could you please supply the Lat/Longitude values for those three Place records in Enville Street, Stourbridge.
Then I can recreate and debug the calculations then hopefully fix the error.
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 19:59
by neil40
Hi Mike,
Here they are:
Enville Street, Stourbridge 52°26'56.28"N, 2°10'9.23"W
41, Enville Street, Stourbridge 52°26'56.28"N, 2°10'9.23"W
112, Enville Street, Stourbridge 52°26'56.28"N, 2°10'9.23"W
...which all seem to be the same.
From memory, these would be from a Gedcom sent to me some time ago for my wife's ancestors (I don't know from what program), and seem to be split across Parts 1 & 2 of the Place differently

- Place Example.jpg (28.52 KiB) Viewed 1290 times
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 20:09
by tatewise
With those details, I get exactly the same error symptoms. So now to analyse why they cause a problem.
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 20:24
by neil40
Thanks Mike,
If I correct those 3 places to be consistent with other 'Places' and re-run the plugin, I then get a whole bunch more erroring.
Interestingly, all in Bromsgrove as before, so again, all from the data sent to me for my wife's paternal grandmothers line
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 21:08
by tatewise
What exactly do you correct to be consistent?
My analysis so far suggests the problem is where 3 or more similar Place names have exactly the same Lat/Longitude.
i.e. There is 0 distance between all the plots.
The distance between plots calculation involves complex maths to determine the great circle segment between them and 0 seems to upset things.
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 21:16
by neil40
tatewise wrote: ↑07 Jan 2023 21:08
What exactly do you correct to be consistent?
My analysis so far suggests the problem is where 3 or more similar Place names have exactly the same Lat/Longitude.
i.e. There is 0 distance between all the plots.
The distance between plots calculation involves complex maths to determine the great circle segment between them and 0 seems to upset things.
I changed the entry so that Part 1 is the street number/address, Part 2 the town/city, Part 3 the county as per other entries, which it the way I try to enter places.
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 21:41
by tatewise
Please post the three entries Place names and Lat/Longitude as you did before.
I don't understand how the changes you describe would fix the problem unless they were auto-geocoded with new Lat/Long.
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 21:47
by neil40
The entries now read like this, but the Lat/Lon are the same
Enville Street, Stourbridge, Worcestershire, England 52°26'56.28"N, 2°10'9.23"W
41 Enville Street, Stourbridge, Worcestershire, England 52°26'56.28"N, 2°10'9.23"W
112 Enville Street, Stourbridge, Worcestershire, England 52°26'56.28"N, 2°10'9.23"W
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 22:01
by tatewise
I guess there are other Place records also in Worcestershire, England or in Stourbridge, Worcestershire, England.
i.e. The condition that 3 or more similar Place names have exactly the same Lat/Longitude no longer applies because those problem 3 are now in a larger group that have different Lat/Longitude values.
It would be helpful to me if you could keep your 'problem' database in its original state so that when I fix the plugin it can be tested against your database. Otherwise, how will I know if your original problem really is fixed?
Re: Place Exceptions plugin error
Posted: 07 Jan 2023 22:03
by neil40
OK, will do Mike.
As I mentioned before, I still get errors, so I will not change those entries.
Interesting aside, I just checked the Lat/Lon of the 3 entries we began with, and it is just over a mile from Enville Street in Stourbridge.
Re: Place Exceptions plugin error
Posted: 08 Jan 2023 14:56
by tatewise
neil40 wrote: ↑07 Jan 2023 22:03
Interesting aside, I just checked the Lat/Lon of the 3 entries we began with, and it is just over a mile from Enville Street in Stourbridge.
I'm not sure if you think that is good or bad.
The problem I've found is in the formula for calculating distance & bearing of each plot from the centre of multiple plots.
When the plots and the centre are all in the same location then the formula gives irrational results due to the limited ability of computers to hold numbers accurately. Anyway, I have adjusted the formula to cope with such problems.
So try the attached
Place Exceptions plugin Version 1.1.3 Date 8 Jan 2023 and let me know your results.
Re: Place Exceptions plugin error
Posted: 08 Jan 2023 20:03
by neil40
tatewise wrote: ↑08 Jan 2023 14:56
neil40 wrote: ↑07 Jan 2023 22:03
Interesting aside, I just checked the Lat/Lon of the 3 entries we began with, and it is just over a mile from Enville Street in Stourbridge.
I'm not sure if you think that is good or bad.
Bad! I was quite surprised it was this far from the co-ordinates.
tatewise wrote:
The problem I've found is in the formula for calculating distance & bearing of each plot from the centre of multiple plots.
When the plots and the centre are all in the same location then the formula gives irrational results due to the limited ability of computers to hold numbers accurately. Anyway, I have adjusted the formula to cope with such problems.
So try the attached
Place Exceptions plugin Version 1.1.3 Date 8 Jan 2023 and let me know your results.
Happy to report that it has run perfectly with this amendment. Many thanks.
Re: Place Exceptions plugin error
Posted: 08 Jan 2023 20:13
by tatewise
neil40 wrote: ↑08 Jan 2023 20:03
tatewise wrote: ↑08 Jan 2023 14:56
neil40 wrote: ↑07 Jan 2023 22:03
Interesting aside, I just checked the Lat/Lon of the 3 entries we began with, and it is just over a mile from Enville Street in Stourbridge.
I'm not sure if you think that is good or bad.
Bad! I was quite surprised it was this far from the co-ordinates.
I recall you said the co-ordinates were supplied in a GEDCOM sent to you.
So whatever or whoever set those values got them wrong.
If you auto-plot those Place records in FH then they usually plot exactly on the street

Although the house number may confuse things. I found that they either plot on the street away from where the number exists, or sometimes they plot somewhere else entirely.
However, such success cannot be guaranteed down to street level (or even village/town level) for auto-plotting places everywhere in the world.
Re: Place Exceptions plugin error
Posted: 13 Jan 2023 13:17
by tatewise
Place Exceptions plugin Version 1.2 Date 13 Jan 2023 is now in the Plugin Store.
Re: Place Exceptions plugin error
Posted: 25 Mar 2023 20:15
by jelv
Mike, had you considered adding capitalisation validation?
Something else I'm helping with came a cropper because of a place like East ham, Essex, England.
Re: Place Exceptions plugin error
Posted: 25 Mar 2023 20:53
by tatewise
Sorry John, I can't read your mind! You'll have to explain more preferably with examples as my crystal ball is on the blink!
Re: Place Exceptions plugin error
Posted: 25 Mar 2023 20:55
by jelv
East ham should be East Ham.
FH thinks they are two different places!