Re: [postgis-users] ST_Contains(a.coordinates::::geometry, b.coordinates::::geometry)
On Tue, Aug 09, 2011 at 10:28:34PM +0300, Antonio Rodriges wrote: > Thank you, Sandro, > > yes, I clearly understand this, but all my contours are CLOSED and > NONE of them intersects each other. many of them contain each other. > actually, they are like isobars on synoptic map, > > please, see for ex > http://1.bp.blogspot.com/_a1AVUIK5Er8/S27QJhQijOI/I88/NUJE11Me6n4/s1600-h/Synoptic+Chart.jpg The fact that your lines are CLOSED doesn't make them areas. None of the following 2 CLOSED lines contain the other: +-A--+ || | +B--+ | | | | | | +---+ | || ++ You may want to convert them to polygons if you want to check that "B" is contained by "A": SELECT ST_Contains(ST_MakePolygon(A), ST_MakePolygon(B)); --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ST_Contains(a.coordinates::::geometry, b.coordinates::::geometry)
Thank you, Sandro, yes, I clearly understand this, but all my contours are CLOSED and NONE of them intersects each other. many of them contain each other. actually, they are like isobars on synoptic map, please, see for ex http://1.bp.blogspot.com/_a1AVUIK5Er8/S27QJhQijOI/I88/NUJE11Me6n4/s1600-h/Synoptic+Chart.jpg ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ST_Contains(a.coordinates::::geometry, b.coordinates::::geometry)
On Tue, Aug 09, 2011 at 04:44:48PM +0300, Antonio Rodriges wrote: > Dear all, > > I have the table "contours" which stores geography column > "coordinates" - these are closed polylines, many of them span a half > of a globe. Closed polylines contain each other only if there's NO point in one of them being OUTSIDE or ON THE BOUNDARY of the other. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] ST_Contains(a.coordinates::::geometry, b.coordinates::::geometry)
Dear all, I have the table "contours" which stores geography column "coordinates" - these are closed polylines, many of them span a half of a globe. When I perform select a.id, b.id, ST_Contains(a.coordinatesgeometry, b.coordinatesgeometry) AS result from contours a CROSS JOIN contours b where a.time = '2002-12-31 16:00:00' and b.time = '2002-12-31 16:00:00' then ST_Contains is "true" only on rows with a.id=b.id Maybe I converted geography to geometry incorrectly or I am misusing ST_Contains or my data (note again, some of contours span a half of a globe) is inappropriate for geom functions or smth else? Thank you ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ERROR: could not find function "isvalidreason" in file "/usr/local/postgresql-8.2.20/lib/postgis-1.4.so"
On 09/08/11 09:04, ml ml wrote: Hello, i am trying to restore a postgres dump on a freshly installed Debian Squeeze Box. I am using postgres 8.2.20, postgis 1.4.2 and geos.3.3.0 from source. Postgresql 8.2.20: ./configure --prefix=/usr/local/postgresql-8.2.20 --with-perl --with-openssl --with-libxslt --with-libxml Geos: ./configure --prefix=/usr/local/geos-3.3.0 Postgis: ./configure --with-pgconfig=/usr/local/postgresql-8.2/bin/pg_config --with-geosconfig=/usr/local/geos-3.3/bin/geos-config Restore: -- /usr/local/postgresql-8.2/bin/pg_restore -U pgsql -d test --exit-on-error --no-owner /root/test_dev-Sat-18.bin pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 43383; 1255 3510237 FUNCTION st_isvalidreason(geometry) pgsql pg_restore: [archiver (db)] could not execute query: ERROR: could not find function "isvalidreason" in file "/usr/local/postgresql-8.2.20/lib/postgis-1.4.so" Command was: CREATE FUNCTION st_isvalidreason(geometry) RETURNS text AS '$libdir/postgis-1.4', 'isvalidreason' LANGUAGE c IMMUTAB... I read that st_isvalidreason needs goes>= 3.1 which i actually use. I used to use geos 3.0 from the debian squeeze repo, which i replaced (see source config above) Kind Regards, Mario Hi Mario, That all looks as if it should work. What does the following command show? ldd /usr/local/postgresql-8.2.20/lib/postgis-1.4.so That will show you which version of GEOS your custom-built PostGIS is built against. HTH, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ERROR: could not find function "isvalidreason" in file "/usr/local/postgresql-8.2.20/lib/postgis-1.4.so"
On Tue, Aug 09, 2011 at 10:04:41AM +0200, ml ml wrote: > I am using postgres 8.2.20, postgis 1.4.2 and geos.3.3.0 from source. ... > pg_restore: [archiver (db)] Error from TOC entry 43383; 1255 3510237 > FUNCTION st_isvalidreason(geometry) pgsql > pg_restore: [archiver (db)] could not execute query: ERROR: could not > find function "isvalidreason" in file > "/usr/local/postgresql-8.2.20/lib/postgis-1.4.so" Did you run "make install" ? Check ctime on /usr/local/postgresql-8.2.20/lib/postgis-1.4.so Or run: nm /usr/local/postgresql-8.2.20/lib/postgis-1.4.so | grep -i validreason --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] ERROR: could not find function "isvalidreason" in file "/usr/local/postgresql-8.2.20/lib/postgis-1.4.so"
Hello, i am trying to restore a postgres dump on a freshly installed Debian Squeeze Box. I am using postgres 8.2.20, postgis 1.4.2 and geos.3.3.0 from source. Postgresql 8.2.20: ./configure --prefix=/usr/local/postgresql-8.2.20 --with-perl --with-openssl --with-libxslt --with-libxml Geos: ./configure --prefix=/usr/local/geos-3.3.0 Postgis: ./configure --with-pgconfig=/usr/local/postgresql-8.2/bin/pg_config --with-geosconfig=/usr/local/geos-3.3/bin/geos-config Restore: -- /usr/local/postgresql-8.2/bin/pg_restore -U pgsql -d test --exit-on-error --no-owner /root/test_dev-Sat-18.bin pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 43383; 1255 3510237 FUNCTION st_isvalidreason(geometry) pgsql pg_restore: [archiver (db)] could not execute query: ERROR: could not find function "isvalidreason" in file "/usr/local/postgresql-8.2.20/lib/postgis-1.4.so" Command was: CREATE FUNCTION st_isvalidreason(geometry) RETURNS text AS '$libdir/postgis-1.4', 'isvalidreason' LANGUAGE c IMMUTAB... I read that st_isvalidreason needs goes >= 3.1 which i actually use. I used to use geos 3.0 from the debian squeeze repo, which i replaced (see source config above) Kind Regards, Mario ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users