(Not Signed In)

Sign In

.NET Development: Reverse geocoding returns null

Bottom of Page

1 to 5 of 5

  1.  
    • CommentAuthorbleach
    • CommentTimeNov 23rd 2009 edited
     
    Hello,

    Just a quick question about reverse geocoding in GeoBase. Say I'm trying to get an address like so:


    Address address = GeoCoder.ReverseGeoCode(location);


    Under what conditions will the ReverseGeoCode method return null? I checked the docs but they don't get specific enough to say anything about this. I'd imagine it'll return null if location is outside your map bounds, but will it return null if it ran into some sort of internal problem as well?

    The reason I ask is that we're getting null returned for locations that we though were on streets. Here are some examples:

    43.228509,-79.767110
    43.201060,-79.894540

    Right now we're using the default set of maps that come with the GeoBase dev kit.

    Thanks!
    Brandon
    •  
      CommentAuthorSeanS
    • CommentTimeNov 23rd 2009
     
    Do you have Canadian data loaded? Both of these LatLons are in Canada so without that data loaded I would expect NULL from ReverseGeoCode.

    The default GeoBase (an evaluation downloaded from GeoZone) just has USA west coast data.
    • CommentAuthorbleach
    • CommentTimeNov 23rd 2009
     
    Sorry, should have been more specific there.

    We are using Canadian data. Specifically, those coordinates are in Hamilton. When we load them up on a map, we're able to see all the streets of the city as expected.

    When we do reverse geocodes in that general area, most of them are successful and return addresses as expected. It's just that certain coordinates seem to return a null when we'd expect an address.
    •  
      CommentAuthorSeanS
    • CommentTimeNov 24th 2009
     
    What data (full filename) and GeoBase DLLs are you using? I tested with 3.0.7.3 DLLs using this code:

    Address address = GeoCoder.ReverseGeoCode(new LatLon(43.228509,-79.767110));
    Console.WriteLine("ReverseGeoCode addr1=" + address);
    Address address2 = GeoCoder.ReverseGeoCode(new LatLon(43.201060, -79.894540));
    Console.WriteLine("ReverseGeoCode addr2=" + address2);

    and get results like this:

    ReverseGeoCode addr1=786 Queenston Rd [Hwy-8], Hamilton, Hamilton, Ontario, L8G, Canada
    ReverseGeoCode addr2=9 Kennedy Ave, Hamilton, Hamilton, Ontario, L9B, Canada

    ReverseGeoCode addr1=770 Queenston Rd, Hamilton, Hamilton Division, Ontario, L8G, Canada
    ReverseGeoCode addr2=1656 Upper James St, Hamilton, Hamilton Division, Ontario, L9B, Canada

    depending on the data.
    • CommentAuthorbleach
    • CommentTimeNov 27th 2009
     
    Hi Sean,

    Thanks for the response.

    This problem seems to be a little more complex than I'd originally thought. While testing these coordinates, GeoBase does indeed return addresses as expected. The null values appeared while our application was in production elsewhere, even though it's using the same GBFS files as I am.

    I'm still investigating further. I'll get back to you if I find anything relevant.

    Thanks again.

    Brandon

1 to 5 of 5

  1.