<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16535"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial>Oscar,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial>Interesting thought. I think Regina was approaching the
problem differently, but will alert her of this.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial>So you are doing a basic dice and integrate. Not sure
how much faster or slower it will be than the approach she was
considering.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial>Anyrate this has been recently discussed -- see this
thread</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial><A
href="http://postgis.refractions.net/pipermail/postgis-users/2010-June/026874.html">http://postgis.refractions.net/pipermail/postgis-users/2010-June/026874.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial>Leo</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=754062406-03062010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Oscar
Zamudio<BR><B>Sent:</B> Wednesday, June 02, 2010 2:37 PM<BR><B>To:</B> PostGIS
Users Discussion<BR><B>Subject:</B> Re: [postgis-users] Need a "polygon box" of
a table instead of thebounding box that returns extent
function<BR></FONT><BR></DIV>
<DIV></DIV>Well,
<DIV>I found many proposed solutions to my problem and just to let you all
know,the concept I was asking for is : "Concave hull".</DIV>
<DIV>Google search for it !</DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On Wed, May 5, 2010 at 5:28 PM, Oscar Zamudio <SPAN
dir=ltr><<A href="mailto:cmntlk@gmail.com">cmntlk@gmail.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Now that I get this polygon I found that it encloses all the
streets in my table and follows some more or less smooth path around them,
much better than a bounding box. But....to be honest, it is not the best
suitable for my purposes. I want a footprint of the whole bunch of streets. I
mean: suppose for a minute I have a table with only two equal length streets
that crosses each other at 90 degrees at the middle of them. With the proposed
mechanism I will get a square.
<DIV>What I want to return from this cross is a closed cross shaped polygon
that sorrounds more or less smoothly the actual cross. Maybe I need to use
some buffer extent over the lines (to be defined) that helps to get the final
shape. This polygon is what I want to use as an area shape to query about its
overlaps with a point.</DIV>
<DIV>The need of such process is because I have many streets table for cities
that are closer to each other. Using bounding boxes concept they overlaps in
some regions for neighbour cities. This makes more complex the process of
finding to which city belongs a point that falls in the overlapping
region.</DIV>
<DIV>Maybe a recursive process with dividing squares can be a good method. An
initial box that includes all the strets (extent) is divided in to four
squares. From these ones, the squares that contains streets (true) are left,
the other (false) are discarded. Every true square again is divided in 4
subsquares and so on ..up to a minimum size of square (maybe 100 m x 100
m). </DIV>
<DIV>I don't know if anyone has implemented or tried something like this or
even if there's already a solution to this problem.</DIV>
<DIV>Can anybody help me?</DIV>
<DIV>Thanks in advance,</DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV><BR><BR>
<DIV class=gmail_quote>On Wed, May 5, 2010 at 11:23 AM, Nicolas Ribot <SPAN
dir=ltr><<A href="mailto:nicolas.ribot@gmail.com"
target=_blank>nicolas.ribot@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV>> Nicolas,<BR>> What I want to do is an insert of the type INSERT
INTO...VALUES .. as<BR>> follows:<BR>><BR>> INSERT INTO boundaries
( the_geom, the_name ) VALUES<BR>>
(some_geometry_data,'some_arbitrary_name')<BR>><BR>> My problem
is that I want to replace the some_geometry_data value by the<BR>> result
of the SELECT query. And of course I am not an expert user of
SQL<BR>> statements so I don't know how to do that..<BR>> from
my_street_table;<BR>> Maybe your example can work, I will try it later
and let you know.<BR>><BR>> INSERT INTO boundaries ( the_geom,
the_name ) SELECT<BR>> ST_ConvexHull(ST_Collect(the_geom)) as
the_geom, 'mytablename' from<BR>>
my_street_table;<BR>><BR><BR></DIV>So yes, the example, (or, better, the
link to the INSERT command<BR>reference) will help you with the
query.<BR>(When inserting with a SELECT, the VALUES keyword is not
used).<BR>
<DIV>
<DIV></DIV>
<DIV><BR>Nicolas<BR>_______________________________________________<BR>postgis-users
mailing list<BR><A href="mailto:postgis-users@postgis.refractions.net"
target=_blank>postgis-users@postgis.refractions.net</A><BR><A
href="http://postgis.refractions.net/mailman/listinfo/postgis-users"
target=_blank>http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>