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><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">nicolas.ribot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> 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 class="h5"><br>
Nicolas<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" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>