Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

Verifying an address that is missing city info

This is a discussion on Verifying an address that is missing city info within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am trying to verify a number of addresses, all of which lack the city information. Is there any way ...

  1. #1
    nh_capricorn is offline Junior Member White Belt
    Join Date
    May 2004
    Posts
    4

    Verifying an address that is missing city info

    I am trying to verify a number of addresses, all of which lack the city
    information. Is there any way to filter the results returned from a find
    address, so that the only address objects returned are those that are in one of the four cities I am interested in? (All of the addresses are in the same state.)

    I tried working with the ThresholdScore to resolve this issue, but it didn't
    give me exactly what I want.

    Can I use a FilterExpression to do this, if so, how? What about trying to match EntityType? (And how would I do this?)

    Thanks!

    nhc

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hi, if you have Postal or Zip codes, this method I wrote once might help you. Sorry about the indenting...it looks much better in Vis Studio.

    Private Sub DeObfuscate(ByVal fr As MapPoint.FindResults, ByVal Results As GeoCodeResults, ByVal Map As Map, Optional ByVal MaxDistanceFromPcode As Double = 1)

    'this function attempt to disobfuscate a "no good results" by testing all
    'returned locations and comparing them to the location of a postal code. If
    'an address level location is close to the postal code, it is deemed to be the valid one.

    Dim aLoc As MapPoint.Location
    Dim i As Long

    'look for a postal code match
    For i = fr.Count To 1 Step -1

    aLoc = CType(fr.Item(i), Location)

    If aLoc.Type = GeoShowDataBy.geoShowByPostal1 Then
    Results.PcodeLoc = aLoc
    Exit For
    End If

    Next

    'if a postal code location was found, then scan the list again
    'to see if there is a trust-worthy location
    If Not Results.PcodeLoc Is Nothing Then
    i = 0
    For Each aLoc In fr
    'scan each plausible location but give up after maximim of 5
    'to avoid wasting time.
    i = i + 1
    If i > 5 Then
    Exit For
    End If

    If aLoc.Type = GeoShowDataBy.geoShowByStreetAddress Or aLoc.Type = GeoShowDataBy.geoShowByDefault Then

    If Map.Distance(aLoc, Results.PcodeLoc) < MaxDistanceFromPcode Then
    Results.Loc = aLoc
    Exit For
    End If

    End If
    Next
    End If

    End Sub

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Am i Missing something in datamaps
    By drjindal in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-20-2005, 02:53 PM
  2. Find city/address from GPS position
    By GESwin in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-27-2004, 04:56 AM
  3. City, State and Country info for a loc found using lat/lng
    By lavend in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-28-2004, 03:17 PM
  4. city and road info missing
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-26-2003, 01:47 PM
  5. I know of at least 2 missing roads or bridges in m....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-03-2002, 11:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96