mberseth


As a proof of concept for a recent project I was working on, I created a sample application using Virtual Earth to plot and shade zip-code boundaries. I thought it might be useful for those looking for samples ...

http://mattberseth.com/blog/2007/05/plotting_zipcode_boundaries_us.html

I was impressed at how little code this took. Once again Microsoft does all of the heavy lifting for me ...





Re: Simple example of shading zip-code boundaries using Virtual Earth

Jared H


Very nice implementation and example! If I may ask, did you home-roll the zip code lat/lon boundary definitions or did you some open source material for that




Re: Simple example of shading zip-code boundaries using Virtual Earth

Derek Chan

Great code there, especially with the ajax.net implementation. Web services are definately very powerful with VE and allows for dynamic grabbing of data. I'm definately looking forward to seeing more of these, especially if anyone can write a "hello world" type of application using VE and Ajax.net / web services to help those who have no experience with either technologies.





Re: Simple example of shading zip-code boundaries using Virtual Earth

mberseth

Thanks for the feedback Jared - it is much appreciated. The lat/longs are from the 2000 census data published by the US Census Bureau.






Re: Simple example of shading zip-code boundaries using Virtual Earth

SoulSolutions

Matt,

if you want to reduce the size of those sets of lat/long points I highly recommend the google algorithms.

I converted them to c# and VE here:

http://www.soulsolutions.com.au/Articles/Encodingforperformance/tabid/96/Default.aspx

John.






Re: Simple example of shading zip-code boundaries using Virtual Earth

DVR Prasad

Hi,

The example is excellent, but I have only zip code.

How do I get those Lat/Long points dynamically by providing the zip code.

Is there any web service or something else so that we can get all the Lat/Long points dynamically

I need to draw polygon on the boundaries of the zip code provided by user

Please help me in this regard

Thanks

DVR Prasad






Re: Simple example of shading zip-code boundaries using Virtual Earth

mberseth

Hi DVR Prasad -

I believe there are vendors that sell this information (http://www.melissadata.com/lookups/geocoder.asp), but I don't know of a public webservice or database that provides this information for free. Like I said I obtained my coordinates from the 2000 census data, but since this is seven years old there is going to be some holes in this dataset as well.






Re: Simple example of shading zip-code boundaries using Virtual Earth

mberseth

John -

Great article. I am going to plug that into the example as soon as I get a chance. Thanks for the tip.






Re: Simple example of shading zip-code boundaries using Virtual Earth

wjcyg

There is a location to get this data. It is available from the census bureau at: http://www.census.gov/geo/www/cob/z52000.html





Re: Simple example of shading zip-code boundaries using Virtual Earth

mberseth

I updated the article to incorporate John's encoding suggestion. Here is the link: http://mattberseth.com/blog/2007/05/part_ii_simple_example_of_shad.html




Re: Simple example of shading zip-code boundaries using Virtual Earth

mberseth

I know this is a little late, but if anyone is still looking for the ZIP Code database I used, you can download the .csv file and run the corresponding BULK INSERT script from my blog ...

http://mattberseth.com/blog/2007/10/zip_code_database_created_from.html

The data is from the 2000 census, but it still makes a pretty useful test dataset.


Thanks,

Matt