<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Notice that the boundary in the supplied figure curves even in the absence of any controlling points. That usually means to me that there is a surface function at work and the line is a contour, here containing 80% of the customer "volume". I know that I've used geostatistics modules in Arcview 3 (way back when) and this may be a similar approach.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Josh Lieberman</DIV><DIV><BR><DIV><DIV>On Jul 5, 2006, at 4:40 PM, Bruce Rindahl wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><O:SMARTTAGTYPE namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"> <DIV class="Section1"><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy">Will<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy">Did you create this using ArcView 3.x Business Analyst?  If so, the Avenue code is available from that interface.  That could give us a guide on how it was created.<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy">Bruce Rindahl<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy"><O:P> </O:P></SPAN></FONT></P> <DIV> <DIV class="MsoNormal" align="center" style="text-align:center"><FONT size="3" face="Times New Roman"><SPAN style="font-size:12.0pt"> <HR size="3" width="100%" align="center" tabindex="-1"> </SPAN></FONT></DIV><P class="MsoNormal"><B><FONT size="2" face="Tahoma"><SPAN style="font-size:10.0pt; font-family:Tahoma;font-weight:bold">From:</SPAN></FONT></B><FONT size="2" face="Tahoma"><SPAN style="font-size:10.0pt;font-family:Tahoma"> postgis-users-bounces@postgis.refractions.net [<A href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] <B><SPAN style="font-weight:bold">On Behalf Of </SPAN></B>William Andersen<BR> <B><SPAN style="font-weight:bold">Sent:</SPAN></B> Wednesday, July 05, 2006 2:15 PM<BR> <B><SPAN style="font-weight:bold">To:</SPAN></B> <ST1:PERSONNAME w:st="on">PostGIS Users Discussion</ST1:PERSONNAME><BR> <B><SPAN style="font-weight:bold">Subject:</SPAN></B> Re: [postgis-users] Amoeba Hulls</SPAN></FONT><O:P></O:P></P> </DIV><P class="MsoNormal"><FONT size="3" face="Times New Roman"><SPAN style="font-size: 12.0pt"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal" style="margin-bottom:12.0pt"><FONT size="3" face="Times New Roman"><SPAN style="font-size:12.0pt">Steve,<BR> <BR> I think you are onto something.<BR> <BR> There are exactly 101 points in each of the polygons in the (small) sample set that I have.<BR> <BR> When i get a little more time i'll plot these with 3.6 degree wedges and see if anything jumps out at me. <BR> <BR> My working theory is that there are a set of rules determining what happens at each control point. In some cases it's pretty simple as we have enough points to pick one that includes the 80% points but not the 20% points. In other cases it seems to be extrapolated from the neighboring points using some kind of fitted curve. <BR> <BR> Will<O:P></O:P></SPAN></FONT></P> <DIV><P class="MsoNormal"><SPAN class="gmailquote"><FONT size="3" face="Times New Roman"><SPAN style="font-size:12.0pt">On 7/5/06, <B><SPAN style="font-weight:bold">Stephen Woodbridge</SPAN></B> <<A href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</A>> wrote:</SPAN></FONT></SPAN><O:P></O:P></P><P class="MsoNormal"><FONT size="3" face="Times New Roman"><SPAN style="font-size: 12.0pt">Paul,<BR> <BR> Would you not just connect the dots, like this.<BR> <BR> 1) determine the 80% points, say by distance or whatever<BR> 2) order the points by radial angle increasing and radius decreasing<BR> 3) use something like a window say plus/minus 1/2 degree and select the <BR> <ST1:PERSONNAME w:st="on">max</ST1:PERSONNAME>imum radius in the window and add that point to the polygon<BR> 4) step 1/2 degree and repeat 3)<BR> 5) close the polygon<BR> <BR> You probably need to have some special handling if there is a sudden<BR> change in radius to make sure no points get clicked out of the polygon. <BR> <BR> Anyway I think this would be a good start to the algorithm.<BR> <BR> -Steve<BR> <BR> Paul Ramsey wrote:<BR> > Indeed, nice to see that everything can be strung together.  I am trying<BR> > to visualize what a "squishyhull" function would have to do to work <BR> > though :)  It's a not uncommon request... the calculated equivalent of<BR> > someone squinting and drawing a line around a group of points.<BR> ><BR> > P<BR> ><BR> > Mike Leahy wrote:<BR> >> Hey there, <BR> >><BR> >> If you can determine the closest 80% of points by whatever criteria,<BR> >> wouldn't you be able to use the convexhull() function?  I just tried<BR> >> this, and it looks okay to me:<BR> >><BR> >> testdb=# select astext(convexhull('MULTIPOINT((0 1),(0 0),(1 0),(1<BR> >> 1))'::geometry));<BR> >>              astext<BR> >> --------------------------------<BR> >>  POLYGON((0 0,0 1,1 1,1 0,0 0)) <BR> >> (1 row)<BR> >><BR> >> I did the same thing after creating a points table with the separate<BR> >> in individual records with the same overall coordinates in the<BR> >> multipoint example above, and it worked okay too: <BR> >><BR> >> testdb=# select astext(convexhull(collect(p))) from testpoint;<BR> >>              astext<BR> >> --------------------------------<BR> >>  POLYGON((0 0,0 1,1 1,1 0,0 0))<BR> >> (1 row) <BR> >><BR> >> It wouldn't be too hard to modify this to work using where condition<BR> >> that filters out the records of interest...or maybe on a saved view.<BR> >><BR> >> The only problem is that it wouldn't produce a nice curvy polygon <BR> >> outline like in the sample William provided.<BR> >><BR> >> Regards,<BR> >> Mike<BR> >><BR> >> Paul Ramsey wrote:<BR> >>> So my guess is that you use drive-time to segment your population of <BR> >>> customers relative to the store into the "nearest X%" and then draw a<BR> >>> "shape" around that cloud of points.  And drawing the shape is the<BR> >>> "fun" part. <BR> >>><BR> >>> William Andersen wrote:<BR> >>>> It appears to be the same as this functionality in Business Analyst<BR> >>>><BR> >>>> <A href="http://www.esri.com/software/arcgis/extensions/businessanalyst/about/customer-market.html">http://www.esri.com/software/arcgis/extensions/businessanalyst/about/customer-market.html</A><BR> >>>> <<A href="http://www.esri.com/software/arcgis/extensions/businessanalyst/about/customer-market.html">http://www.esri.com/software/arcgis/extensions/businessanalyst/about/customer-market.html </A>><BR> >>>><BR> >>>><BR> >>>> I thought this was done using some older version of Arcview, but i'm<BR> >>>> not very familiar with esri's offerings.<BR> >>>><BR> >>>> Will<BR> >>>><BR> >>>> On 7/5/06, *Paul Ramsey * <<A href="mailto:pramsey@refractions.net">pramsey@refractions.net</A><BR> >>>> <mailto:<A href="mailto:pramsey@refractions.net"> pramsey@refractions.net</A>>> wrote:<BR> >>>><BR> >>>>     This wouldn't be in vanilla arcview, was it in Network Analyst?<BR> >>>> The top<BR> >>>>     80% of points by drive distance might yield this shape.  Finding <BR> >>>> the<BR> >>>>     points would be straightforward, and then the hull building<BR> >>>> would be the<BR> >>>>     hand-waving part.<BR> >>>><BR> >>>>     P <BR> >>>><BR> >>>>     William Andersen wrote:<BR> >>>>      > Paul, Steve,<BR> >>>>      ><BR> >>>>      > Thanks for the quick replies, unfortunately it's pretty hard <BR> >>>> to tell<BR> >>>>      > from those images if they match.<BR> >>>>      ><BR> >>>>      > I've done some more digging and it turns out that these<BR> >>>> shapes were <BR> >>>>      > created in Arcview 3.x. The notes I have say...<BR> >>>>      ><BR> >>>>      >  > This approach selects a number of the outliers and joins the<BR> >>>>     extreme <BR> >>>>      > points using elliptical arcs.<BR> >>>>      >  > The arcs are all created in a direction moving out from the<BR> >>>>     store.<BR> >>>>      ><BR> >>>>      > However, I dont see customer points at the discontinuities in<BR> >>>> the<BR> >>>>     hulls,<BR> >>>>      > so it appears that the "extreme points" are perhaps <BR> >>>> interpolated.<BR> >>>>      ><BR> >>>>      ><BR> >>>>      > Will<BR> >>>>      ><BR> >>>>      > On 7/5/06, *Paul Ramsey* < <A href="mailto:pramsey@refractions.net">pramsey@refractions.net</A><BR> >>>>     <mailto:<A href="mailto:pramsey@refractions.net">pramsey@refractions.net</A>><BR> >>>>      > <mailto:<A href="mailto:pramsey@refractions.net">pramsey@refractions.net </A><BR> >>>>     <mailto:<A href="mailto:pramsey@refractions.net">pramsey@refractions.net</A>>>> wrote:<BR> >>>>      ><BR> >>>>      >     William,<BR> >>>>      > <BR> >>>>      >     It doesn't look like this is a standard algorithm, but more<BR> >>>>     likely a<BR> >>>>      >     particular empirical technique provided by the particular<BR> >>>>     software you<BR> >>>>      >     were using.  So substituting some other technique might<BR> >>>> yield a<BR> >>>>      >     different shape entirely... do any of the techniques <BR> >>>>     mentioned here<BR> >>>>      ><BR> >>>> <<A href="http://www.geospatial-online.com/geospatialsolutions/article/articleDetail.jsp?id=1348">http://www.geospatial-online.com/geospatialsolutions/article/articleDetail.jsp?id=1348 </A><BR> >>>><BR> >>>>      >     <<BR> >>>><BR> >>>> <A href="http://www.geospatial-online.com/geospatialsolutions/article/articleDetail.jsp?id=1348">http://www.geospatial-online.com/geospatialsolutions/article/articleDetail.jsp?id=1348 </A>>><BR> >>>><BR> >>>>      >     sound like what was done to your data?<BR> >>>>      ><BR> >>>>      >     Paul<BR> >>>>      ><BR> >>>>      >     William Andersen wrote: <BR> >>>>      >      ><BR> >>>>      >      > I'm fairly new to postgis, and working to automate a<BR> >>>> number of<BR> >>>>      >      > processes.<BR> >>>>      >      > <BR> >>>>      >      > We are trying to compute market area polygons that look<BR> >>>>     like the<BR> >>>>      >      > attached image. These were created by some older<BR> >>>> software.<BR> >>>>      >      ><BR> >>>>      >      ><BR> >>>>      >      > They are referred to as Amoeba Hulls, and they contain<BR> >>>> 80% <BR> >>>>     of a<BR> >>>>      >      > store's customers. However I can't find any solid<BR> >>>>     documentation that<BR> >>>>      >      > would allow me to reproduce them. <BR> >>>>      >      ><BR> >>>>      >      > Does anyone have any ideas how these shapes are<BR> >>>> created or an<BR> >>>>      >      > alternate name that I might be able to google? <BR> >>>>     Additionally, we may<BR> >>>>      >      > be in a position to finance the development of this<BR> >>>> feature.<BR> >>>>      >      ><BR> >>>>      >     _______________________________________________ <BR> >>>>      >     postgis-users mailing list<BR> >>>>      >     <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> >>>>     <mailto: <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>><BR> >>>>      >     <mailto:<A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net </A><BR> >>>>     <mailto:<A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>>><BR> >>>>      ><BR> >>>> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR> >>>>      ><BR> >>>>      ><BR> >>>>      ><BR> >>>>      ><BR> >>>><BR> >>>> ------------------------------------------------------------------------ <BR> >>>><BR> >>>>      ><BR> >>>>      > _______________________________________________<BR> >>>>      > postgis-users mailing list<BR> >>>>      > <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> >>>>     <mailto:<A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A>><BR> >>>>      > <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR> >>>><BR> >>>>     _______________________________________________<BR> >>>>     postgis-users mailing list<BR> >>>>     <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> >>>>     <mailto:<A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net </A>><BR> >>>>     <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR> >>>><BR> >>>><BR> >>>> <BR> >>>> ------------------------------------------------------------------------<BR> >>>><BR> >>>><BR> >>>> _______________________________________________<BR> >>>> postgis-users mailing list <BR> >>>> <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> >>>> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users </A><BR> >>><BR> >>> _______________________________________________<BR> >>> postgis-users mailing list<BR> >>> <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net </A><BR> >>> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR> >>><BR> >> _______________________________________________ <BR> >> postgis-users mailing list<BR> >> <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> >> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR> ><BR> > _______________________________________________<BR> > postgis-users mailing list<BR> > <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> > <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR> ><BR> <BR> _______________________________________________ <BR> postgis-users mailing list<BR> <A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A><BR> <A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users </A><O:P></O:P></SPAN></FONT></P> </DIV><P class="MsoNormal"><FONT size="3" face="Times New Roman"><SPAN style="font-size: 12.0pt"><O:P> </O:P></SPAN></FONT></P> </DIV> </O:SMARTTAGTYPE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">postgis-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>