nearby-POI: What to do with several POI arranged on a circle?

Hi all, while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24] With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle. I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now. Gerd

Hi The problem is in the point grouping algo, rather than anything to do with the merge-at-mid-point option. Although an interesting problem to solve, it seems to be getting excessive. The simple logic in the last versions seemed to solve most users's problems and make them happy. Ticker On Thu, 2020-05-07 at 07:42 +0000, Gerd Petermann wrote:
Hi all,
while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24]
With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle.
I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Ticker, I should have used amenity=bench in the example, this is a bit more realistic, but the default style doesn't generate a POI for that. I've found a rather simple iterative algo to fix the problem, but what I really wanted to point out is that the result can look really wrong. Benches are often arranged around something, e.g. a small lake/pond. I think nobody wants a map that shows a bench in the middle of a lake. OTHO, bus stops typically come in pairs, but maybe 50m apart. It seems reasonable to merge them in the middle. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 7. Mai 2020 10:21 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi The problem is in the point grouping algo, rather than anything to do with the merge-at-mid-point option. Although an interesting problem to solve, it seems to be getting excessive. The simple logic in the last versions seemed to solve most users's problems and make them happy. Ticker On Thu, 2020-05-07 at 07:42 +0000, Gerd Petermann wrote:
Hi all,
while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24]
With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle.
I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd The bench in lake problem is avoided by the user not using the merge-at -mid-point option. Possibly making the delete-poi option keep the most central one and delete the rest. Ticker On Thu, 2020-05-07 at 09:12 +0000, Gerd Petermann wrote:
Hi Ticker,
I should have used amenity=bench in the example, this is a bit more realistic, but the default style doesn't generate a POI for that.
I've found a rather simple iterative algo to fix the problem, but what I really wanted to point out is that the result can look really wrong. Benches are often arranged around something, e.g. a small lake/pond. I think nobody wants a map that shows a bench in the middle of a lake. OTHO, bus stops typically come in pairs, but maybe 50m apart. It seems reasonable to merge them in the middle.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 7. Mai 2020 10:21 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle?
Hi
The problem is in the point grouping algo, rather than anything to do with the merge-at-mid-point option.
Although an interesting problem to solve, it seems to be getting excessive. The simple logic in the last versions seemed to solve most users's problems and make them happy.
Ticker
On Thu, 2020-05-07 at 07:42 +0000, Gerd Petermann wrote:
Hi all,
while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24]
With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle.
I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd. It seems to be two scenarios. One, where nearby-POIs are probably or certainly errors in the OSM data, and it should be corrected there. And another where the data is correct, but it is convenient for us to render them in the Garmin as a single POI, although it is not strictly necessary. Maybe it's useful to think about some kind of integration back to OSM, generating notes that could be uploaded to OSM, or work together with the developers of OSM QA tools improving their checks. I think that using developer time to mask the first scenario is not the best use, but those are not my needs nor my time. Regards, M. ----- Mensaje original ----- De: "Gerd Petermann" <gpetermann_muenchen@hotmail.com> Para: "mkgmap-dev" <mkgmap-dev@lists.mkgmap.org.uk> Enviados: Jueves, 7 de Mayo 2020 6:12:59 Asunto: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Ticker, I should have used amenity=bench in the example, this is a bit more realistic, but the default style doesn't generate a POI for that. I've found a rather simple iterative algo to fix the problem, but what I really wanted to point out is that the result can look really wrong. Benches are often arranged around something, e.g. a small lake/pond. I think nobody wants a map that shows a bench in the middle of a lake. OTHO, bus stops typically come in pairs, but maybe 50m apart. It seems reasonable to merge them in the middle. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 7. Mai 2020 10:21 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi The problem is in the point grouping algo, rather than anything to do with the merge-at-mid-point option. Although an interesting problem to solve, it seems to be getting excessive. The simple logic in the last versions seemed to solve most users's problems and make them happy. Ticker On Thu, 2020-05-07 at 07:42 +0000, Gerd Petermann wrote:
Hi all,
while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24]
With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle.
I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev --------------------------------------------------------------------------------------------------------------------------------------- Con el nuevo beneficio fiscal, tu facturación electrónica puede ser sin costo. Informate si aplicás aquí. mvdfactura.uy ---------------------------------------------------------------------------------------------------------------------------------------

Hi Muralito, the log messages produced by mkgmap are often pointing to possibly wrong OSM data, but the user always must consider the used style and mkgmap options. So, if one uses the messages to load the corresponding area into an OSM editor to verify the data, fine. I would not use it to publish a list of possibly wrong OSM data, as many of them simply show a problem in the style or in mkgmap or a limitation of the IMG format. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von muralito@montevideo.com.uy <muralito@montevideo.com.uy> Gesendet: Donnerstag, 7. Mai 2020 15:42 An: mkgmap-dev Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Gerd. It seems to be two scenarios. One, where nearby-POIs are probably or certainly errors in the OSM data, and it should be corrected there. And another where the data is correct, but it is convenient for us to render them in the Garmin as a single POI, although it is not strictly necessary. Maybe it's useful to think about some kind of integration back to OSM, generating notes that could be uploaded to OSM, or work together with the developers of OSM QA tools improving their checks. I think that using developer time to mask the first scenario is not the best use, but those are not my needs nor my time. Regards, M. ----- Mensaje original ----- De: "Gerd Petermann" <gpetermann_muenchen@hotmail.com> Para: "mkgmap-dev" <mkgmap-dev@lists.mkgmap.org.uk> Enviados: Jueves, 7 de Mayo 2020 6:12:59 Asunto: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Ticker, I should have used amenity=bench in the example, this is a bit more realistic, but the default style doesn't generate a POI for that. I've found a rather simple iterative algo to fix the problem, but what I really wanted to point out is that the result can look really wrong. Benches are often arranged around something, e.g. a small lake/pond. I think nobody wants a map that shows a bench in the middle of a lake. OTHO, bus stops typically come in pairs, but maybe 50m apart. It seems reasonable to merge them in the middle. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 7. Mai 2020 10:21 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi The problem is in the point grouping algo, rather than anything to do with the merge-at-mid-point option. Although an interesting problem to solve, it seems to be getting excessive. The simple logic in the last versions seemed to solve most users's problems and make them happy. Ticker On Thu, 2020-05-07 at 07:42 +0000, Gerd Petermann wrote:
Hi all,
while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24]
With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle.
I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev --------------------------------------------------------------------------------------------------------------------------------------- Con el nuevo beneficio fiscal, tu facturación electrónica puede ser sin costo. Informate si aplicás aquí. mvdfactura.uy --------------------------------------------------------------------------------------------------------------------------------------- _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Perhaps averaging the latitude and longitude coordinates of all the points separately would work. That is not quite the same as meet in the middle. If the points are evenly spaced around the edge of a circle, even though the latitude and longitude scalings (except at the equator) are not the same. What I believe you are trying to do is minimize the total distance from the selected point to the collection of points. Randolph J. Herber On 5/7/2020 2:42 AM, Gerd Petermann wrote:
Hi all,
while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24]
With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle.
I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Randolph, I try to find out what the result should be when more than two POI are involved. They may be arranged in a straight line or in a circle or whatever random order. At the moment I tend to follow Tickers suggestion and remove the option to keep it simple. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Randolph J. Herber <army.bronze.star@gmail.com> Gesendet: Donnerstag, 7. Mai 2020 15:21 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Perhaps averaging the latitude and longitude coordinates of all the points separately would work. That is not quite the same as meet in the middle. If the points are evenly spaced around the edge of a circle, even though the latitude and longitude scalings (except at the equator) are not the same. What I believe you are trying to do is minimize the total distance from the selected point to the collection of points. Randolph J. Herber On 5/7/2020 2:42 AM, Gerd Petermann wrote: Hi all, while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24] With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle. I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now. Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, finally managed to try your updated code and it looks like a great improvement over my starting point, which whilst it did work in some places, in others it seemed to have no effect. The barrage of extra deletions also pointed me to a problem in my points file which was creating a POI to display the name of power generators without any icon. Originally this just showed big generators, but as there are now lots of solar panels on people's houses mapped it has been adding thousands of POIS with no icon and no name, which wasn't a great deal of use! Regarding the multiple POI case, it really depends on what type of POI it is. The logs pointed me to a tourist destination where every holiday home had been tagged as a hotel - for that one I would ideally want just a single point left, and preferably the severity of the message increased, so that it is easy to pick out and go and fix at source. For ones like a line of park benches, I'd be perfectly happy with them only being considered in pairs (just thinning the POIs so that you can still see there are plenty of seats). Regards, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 May 2020 15:04 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Randolph, I try to find out what the result should be when more than two POI are involved. They may be arranged in a straight line or in a circle or whatever random order. At the moment I tend to follow Tickers suggestion and remove the option to keep it simple. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Randolph J. Herber <army.bronze.star@gmail.com> Gesendet: Donnerstag, 7. Mai 2020 15:21 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Perhaps averaging the latitude and longitude coordinates of all the points separately would work. That is not quite the same as meet in the middle. If the points are evenly spaced around the edge of a circle, even though the latitude and longitude scalings (except at the equator) are not the same. What I believe you are trying to do is minimize the total distance from the selected point to the collection of points. Randolph J. Herber On 5/7/2020 2:42 AM, Gerd Petermann wrote: Hi all, while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24] With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle. I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now. Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I had a few more thoughts on the multiple POI case. There seem to be three scenarios that possibly need handling in different ways: 1. a cluster of POIS that are incorrectly tagged (e.g. every building in a college is tagged as amenity=college). In this case if there are more than 2 POIS I would ideally like a higher severity level of message to be used so that I can easily identify the problem and fix it in OSM. 2. a cluster of POIS that are correctly tagged, but I don't need to see every one (e.g. bus stops within a bus station). In this case I would like to reduce the bus stops to a single one (or even better if there is a bus station tagged, remove all the bus stops). 3. a cluster of tags where I am happy to see several of them, but don't necessarily need them all (e.g. with park benches it is useful to see there are several, but it's not necessary to see every individual seat). Regarding the position algorithm, I suggest the merge-at-mid-point option only operates when there are two POIS. With multiple POIS just choose the nearest POI to the centre and delete the others for both delete-poi and merge-at-mid-point. That would solve any problems of it ending up in the middle of a lake when used on objects surrounding the lake. Or we could just drop merge-at-mid-point if it is too tricky to come up with something that doesn't have unwanted side effects. Regards, Mike -----Original Message----- From: Mike Baggaley [mailto:mike@tvage.co.uk] Sent: 07 May 2020 16:10 To: 'mkgmap-dev@lists.mkgmap.org.uk' <mkgmap-dev@lists.mkgmap.org.uk> Subject: RE: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Gerd, finally managed to try your updated code and it looks like a great improvement over my starting point, which whilst it did work in some places, in others it seemed to have no effect. The barrage of extra deletions also pointed me to a problem in my points file which was creating a POI to display the name of power generators without any icon. Originally this just showed big generators, but as there are now lots of solar panels on people's houses mapped it has been adding thousands of POIS with no icon and no name, which wasn't a great deal of use! Regarding the multiple POI case, it really depends on what type of POI it is. The logs pointed me to a tourist destination where every holiday home had been tagged as a hotel - for that one I would ideally want just a single point left, and preferably the severity of the message increased, so that it is easy to pick out and go and fix at source. For ones like a line of park benches, I'd be perfectly happy with them only being considered in pairs (just thinning the POIs so that you can still see there are plenty of seats). Regards, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 May 2020 15:04 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Randolph, I try to find out what the result should be when more than two POI are involved. They may be arranged in a straight line or in a circle or whatever random order. At the moment I tend to follow Tickers suggestion and remove the option to keep it simple. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Randolph J. Herber <army.bronze.star@gmail.com> Gesendet: Donnerstag, 7. Mai 2020 15:21 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Perhaps averaging the latitude and longitude coordinates of all the points separately would work. That is not quite the same as meet in the middle. If the points are evenly spaced around the edge of a circle, even though the latitude and longitude scalings (except at the equator) are not the same. What I believe you are trying to do is minimize the total distance from the selected point to the collection of points. Randolph J. Herber On 5/7/2020 2:42 AM, Gerd Petermann wrote: Hi all, while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24] With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle. I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now. Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, reg. 1 + 2: I thought the "POI within area" can be ignored here, we have the is_in style function to catch that? reg. 3: merge-at-mid-point is likely to cause trouble. Let's remove it for now, seems nobody really needs it. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Donnerstag, 7. Mai 2020 20:58 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? I had a few more thoughts on the multiple POI case. There seem to be three scenarios that possibly need handling in different ways: 1. a cluster of POIS that are incorrectly tagged (e.g. every building in a college is tagged as amenity=college). In this case if there are more than 2 POIS I would ideally like a higher severity level of message to be used so that I can easily identify the problem and fix it in OSM. 2. a cluster of POIS that are correctly tagged, but I don't need to see every one (e.g. bus stops within a bus station). In this case I would like to reduce the bus stops to a single one (or even better if there is a bus station tagged, remove all the bus stops). 3. a cluster of tags where I am happy to see several of them, but don't necessarily need them all (e.g. with park benches it is useful to see there are several, but it's not necessary to see every individual seat). Regarding the position algorithm, I suggest the merge-at-mid-point option only operates when there are two POIS. With multiple POIS just choose the nearest POI to the centre and delete the others for both delete-poi and merge-at-mid-point. That would solve any problems of it ending up in the middle of a lake when used on objects surrounding the lake. Or we could just drop merge-at-mid-point if it is too tricky to come up with something that doesn't have unwanted side effects. Regards, Mike -----Original Message----- From: Mike Baggaley [mailto:mike@tvage.co.uk] Sent: 07 May 2020 16:10 To: 'mkgmap-dev@lists.mkgmap.org.uk' <mkgmap-dev@lists.mkgmap.org.uk> Subject: RE: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Gerd, finally managed to try your updated code and it looks like a great improvement over my starting point, which whilst it did work in some places, in others it seemed to have no effect. The barrage of extra deletions also pointed me to a problem in my points file which was creating a POI to display the name of power generators without any icon. Originally this just showed big generators, but as there are now lots of solar panels on people's houses mapped it has been adding thousands of POIS with no icon and no name, which wasn't a great deal of use! Regarding the multiple POI case, it really depends on what type of POI it is. The logs pointed me to a tourist destination where every holiday home had been tagged as a hotel - for that one I would ideally want just a single point left, and preferably the severity of the message increased, so that it is easy to pick out and go and fix at source. For ones like a line of park benches, I'd be perfectly happy with them only being considered in pairs (just thinning the POIs so that you can still see there are plenty of seats). Regards, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 May 2020 15:04 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Hi Randolph, I try to find out what the result should be when more than two POI are involved. They may be arranged in a straight line or in a circle or whatever random order. At the moment I tend to follow Tickers suggestion and remove the option to keep it simple. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Randolph J. Herber <army.bronze.star@gmail.com> Gesendet: Donnerstag, 7. Mai 2020 15:21 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] nearby-POI: What to do with several POI arranged on a circle? Perhaps averaging the latitude and longitude coordinates of all the points separately would work. That is not quite the same as meet in the middle. If the points are evenly spaced around the edge of a circle, even though the latitude and longitude scalings (except at the equator) are not the same. What I believe you are trying to do is minimize the total distance from the selected point to the collection of points. Randolph J. Herber On 5/7/2020 2:42 AM, Gerd Petermann wrote: Hi all, while doing further tests I've found this edge case (see attached file) Draw a circle with a diameter of ~56m and tag all nodes amenity=bank. The default style has amenity=bank [0x2f06 resolution 24] With --nearby-poi-rules=0x2f06:30:merge-at-mid-point one might expect a single POI in the middle of the circle, but the result is different: Since there is no POI near the center of the circle the current algo finds 4 groups, all close to the edge of the circle. I think for merge-at-mid-point I need a different algo. I'm looking at https://en.wikipedia.org/wiki/Cluster_analysis now. Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (6)
-
Gerd Petermann
-
Gerd Petermann
-
Mike Baggaley
-
muralito@montevideo.com.uy
-
Randolph J. Herber
-
Ticker Berkin