[postgis-users] a long time calculate distance between point and polygon

Willy-Bas Loos willybas at gmail.com
Tue Dec 11 23:59:46 PST 2012


No error message, just "error"?, that sounds like you disconnected from the
server.
That would mean that something broke off teh connection (a NAT firewall?)
or the query makes the service crash.
You should try it again and if the error persists, check the server log.

Cheers,

WBL


On Mon, Dec 10, 2012 at 3:46 PM, Francisco Salas <fsalas at pinar.geocuba.cu>wrote:

> Hi, Nicklas , I used this
> select * from pozos p,suelos s where ST_DWithin(p.the_geom,s.the_geom,1000)
>
> but in the output panel Messages of the pgAdmin III , appear only this
> around 22011 ms
> ********** Error **********
>
> How  I can determinate what's is the problems ?
>
> Regards,
> Francisco Salas
>
> -----Mensaje original-----
> De: postgis-users-bounces at lists.osgeo.org
> [mailto:postgis-users-bounces at lists.osgeo.org] En nombre de Nicklas Avén
> Enviado el: miércoles, 05 de diciembre de 2012 04:45 p.m.
> Para: PostGIS Users Discussion
> Asunto: Re: [postgis-users] a long time calculate distance between point
> and
> polygon
>
> Hallo
>
> You should use ST_DWithin instead with gist index on your gometry/geography
> column:
>
> select * from pozos p,suelos s where
> ST_DWithin(p.the_geom,s.the_geom,1000)
>
>
> HTH
>
> Nicklas
>
>
>
> On Wed, 2012-12-05 at 16:32 -0500, Francisco Salas wrote:
> > Hi,
> >
> > I have test in two database one with SRID 2085 an other 4326 use this
> > sql
> >
> > pozos : 2339 rows
> >
> > suelos:1526 rows
> >
> > for 2085 :
> >
> > select * from pozos p,suelos s where
> > st_distance(p.the_geom,s.the_geom)
> >
> > <=1000
> >
> > time of result : 3 minutes aprox
> >
> >
> >
> > for 4326 :
> >
> > select * from pozos p,suelos s where
> > st_distance(p.the_geom,s.the_geom,true)
> >
> > <=1000
> >
> > time of result : not determined
> >
> > Why happen this problem?
> >
> > How I can optimize this?
> >
> > I am using PostGis 1.5.2
> >
> >
> >
> > Regards,
> >
> >
> >
> > Francisco Salas
> >
> >
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
"Quality comes from focus and clarity of purpose" -- Mark Shuttleworth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121212/5a5bdf65/attachment.html>


More information about the postgis-users mailing list