Select to view content in your preferred language

Is it possible to remove duplicate address from the search results in Geocoder?

851
4
08-28-2013 06:26 AM
by Anonymous User
Not applicable
Original User: dboi517

Hello,

I am looking for a way to programatically remove duplicate addresses from the search results in the Geocoder used in the Header Controller widget.  The problem is our street centerlines layer has segments throughout the city that have overlapping ranges, which results in multiple duplicate addresses showing up in the search results.  It would be a massive project to correct the entire centerlines layer--and if any of the results are chosen, it zooms to the area accurately enough so that this hasn't been an issue in the past.  However, it is slightly confusing when many of the same addresses appear.  I have also considered removing the search results option, but there are many areas around the city that actually have the same address, just in a different neighborhood--so it is necessary to have the result options appear so a user may select the address in the correct neighborhood.   See screenshots below for a better understanding of the issue.

Example of what needs to be changed:
[ATTACH=CONFIG]27049[/ATTACH]

Example of what needs to stay:
[ATTACH=CONFIG]27050[/ATTACH]


In summary, I'd like to figure out a way to programatically remove addresses from the search results that are exact duplicates, inclusive of neighborhood (because each result will zoom to the same general area) and I'd like to not remove addresses from the results that are the same address with a different neighborhood (because they are unique locations).

Any ideas or tips would be an immense help! Thank you!!

David
0 Kudos
4 Replies
DavidBoiano
Deactivated User
I am still hoping to figure this out. In the GeocoderComponent.mxml file, there is a function used to validate map points. Would anyone know or think it's even possible to alter this function to include a way to check for duplicate addresses? This is the only function I found that seems to the be a remotely correct starting point.

            private function hasValidMapPoints(points:Array):Boolean
            {
                var isValid:Boolean;
                if (points && points.length > 0)
                {
                    isValid = true;
                    for each (var point:MapPoint in points)
                    {
                        if (!isValidMapPoint(point))
                        {
                            isValid = false;
                            break;
                        }
                    }
                }
                return isValid;
            }


The above code comes from line 695 in the GeocoderComponent.mxml file.
0 Kudos
by Anonymous User
Not applicable
Original User: raffialexanian

Hi David;

Great topic, were you able to figure this out? Is it possible to do this when publishing the geocoder service by checking for duplciate object ids that are from the same geocoder layer?

Regards;

Raffi

I am still hoping to figure this out. In the GeocoderComponent.mxml file, there is a function used to validate map points. Would anyone know or think it's even possible to alter this function to include a way to check for duplicate addresses? This is the only function I found that seems to the be a remotely correct starting point.

            private function hasValidMapPoints(points:Array):Boolean
            {
                var isValid:Boolean;
                if (points && points.length > 0)
                {
                    isValid = true;
                    for each (var point:MapPoint in points)
                    {
                        if (!isValidMapPoint(point))
                        {
                            isValid = false;
                            break;
                        }
                    }
                }
                return isValid;
            }


The above code comes from line 695 in the GeocoderComponent.mxml file.
0 Kudos
DavidBoiano
Deactivated User
Hi Raffi,

Unfortunately, I was never able to figure this out! I ended up taking the route of reworking my geocoder and creating different ones with different settings until I got the results that most aligned with what I was looking for.  Due to our street centerline data inaccuracies, there are some overlaps in street ranges and in those cases, the duplicates still remained.

Good luck!


David
0 Kudos
by Anonymous User
Not applicable
Original User: raffialexanian

Hi David;

Thanks a lot for the reply. I will give what you a try, it may work for us.

Regards;
Raffi


Hi Raffi,

Unfortunately, I was never able to figure this out! I ended up taking the route of reworking my geocoder and creating different ones with different settings until I got the results that most aligned with what I was looking for.  Due to our street centerline data inaccuracies, there are some overlaps in street ranges and in those cases, the duplicates still remained.

Good luck!


David
0 Kudos