<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<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
[mailto:postgis-users-bounces@postgis.refractions.net] <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>

</body>

</html>