[postgis-users] getting a square/rectangle arround a point
Daniel Grum
daniel.grum at unibw.de
Mon Aug 24 02:09:50 PDT 2009
Kevin Neufeld schrieb:
> You mean like this?
> SELECT ST_Intersection(
> poly.geom,
> ST_Expand(pt.geom, 2))
> FROM mypolygontable poly, mypointtable pt
> WHERE poly.geom && ST_Expand(pt.geom, 2);
>
> Yes, you can expand the bounding boxes on fly and use it to intersect
> another geometry.
>
> Cheers,
> -- Kevin
>
> Daniel Grum wrote:
>> Your request nr.2 is perfect, thank you.
>> But can use this created polygon to selcet a part of another polygon,
>> in my case public.wald_by.the_geom.
>> Or do I have to save the selcted information in a table and use this
>> for the new request???
>> Because I need to selcet the other polygon to calculate the area of
>> the selected part, of public.wald_by.the_geom !
>>
>> --Daniel
The SQL you have given me, seems to be not correct, because the area is
NULL.
Here the geometry that came as an result:
"0107000020EB7A000000000000"
I changed the second paramter in the ST_Expand from 2 to 20 and after
this from 20 to 200 but the result was the same.
I tried to load the result of the SQL --> I saved it as a VIEW.
But in mapbender there wasn't shown any area???!!!
-- Daniel
More information about the postgis-users
mailing list