Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-06-02 Thread Oscar Zamudio
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 wrote: > Now that I get this polygon I found that it encloses all the streets in my > table and

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-05 Thread Oscar Zamudio
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. Butto be honest, it is not the best suitable for my purposes. I want a footprint of the whole bunch of streets. I mean: suppos

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-05 Thread Nicolas Ribot
> 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 qu

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-05 Thread Oscar Zamudio
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 cou

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-05 Thread Nicolas Ribot
On 5 May 2010 02:38, Oscar Zamudio wrote: > Well, it works like a charm! > But I still need some advise. The query generates a polygon and I use astext > to get readable output. Now I create a new table that will contain a name > and the geometry result of the query. I want to use something like:

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-04 Thread Oscar Zamudio
Well, it works like a charm! But I still need some advise. The query generates a polygon and I use astext to get readable output. Now I create a new table that will contain a name and the geometry result of the query. I want to use something like: INSERT INTO boundaries ( the_geom, the_name ) VALU

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread Oscar Zamudio
I must to recognize that today I did not research further about that, I just remember something about convex hull from my scientific research background. Anyway in my case if the convex hull of the streets table doesn't work in the straight manner, I still can make a new table containing first and

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread Martin Davis
I believe that the convex hull of a set of lines is the same as the convex hull of the vertices of the lines. So it should do what you want. But if you have a reference showing otherwise I'd be interested to see it. Oscar Zamudio wrote: ha, ha!!, My knowledge come from Maths ,and certainly

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread Oscar Zamudio
ha, ha!!, My knowledge come from Maths ,and certainly not from Postgis!. The concept of Convex Hull (in algorithms and math fields) is always applied to set of points and I remember there was a big challenge to find a good method for lines (some years ago). But I don't mind Math anymore, if this fu

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread strk
On Mon, May 03, 2010 at 11:18:03AM -0300, Oscar Zamudio wrote: > Thanks strk, > As far as I know convex hull basically applies to a collection of points..., > nevertheless, I will try with my set of lines. How far does your knowledge come from ? :) http://postgis.refractions.net/docs/ST_ConvexHull

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread Oscar Zamudio
Thanks strk, As far as I know convex hull basically applies to a collection of points..., nevertheless, I will try with my set of lines. On Mon, May 3, 2010 at 9:56 AM, strk wrote: > On Mon, May 03, 2010 at 09:32:54AM -0300, Oscar Zamudio wrote: > > I need to clarify: my table is a table of str

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread strk
On Mon, May 03, 2010 at 09:32:54AM -0300, Oscar Zamudio wrote: > I need to clarify: my table is a table of streets. So ... I don't know how > to proceed. You may be looking for ST_ConvexHull. Something like: SELECT ST_ConvexHull(ST_Collect(the_geom)) from mytable; --strk; () Free GIS & Flas

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread Oscar Zamudio
I need to clarify: my table is a table of streets. So ... I don't know how to proceed. On Mon, May 3, 2010 at 9:30 AM, George Silva wrote: > From what i understood of your request, you need to collect all the > polygons and merge in a single one. Use the St_Collect function to do that. > > The b

Re: [postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread George Silva
>From what i understood of your request, you need to collect all the polygons and merge in a single one. Use the St_Collect function to do that. The bounding box function will give you the extent of the whole, as you described. This is default behavior. Att On Mon, May 3, 2010 at 9:28 AM, Oscar

[postgis-users] Need a "polygon box" of a table instead of the bounding box that returns extent function

2010-05-03 Thread Oscar Zamudio
Hi all, I'm using the extent function to get the geographic coverage of a table. That function returns a bounding box, i.e. a polygon with 4 points (XMin YMin ...etc). I do know that the actual coverage of teh table is not a four points polygon but an arbitrary polygonal shape with many vertexs. I