[Google Maps API v2] Re: Algorithm to merge polygons
Thanks for providing the lead to the GPC library. I am trying to merge CA counties together and was having a challenge w/ the non-trivial problem.
However, I was able to get GPC to make it work w/ minimal effort.
Took the clipping example from the docs and modified the 2 input files with the lat/lng coords of 2 counties and then ran gpc_polygon_clip(GPC_UNION, &subject, &clip, &result);
and it worked like a charm!
Thanks
Alex
On Thursday, May 3, 2007 7:21:38 AM UTC-7, John Coryat wrote:
-- On Thursday, May 3, 2007 7:21:38 AM UTC-7, John Coryat wrote:
Bratliff,I've thought of a couple of avenues along those lines, like creating a
database of "borders" which could simplify the task, but in the end,
there are so many variables that a successful routine would not always
work.There is a library called GPC that has a union function in it. It's
very complicated but functions fairly fast. I use it in the zipunion
application. It works pretty much 100% of the time. I created a set of
optimized polygons that combine rivers into zip code polygons to make
things easier.-John Coryat
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home