On Mar 12, 8:40 pm, bratliff <[email protected]> wrote: > > > The data I got the the US Dept. of Interior, has approx 6000 > > counties in the US + 50 states + 1 country. > > I am curious where you obtained your shape files. The U.S. Census > Department shape files contain fewer than 4000 U.S. counties / > parishes / burroughs. >
He probably means 6000 polygons, not counties. ;-) The Aleutian East and West Boroughs, for example, are made up of a few dozen polygons each. Add the Florida Keys, the Puget Sound and the Mississippi delta and you have a lot of polygons in a handful of counties. -- Marcelo - http://maps.forum.nu -- > > I've been working on an algorithm simplifying the US border data > > I have (approx 71,000 points) as I'd like to get the size down to > > no more than 1500 points for the US and say 50-150 per county > > (absolute tops). > > Forget about Douglas-Peucker. It was designed for polylines, not for > polygons. It will leave you with poorly fitting polys with overlaps > and gaps. Imagine the use of sandpaper on the pieces of a jigsaw > puzzle. Douglas-Peucker is asymmetric. It produces different results > depending on the direction of the scan. The common boundaries between > adjacent counties will not fit together tightly. > > Your best bet is to factor out the common boundaries. It will reduce > the size of your file by half. Apply point reduction to the common > boundaries. Reassemble the pieces into complete polys in the > browser. It is extra work for the browser but the transmission delay > is cut in half. > > If you decide to use compression, use a bi-directional algorithm. > Each poly segment has to be used twice, once per direction. The API > encoding is uni-directional. It cannot unpack in reverse. > > > The user will have the option to turn regions on and off, so > > potentially > > all counties, and all states, could be visible on the map at once, > > but that would be a rare occurrence, and probably not something > > I will worry about. > > If you discover the API cannot display hundreds of complex polys > simultaneously, look at : > > http://www.polyarc.us > > It is obfuscated to discourage tampering. The API is also. > Documentation will appear soon. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
