[postgis-users] st_within maddness
Kevin Galligan
kg at kagii.com
Fri Jul 24 07:33:15 PDT 2009
Eww. Thanks for running it, though. Maybe a version issue?
I tried this. I "rotated" my box a bit. The big square box that
worked. I took that and knocked the points clockwise 100 meters
around the virtual bounding box, simply by adding or subtracting 100
to/from the relevant dimension.
select asewkt(bbox) from rresp.testwithin where st_within(bbox,
geomfromewkt('SRID=900913;POLYGON((
-8231500 4980400,
-8231600 4979500,
-8232500 4979600,
-8232400 4980500,
-8231500 4980400))'));
That DID NOT work. Tried again with 1 meter...
select asewkt(bbox) from rresp.testwithin where st_within(bbox,
geomfromewkt('SRID=900913;POLYGON((
-8231500 4980499,
-8231501 4979500,
-8232500 4979501,
-8232499 4980500,
-8231500 4980499))'));
Also didn't work. Want to see something really weird? I changed 1 of
the points, by 1 meter, which should make the box bigger (second
point, '4979499')...
select asewkt(bbox) from rresp.testwithin where st_within(bbox,
geomfromewkt('SRID=900913;POLYGON((
-8231500 4980500,
-8231500 4979499,
-8232500 4979500,
-8232500 4980500,
-8231500 4980500))'));
Also didn't work. However, physically changing that back to...
select asewkt(bbox) from rresp.testwithin where st_within(bbox,
geomfromewkt('SRID=900913;POLYGON((
-8231500 4980500,
-8231500 4979500,
-8232500 4979500,
-8232500 4980500,
-8231500 4980500))'));
Works. That returns the data inside.
Postgis version info...
"POSTGIS="1.3.3" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec
2007" USE_STATS"
Any other thoughts?
On Fri, Jul 24, 2009 at 10:18 AM, Maxime van Noppen<maxime at altribe.org> wrote:
> On 07/24/09 15:49, Kevin Galligan wrote:
>> I'm sure there's something simple I'm missing here, but we've hit the
>> "pull hair out" stage, so I'm hoping there's a kind soul out there
>> that can clear things up.
>
> I've ran the example you give that you give as example and get results :
>
>> # select asewkt(bbox) from testwithin where st_within(bbox, ST_Buffer(ST_SetSRID(ST_MakePoint(-8232000, 4980000),900913), 500));
>> asewkt
>> -------------------------------------------------------------------------------------------------------------
>> SRID=900913;POLYGON((-8232000 4980000,-8232000 4980100,-8231900 4980100,-8231900 4980000,-8232000 4980000))
>
> No idea what the problem can be though :-/
>
> --
> yabo
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
--------------------
Kevin Galligan
www.kagii.com
More information about the postgis-users
mailing list