[postgis-users] How to Subtract Polygon From Polygon

2010-11-02 Thread Jan Saalbach
Dear All, is there a function to easily subtract a polygon from a polygon. Both are rectangles. The scenario: Two overlapping polygons identified by ST_INTERSECTS. Creating a third one from the overlapping area via ST_INTERSECTION. Subtract the overlap from the two initial polygons. Which

Re: [postgis-users] How to Subtract Polygon From Polygon

2010-11-02 Thread Jan Saalbach
Thank you very much Maxime. I knew there was a function like this, just could not remember the name. Regards Jan On 02.11.2010 14:01, Maxime van Noppen wrote: Hi, ST_Difference does the trick. http://postgis.refractions.net/docs/ST_Difference.html

[postgis-users] Check-Constraint »enforce_geot ype_poly« violated

2010-11-02 Thread Jan Saalbach
Dear All, when trying to insert a polygon into a table from a plperl script by this command: my $new_poly = spi_exec_query(INSERT INTO polys1(id,poly) VALUES($new_id, ST_MakeEnvelope($xmin, $ymin , $xmax, $ymax, 31467));); I get a new row for relation »polys1« violates Check-Constraint

Re: [postgis-users] Check-Constraint »enforce_geot ype_poly« violated

2010-11-02 Thread Jan Saalbach
Never mind, problem solved. An ST_WITHIN check kindly helped me figured it out. The problem was not that it was not a polygon. The problem was, one was inside the other one. Regards Jan ___ postgis-users mailing list

Re: [postgis-users] AddGeometryColumn BOX3D

2010-10-19 Thread Jan Saalbach
Thank you Mike, you were absolutely right. Now I am running into yet another problem with the box3d objects. This command works fine: INSERT INTO metadaten(box) VALUES('BOX3D(3435970 5962930 -16.45,3439110 5967300 -3.28)'::BOX3D) WHERE id=111; When I try to do the same thing from within a

Re: [postgis-users] AddGeometryColumn BOX3D

2010-10-19 Thread Jan Saalbach
will I lose data/precision if I save the box3ds as text first and once they are all in the column cast them to box3d? That operation would be purely inside the database and should work. should it? Regards Jan ___ postgis-users mailing list

[postgis-users] AddGeometryColumn BOX3D

2010-10-18 Thread Jan Saalbach
Hi all, what is the geometry type to chose when storing BOX3D type geometries? Of what type does the column need to be? I mean how do I phrase this correctly? --- postgisdb=# SELECT AddGeometryColumn('boxes','box3d',31467,'BOX',3); FEHLER: Invalid type name - valid ones are: POINT,

[postgis-users] pl/pgsql getting ST_X output as REAL

2010-10-05 Thread Jan Saalbach
Hi all, on my journey to learning PostgreSQL and PostGis I am now trying to write a function in pl/pgsql. In this little program I would like to determine the frequency of different x-values of POINT3D objects to get an idea about how many rows were digitized. Therefore I would like to

[postgis-users] using operator

2010-08-20 Thread Jan Saalbach
Hi List, how do I check if two 3d-point sets overlap? I see the operator should be able to compare the bounding boxes, but how do I do it? I can not get the or ST_Intersects function to work. Here is what I am trying to do: SELECT ST_Collect(pkt) FROM pktbsp ST_Collect(pkt) FROM

Re: [postgis-users] using operator

2010-08-20 Thread Jan Saalbach
(pkt) as second_set from pktbsp2) y; That will return a single row with a single column: t or f. Hope that helps, aman -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Jan Saalbach Sent: August

Re: [postgis-users] help setting up postgis

2010-08-17 Thread Jan Saalbach
Nicolas, thank you for your help. I have imported a set of points using a python to psql script which filled a GeometryColumn using the ST_MakePoint() function. Now I would like to visualize the points using uDig. Since the set imported is comprised of around 10 million points, drawing

Re: [postgis-users] help setting up postgis

2010-08-10 Thread Jan Saalbach
thank you for your help. And yet I have another question. When I try to insert my 3d points into a previously created, empty column it seems only a 2d point is stored. Here is what I did via psql: - postgisdb=# INSERT INTO punkte (jan) VALUES (ST_makePoint(1.1,2.2,3.3)); INSERT 0 1

Re: [postgis-users] help setting up postgis

2010-08-10 Thread Jan Saalbach
Nicolas, you made my day. Absolutely amazing how fast and precise your help is. Thank you very much. Guess I will be using ST_AsEWKT() instead of the AsText function for now. Thank you again. Jan Zitat von Nicolas Ribot nicolas.ri...@gmail.com: Hello st_astext is an OGC function

[postgis-users] help setting up postgis

2010-08-09 Thread Jan Saalbach
Dear all, I am running into some troubles trying to install postgis 1.5.1. After installation I followed the manual on which first steps to take. I created a postgresql db and did the createlang part. Now, when I enter psql -d postgisdb -f postgis.sql I get a postgis.sql: No such file or

Re: [postgis-users] help setting up postgis

2010-08-09 Thread Jan Saalbach
Thank you Edward. It worked. Which now leads me to another question. I have datasets of the form x y z. Which are location x,location y and elevation z to describe different bathymetries . What is the smartes way to store them so they can be easily worked with? Regards, Jan Zitat von