Daniel Grum schrieb:
Daniel Grum schrieb:
Pavel Iacovlev schrieb:
st_intersection(st_envelope(st_buffer(t1.the_geom, $radius)), t2. the_geom)

2009/8/18 Daniel Grum <[email protected]>:
Dear Mailing-List,

I want to create a square/rectangle around a point-->via box2d(geometry) or
buffer(geometry, double precision) for example.

If I have this rectangle I want to intersect this with another polygon--> saved in the (geodata) table: wald_by column: the_geom, to get information
about the area the the "lumberjack" can dig.
The point in the middle of the rectangle = the point that is saved in a
table in my database in the table: holzfaeller in the column the_geom!

Is this possible to solve?
Do I have to save this calculated square/rectangle in an extra/own table?

Thanks for every help.

Daniel
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users




I try solve the problem with your message:

SELECT st_intersection(st_envelope(st_buffer('holzfaeller.the_geom', 10, 'quad_segs=8')),wald_by.the_geom);


I get this error message:

FEHLER:  parse error - invalid geometry

********** Fehler **********

FEHLER: parse error - invalid geometry
SQL Status:XX000

What do you think is the problem in this case.
Is there a understaning mistake in my SQL order.

Thanks,
Daniel

I thing I solved the problem:

SELECT st_intersection(st_envelope(st_buffer(a.the_geom,1)),b.the_geom)
FROM public.holzfaeller a, public.wald_by b
(WHERE a.gid=3);   //not necessary

Thank You Pavel for the fast answer!


The problem now:

this order calculates a lot of points and the intersection with the layer "wald_by" can't be solved because the geo data typ is: GEOMETRYCOLLECTION.

I tried to generate a rectangle with ST_GeomGromText instaead of the st_buffer that generates a circle:

ST_GeomFromText('POLYGON((st_x(a.the_geom)-2.0 st_y(a.the_geom)+2.0,st_x(a.the_geom)+2.0 st_y(a.the_geom)+2.0,st_x(a.the_geom)+2.0 st_y(a.the_geom)-2.0,st_x(a.the_geom)-2.0 st_y(a.the_geom)-2.0,st_x(a.the_geom)-2.0 st_y(a.the_geom)+2.0))')

PostgreSQL don't alerted me with a mistake, but if I would look for the generated data, PostgreSQL isn't able to do this and said "Bricht ab".

What can be the reason for this?

Thanks
Daniel

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to