[postgis-users] error with buffer()

2008-04-22 Thread Stefan Zweig
hi list, there seems to be an error within the buffer(geometry, precision) function. i just tried to the following statement: UPDATE _g2870 SET the_geom_3_b = buffer(the_geom_3, 0) WHERE isValid(the_geom_3) = false; and it resulted into a broken connection to the postmaster. postgis seems to

Re: [postgis-users] ST_Envelope

2008-04-22 Thread Mark Cave-Ayland
Sam Giffney wrote: On Postgis 1.3.2 (tested on Windows and Debian Lenny) A LINESTRING which runs "parallel to the grid lines" (excuse my poor GIS terminology) returns a LINESTRING instead of a POLYGON for the envelope. postgis=> select ST_AsText(ST_Envelope(ST_GeomFromText('LINESTRING(-36.91410

RE: [postgis-users] Absolute Beginner

2008-04-22 Thread Obe, Regina
Bob, Unfortunately I'm not too familiar with Delphi (aside from its some Pascal derivative) and I guess no one is in this group since no one responded to your question. I guess it depends what Delphi is expecting for the Canvas - e.g. can it use SVG maybe or most unlikely (WKT or WKB representat

Re: [postgis-users] ST_Envelope

2008-04-22 Thread Paul Ramsey
doco patched On Tue, Apr 22, 2008 at 4:45 AM, Mark Cave-Ayland <[EMAIL PROTECTED]> wrote: > Sam Giffney wrote: > > > On Postgis 1.3.2 (tested on Windows and Debian Lenny) > > > > A LINESTRING which runs "parallel to the grid lines" (excuse my poor > > GIS terminology) returns a LINESTRING instead

Re: [postgis-users] error with buffer()

2008-04-22 Thread Paul Ramsey
Send in your geometry! Some geometry/parameter combinations break ST_Buffer() and we like to add those to our zoo of unusual and interesting cases for future improvement. P In the meantime, try slightly simplifying your geometry first, or doing your buffer in 2 or more steps of smaller tolerances

[postgis-users] Error in simple SQL

2008-04-22 Thread George R. C. Silva
Hello everyone. Am i doing something wrong? In pg 8.2 and pgis 1.2 this query worked... select * from quadras_poligono, bairros_poligono where ST_intersects(bairros_poligono.the_geom,st_centroid(quadras_poligono.the_geom)) and bairros_poligono.codbairro = 1; now this doenst work. gives me th

[postgis-users] Difference between @ and ST_WITHIN/ST_CONTAINS

2008-04-22 Thread Frank Durstewitz
Hi, can someone please explain, what the difference between WHERE ST_CONTAINS(b.geom, e.geom) and WHERE e.geom @ b.geom is? (b.geom are (multi-)polygons and e.geom are points) I expect to get the same results, but with @ i get a few more records...? TIA, Frank smime.p7s Description: S/MI

Re: [postgis-users] Difference between @ and ST_WITHIN/ST_CONTAINS

2008-04-22 Thread Josh Livni
The @, and other operators such as &&, work on the bounding boxes of geometries. The st_xxx functions additionally do calculations using the actual geometries themselves... -Josh Frank Durstewitz wrote: Hi, can someone please explain, what the difference between WHERE ST_CONTAINS(b.geom, e

Re: [postgis-users] Error in simple SQL

2008-04-22 Thread Paul Ramsey
somehow you have odd geometries in your geometry columns... select gid from quadras_poligono where not st_isvalid(the_geom); select gid from bairros_poligono where not st_isvalid(the_geom); P On Tue, Apr 22, 2008 at 8:18 AM, George R. C. Silva <[EMAIL PROTECTED]> wrote: > Hello everyone. > >

Re: [postgis-users] Difference between @ and ST_WITHIN/ST_CONTAINS

2008-04-22 Thread Paul Ramsey
The operators (@, &&, etc) all work on bounding boxes. The functions all work on full geometries. It is possible for geometries to satisfy bounding box containment while not satisfying full geometric containment, hence your discrepancy. P. On Tue, Apr 22, 2008 at 8:36 AM, Frank Durstewitz <[EMAIL

Re: [postgis-users] Difference between @ and ST_WITHIN/ST_CONTAINS

2008-04-22 Thread Dylan Beaudette
On Tuesday 22 April 2008, Paul Ramsey wrote: > The operators (@, &&, etc) all work on bounding boxes. The functions > all work on full geometries. It is possible for geometries to satisfy > bounding box containment while not satisfying full geometric > containment, hence your discrepancy. > > P. T

Re: [postgis-users] Error in simple SQL

2008-04-22 Thread George R. C. Silva
Hello Paul, i checked both geometries, and quadras have 4 invalid geometries. How to fix them? Or i can only fix them by drawing again? Att. George Paul Ramsey escreveu: somehow you have odd geometries in your geometry columns... select gid from quadras_poligono where not st_isvalid(the_g

Re: [postgis-users] Absolute Beginner

2008-04-22 Thread Bob Pawley
Thanks Regina My version of PostgreSQL has no functions that start with ST_ such as ST_GeomFromText. I removed the ST_ from the code you suggested making it GeomFromText and it worked well. What does the ST_ signify?? Bob - Original Message - From: "Obe, Regina" <[EMAIL PROTECTED]

Re: [postgis-users] Absolute Beginner

2008-04-22 Thread Dave Potts
Bob Pawley wrote: I suspect your not using the latest version of postgis. The command select postgis_version(); will return which version use are using. D. Thanks Regina My version of PostgreSQL has no functions that start with ST_ such as ST_GeomFromText. I removed the ST_ from the code

[postgis-users] Re: "Summarizing" a collection of geometries

2008-04-22 Thread Reid Priedhorsky
Reid Priedhorsky wrote: Dear list, I would like to compute a "summary" of a collection of geometries (points, linestrings, polygons, or any combination). Here is the use case. I would like to summarize the geometry collection and present this summary visually so users working at a small scal

Re: [postgis-users] Re: "Summarizing" a collection of geometries

2008-04-22 Thread Dylan Beaudette
On Tuesday 22 April 2008, Reid Priedhorsky wrote: > Reid Priedhorsky wrote: > > Dear list, > > > > I would like to compute a "summary" of a collection of geometries > > (points, linestrings, polygons, or any combination). > > > > Here is the use case. I would like to summarize the geometry collecti

Re: [postgis-users] Re: "Summarizing" a collection of geometries

2008-04-22 Thread Dylan Beaudette
On Tuesday 22 April 2008, Reid Priedhorsky wrote: > Reid Priedhorsky wrote: > > Dear list, > > > > I would like to compute a "summary" of a collection of geometries > > (points, linestrings, polygons, or any combination). > > > > Here is the use case. I would like to summarize the geometry collecti

RE: [postgis-users] Absolute Beginner

2008-04-22 Thread Paragon Corporation
Bob, David is right. You are probably running an early 1.2 or 1.1 install. SELECT postgis_full_version() Is slightly better to run - it will give you details of Geos too. ST is the new naming convention. For things that use spatial indexes, it automagically includes the spatial index operat

[postgis-users] st_intersection() outputs multipolygons

2008-04-22 Thread Dylan Beaudette
Hi, I have two imput tables with all polygon geometry types, all polygons are reported as valid. After performing an intersection, I am left with mixed polygon and multipolygon geometry types: CREATE TABLE dwr.mapunit_dau as SELECT m_polys.areasymbol, m_polys.mukey, d_polys.dau_id, ST_Intersec

Re: [postgis-users] Difference between @ and ST_WITHIN/ST_CONTAINS

2008-04-22 Thread Frank Durstewitz
Thanks Josh and Paul for the clarification. Best regards, Frank PS: Yesterday, before i asked, i read the manual, but somehow i had not realized that the operators work with boundingbox, while the ST_ functions work with the geometry. Sorry for the noise... Frank Durstewitz am 22.04.2008 17:

Re: [postgis-users] Difference between @ and ST_WITHIN/ST_CONTAINS

2008-04-22 Thread Mark Leslie
On Wed, Apr 23, 2008 at 3:27 AM, Dylan Beaudette <[EMAIL PROTECTED]> wrote: > On Tuesday 22 April 2008, Paul Ramsey wrote: > > The operators (@, &&, etc) all work on bounding boxes. The functions > > all work on full geometries. It is possible for geometries to satisfy > > bounding box containment

[postgis-users] Geometrycollection to Multipolygon

2008-04-22 Thread Düster Horst
I do have a Geometrycollection which consists of a collection of Multipolygons and Polygons. My aim is to create one single Multipolygon from the mentioned Geometry collection. Until now I tried the following steps without result: 1. ST_BUFFER(GEOMCOLL,0.0) => It works but all inner rings of my i