[postgis-users] st_intersects threw an error

Leonid Khaylov khaylov.stud at fsr.tu-darmstadt.de
Mon Mar 15 08:20:57 PDT 2010


Thank you for your professional reply, strk!

Just for your information, we updated our PostGIS installation to version 1.5.0 and checked all the geometries for validity (all of them are valid). 

New simulation at the moment shows less "st_intersects() threw an error" issues, but they are still there. In a couple of days will be able to say whether this becomes a fatal issue for the running simulation.

Thanks again!
Leonid Khaylov

-----Ursprüngliche Nachricht-----
Von: strk [mailto:strk at keybit.net] 
Gesendet: Dienstag, 9. März 2010 13:01
An: PostGIS Users Discussion
Betreff: Re: [postgis-users] st_intersects threw an error

On Tue, Mar 09, 2010 at 12:50:09PM +0100, Leonid Khaylov wrote:
> Hello!
> 
>  
> 
> I'm experiencing a problem with function st_intersects (currently
> installed PostGIS 1.4). Our software makes a lot of db queries which are
> using st_intersects (actually it should be running a week or more) and
> after some number of queries we get "st_intersects threw an error"
> problem. We were able to get around this problem as after the error is
> thrown we disconnect from the db and connect to it again retrying the
> same query. It works. But the problem we're experiencing now is more
> difficult - we get these errors more often with time. Apparently, on the
> 4th day of simulation we get those errors each 3 minutes and it is
> almost not possible to finish the simulation.
> 
> Any ideas on how can we get around it? Any patches?

Most of the times that error is due to topologicall-invalid geometries
being passed to st_intersects. You may first of all check that (ST_isValid).

Now, a separate issue is that ST_isValid may give you false positive (sic)
unless you install current development version of GEOS.

So my advice is: install GEOS development version, check your geometries
with ST_isValid, clean them up if any invalidity is found.

Also note that upgrading GEOS will give you improved robustness and speed.
Finally, consider also upgrading postgis (1.5.1 is about to be released).

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html




More information about the postgis-users mailing list