none
Get boundry issue for UK postalcode in V8 RRS feed

  • Question

  • Hi,

    We are facing issue with SpatialDataService while getting the boundary for UK postalcode. We used bing map V8. Following AB101AF is one example of postal code for which we tried to get boundry.   

    The US postal code is working fine.  

    Can you please let us know how we get the correct boundary for UK postal code.

    Thanks!


    Balasaheb

    Thursday, July 7, 2016 11:56 AM

Answers

  • In the UK may 6 and 7 digit postal codes represent a single point. For these boundary data is not available. If you instead set the entity type to postcode2, you will find boundaries. I believe in the UK, postcode2 is the lowest level polygon boundary available.

    [Blog] [twitter] [LinkedIn]

    Thursday, July 7, 2016 5:33 PM
  • You only get 3 digit postal code from the GeoDataAPIManager as that is the level of postal code boundary returned. If you want more digits for a postal code use reverse geocoding.

    [Blog] [twitter] [LinkedIn]

    Thursday, March 23, 2017 5:03 PM
  • Reverse geocoding is faster than loading a boundary. That said, there is no point doing this if you already have a full postal code.

    Note that you won't get postal code boundaries in the UK, you will get postal areas which are not full postal codes. Postal code AB101AF is a building. You will likely find boundaries for AB1 or AB


    [Blog] [twitter] [LinkedIn]

    Wednesday, March 29, 2017 4:03 PM
  • Using JavaScript to geocode/reverse geocode large data sets is a bad idea in general. You are limited to the number of concurrent requests that you can make by the browser... and you also generate a ton of billable transactions. If you need to process the data on the fly you have a couple of options.

    • Make several requests in parallel and not recursively.
    • Create a web worker to actually make these calls and run 4 web workers. I've found that each web worker has it's own concurrent limit which makes a big difference.
    • Send your data to a server and have it process the data on the fly.

    All of these will help, but it will still be slow. There is a batch geocoding service which is designed for processing large data sets which is a lot faster than making individual requests once you start getting into the thousands.


    [Blog] [twitter] [LinkedIn]

    Wednesday, April 12, 2017 1:35 AM

All replies

  • In the UK may 6 and 7 digit postal codes represent a single point. For these boundary data is not available. If you instead set the entity type to postcode2, you will find boundaries. I believe in the UK, postcode2 is the lowest level polygon boundary available.

    [Blog] [twitter] [LinkedIn]

    Thursday, July 7, 2016 5:33 PM
  • Hi,

    We have used the location to find the boundry for the postal code. We get the boundry but in EntityName we get only 3 digit postalcode. Is it possible to get whole postal code.

    We are using Microsoft.Maps.SpatialDataService.GeoDataAPIManager.getBoundary to ge the boundry.

    Thanks! 


    Balasaheb

    Thursday, March 23, 2017 4:36 AM
  • You only get 3 digit postal code from the GeoDataAPIManager as that is the level of postal code boundary returned. If you want more digits for a postal code use reverse geocoding.

    [Blog] [twitter] [LinkedIn]

    Thursday, March 23, 2017 5:03 PM
  • Hi,

    Is there any other way to handle above situation without reverse geocode because reverse geocode add more time to process and show result to end user.

    Thanks!

     


    Balasaheb

    Wednesday, March 29, 2017 2:40 PM
  • Reverse geocoding is faster than loading a boundary. That said, there is no point doing this if you already have a full postal code.

    Note that you won't get postal code boundaries in the UK, you will get postal areas which are not full postal codes. Postal code AB101AF is a building. You will likely find boundaries for AB1 or AB


    [Blog] [twitter] [LinkedIn]

    Wednesday, March 29, 2017 4:03 PM
  • Hi Ricky,

    We have tried to get the reverse geocode of around 2000 records and it took around 5:15 mins. Is it take this much of time or we can reduce the time.

    We used following code

     

    url = "https://dev.virtualearth.net/REST/v1/Locations/";

                //Send Geocoding request
                geocodeRequest = url + latitude + "," + longitude + "?key=" + _credentials;

                $.ajax({
                    url: geocodeRequest,
                    dataType: "jsonp",
                    jsonp: "jsonp",
                    success: function (responseText) {
                        reverseGeocodeCallback(responseText);
                    },
                    error: function (e) {
                        alert(functionName + " " + e.message);
                    }
                })

    Please let us know. Are we using correct way or there is nay better way to do it.

    Thanks!


    Balasaheb

    Tuesday, April 11, 2017 5:48 AM
  • Using JavaScript to geocode/reverse geocode large data sets is a bad idea in general. You are limited to the number of concurrent requests that you can make by the browser... and you also generate a ton of billable transactions. If you need to process the data on the fly you have a couple of options.

    • Make several requests in parallel and not recursively.
    • Create a web worker to actually make these calls and run 4 web workers. I've found that each web worker has it's own concurrent limit which makes a big difference.
    • Send your data to a server and have it process the data on the fly.

    All of these will help, but it will still be slow. There is a batch geocoding service which is designed for processing large data sets which is a lot faster than making individual requests once you start getting into the thousands.


    [Blog] [twitter] [LinkedIn]

    Wednesday, April 12, 2017 1:35 AM
  • Hi,

    We are using Microsoft.Maps.SpatialDataService.GeoDataAPIManager.getBoundary to get the boundary of county/City/State. 

    We are trying to get boundary for Adams County. When we pass only Adams (without county word) to get boundary then it highlighted at wrong place. When we include the word “County” in the name and it did map correctly. example below Adams County then highlighted at correct place.

    But when we try to get region for Allen without including the word “County” and it heighted region correctly.

     

    Is there a reason for the inconsistencies of when to use County and not use County? And from where we get the list where to add County word.

    Waiting for your reply.

    Thanks!


    Balasaheb

    Friday, January 19, 2018 10:34 AM
  • The GoeData API primarily takes coordinates and finds the intersecting polygon. When you pass in a string value, it goes to the geocoder and then the coordinates of the first result is used. Take a look at geocoding these to understand why you get different polygons than expected. 

    [Blog] [twitter] [LinkedIn]

    Saturday, January 20, 2018 3:05 AM
  • Hi Ricky,

    Thanks for your reply.

    We are getting different geo-coordinates. We wanted to ask in there compulsory to append County word.

    You have any list or something to identify where to append County and where to not.

    Thanks!  


    Balasaheb

    Saturday, January 20, 2018 10:34 AM