[postgis-users] Need a "polygon box" of a table instead of thebounding box that returns extent function
Paragon Corporation
lr at pcorp.us
Wed Jun 2 23:28:51 PDT 2010
Oscar,
Interesting thought. I think Regina was approaching the problem
differently, but will alert her of this.
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.
Anyrate this has been recently discussed -- see this thread
http://postgis.refractions.net/pipermail/postgis-users/2010-June/026874.html
Leo
http://www.postgis.us
_____
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Oscar
Zamudio
Sent: Wednesday, June 02, 2010 2:37 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Need a "polygon box" of a table instead of
thebounding box that returns extent function
Well,
I found many proposed solutions to my problem and just to let you all
know,the concept I was asking for is : "Concave hull".
Google search for it !
On Wed, May 5, 2010 at 5:28 PM, Oscar Zamudio <cmntlk at gmail.com> wrote:
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.
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.
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.
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).
I don't know if anyone has implemented or tried something like this or even
if there's already a solution to this problem.
Can anybody help me?
Thanks in advance,
On Wed, May 5, 2010 at 11:23 AM, Nicolas Ribot <nicolas.ribot at gmail.com>
wrote:
> Nicolas,
> What I want to do is an insert of the type INSERT INTO...VALUES .. as
> follows:
>
> INSERT INTO boundaries ( the_geom, the_name ) VALUES
> (some_geometry_data,'some_arbitrary_name')
>
> My problem is that I want to replace the some_geometry_data value by the
> result of the SELECT query. And of course I am not an expert user of SQL
> statements so I don't know how to do that..
> from my_street_table;
> Maybe your example can work, I will try it later and let you know.
>
> INSERT INTO boundaries ( the_geom, the_name ) SELECT
> ST_ConvexHull(ST_Collect(the_geom)) as the_geom, 'mytablename' from
> my_street_table;
>
So yes, the example, (or, better, the link to the INSERT command
reference) will help you with the query.
(When inserting with a SELECT, the VALUES keyword is not used).
Nicolas
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100603/3fa62d8d/attachment.html>
More information about the postgis-users
mailing list