[postgis-users] Intersects with empty boxes error

TECHER Jean David davidtecher at yahoo.fr
Wed Jan 26 00:43:44 PST 2005


Hi Daniel,

I don't know for which web application your query is used but as I know U
are a PHP developper
and that's just an idea:

Could  not it be better  first of all to  find the geometrytype of the
geometry you asked (your point)
before doing the query and then to use a switch/case in php in order to
doing your query and avoiding validating tests...

For example in case of a point, I supposed that U know that PostGIS has now
a function MakePoint(x,y) that returns
a point from coordinates x and y...
----------------------------------------------------------------
TECHER Jean David
Responsable Informatique 01MAP
e-mail: davidtecher at yahoo.fr
Bureau: 04 67 45 60 27
Portable: 06 85 37 36 75
site perso : http://techer.pascal.free.fr/postgis/
site pro: http://www.01map.com/download/
K-S:"The greatest trick the devil pulled off was convincing people he didn't
exist"
------------------------------------------------------------
----- Original Message -----
From: "Daniel FAIVRE" <daniel.faivre at camptocamp.com>
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Sent: Tuesday, January 25, 2005 5:13 PM
Subject: [postgis-users] Intersects with empty boxes error


> Hello,
>
> With a code developped for previous versions, I've used to test
> intersections, within, or contains with "point  boxes": like this:
>
> 1) SELECT intersects(geometryfromtext('BOX3D(10 10, 10 10)', -1),
> geometryfromtext('BOX3D(0 0, 20 20)', -1))
>
> A true result is expected, like for:
>
> 2) SELECT intersects(geometryfromtext('BOX3D(10 10, 10 10)', -1),
> geometryfromtext('BOX3D(0 0, 20 20)', -1))
>
> My new version is:
> POSTGIS=0.9.1 GEOS=2.1.1 PROJ=Rel. 4.4.7, 31 March 2003 USE_STATS
> DBPROC=0.0.1 RELPROC=0.0.1
> The old one was a postgis 0.8.1 with GEOS 1.0
>
> It has worked before, but now, request 1 return a false result. Is it a
> known bug ?
>
> Sincerely yours,
>
> Daniel FAIVRE
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>





More information about the postgis-users mailing list