[postgis-users] ST_DWithin is not using SpatialIndex with Subquery

2012-09-11 Thread Thomas Klemmer
Hi folks first of here some system informations: Server: Ubuntu 12.04 LTS, 16GB RAM 1TB 4x SSD HW Raid PostgreSQL 9.1.5 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit POSTGIS=2.0.0 r9605 GEOS=3.3.3-CAPI-1.7.4 PROJ=Rel. 4.7.1, 23 September 2009

Re: [postgis-users] ST_DWithin is not using SpatialIndex with Subquery

2012-09-11 Thread Francois Hugues
. De : postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] De la part de Thomas Klemmer Envoyé : mardi 11 septembre 2012 11:09 À : postgis-users@postgis.refractions.net Objet : [postgis-users] ST_DWithin is not using SpatialIndex

Re: [postgis-users] ST_DWithin is not using SpatialIndex with Subquery

2012-09-11 Thread Thomas Klemmer
Klemmer *Envoyé :* mardi 11 septembre 2012 11:09 *À :* postgis-users@postgis.refractions.net *Objet :* [postgis-users] ST_DWithin is not using SpatialIndex with Subquery Hi folks first of here some system informations: Server: Ubuntu 12.04 LTS, 16GB RAM 1TB 4x SSD HW Raid PostgreSQL

[postgis-users] ST_DWithin-- unexpected behavior?

2011-10-25 Thread Stephen V. Mather
Hi All, Running 1.3.5 still :). Found some unexpected (to me), but pleasant behavior with ST_DWithin. What we're doing is creating a function that we can use to randomize a point within a minimum and maximum bounds. Our original approach was to generate the geometry of the

Re: [postgis-users] ST_DWithin-- unexpected behavior?

2011-10-25 Thread Stephen V. Mather
From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Stephen V. Mather Sent: Tuesday, October 25, 2011 11:04 AM To: postgis-users@postgis.refractions.net Subject: [postgis-users] ST_DWithin-- unexpected behavior? Hi

Re: [postgis-users] ST_DWITHIN indices

2011-05-06 Thread Sairam Krishnamurthy
Thanks. I started using GIST. It works. Thanks, Sairam Krishnamurthy +1 612 859 8161 On Thu, May 5, 2011 at 8:39 PM, Ben Madin li...@remoteinformation.com.auwrote: Sairam, On 06/05/2011, at 5:50 AM, Sairam Krishnamurthy wrote: Table structure: lat AS double, lon AS double, spatialPoint

[postgis-users] ST_DWITHIN indices

2011-05-05 Thread Sairam Krishnamurthy
All, Table structure: lat AS double, lon AS double, spatialPoint AS point. I have a query that uses ST_DWITHIN. I was under the impression that this function will use the gist index on spatialPoint. Index query: CREATE INDEX table_spatial_index ON table USING btree (spatialPoint); Select

Re: [postgis-users] ST_DWITHIN indices

2011-05-05 Thread Ben Madin
Sairam, On 06/05/2011, at 5:50 AM, Sairam Krishnamurthy wrote: Table structure: lat AS double, lon AS double, spatialPoint AS point. I have a query that uses ST_DWITHIN. I was under the impression that this function will use the gist index on spatialPoint. Index query: CREATE INDEX

[postgis-users] ST_DWithin on 2 columns which are the same

2011-03-01 Thread robertvc
Hi, I have been trying, with no luck, to implement a query to return me all the pairs of rows that are within a certain range of each other. I searched the forum before trying to find a solution but I haven't been able to. Sorry if there is a solution to this problem already that I didn't see.

Re: [postgis-users] ST_DWithin on 2 columns which are the same

2011-03-01 Thread Ben Madin
Robert, On 01/03/2011, at 4:47 PM, robertvc wrote: I have been trying, with no luck, to implement a query to return me all the pairs of rows that are within a certain range of each other. I searched the forum before trying to find a solution but I haven't been able to. Sorry if there is a

Re: [postgis-users] ST_DWithin Performance

2011-02-14 Thread Carl S. Yestrau Jr.
: From: Paul Ramsey pram...@opengeo.org Subject: Re: [postgis-users] ST_DWithin Performance To: PostGIS Users Discussion postgis-users@postgis.refractions.net Date: Sunday, February 13, 2011, 11:42 AM How many records get returned when you drop the LIMIT? If you have to sort 700K things

Re: [postgis-users] ST_DWithin Performance

2011-02-12 Thread strk
On Fri, Feb 11, 2011 at 02:27:16PM -0800, Carl S. Yestrau Jr. wrote: Table schema: Table public.geobits Column |Type | Modifiers

Re: [postgis-users] ST_DWithin Performance

2011-02-12 Thread Carl S. Yestrau Jr.
When I removed the ORDER BY created_on DESC the results were almost instantaneous (which makes sense as it just returns the first 'x' result defined by LIMIT). I don't have access to the machine at the moment, but can get the plan for that if it's helpful. I'm pretty confused why things are so

Re: [postgis-users] ST_DWithin Performance

2011-02-12 Thread Paul Ramsey
How many records get returned when you drop the LIMIT? If you have to sort 700K things into order, I can see that taking a second or two. P. On Sat, Feb 12, 2011 at 2:16 PM, Carl S. Yestrau Jr. c...@featureblend.com wrote: When I removed the ORDER BY created_on DESC the results were almost

Re: [postgis-users] ST_DWithin Performance

2011-02-12 Thread Carl S. Yestrau Jr.
Hi Paul, ~700K records get returned if I drop the LIMIT. Thanks for the feedback. On Sat, Feb 12, 2011 at 2:42 PM, Paul Ramsey pram...@opengeo.org wrote: How many records get returned when you drop the LIMIT? If you have to sort 700K things into order, I can see that taking a second or two.

Re: [postgis-users] ST_DWithin Performance

2011-02-11 Thread strk
On Thu, Feb 10, 2011 at 03:37:34PM -0800, Carl S. Yestrau Jr. wrote: I have a geography(Point,4326) column with a gist index with ~700K records. A simple query using the ST_DWithin() is taking about 15 secs. Any pointers from the resident experts? show explain analyze yourselect output ?

Re: [postgis-users] ST_DWithin Performance

2011-02-11 Thread Carl S. Yestrau Jr.
Thanks Mark, Here's the additional information, the ORDER BY created_on DESC seems to be the issue even though it's indexed. Table schema: Table public.geobits Column |Type | Modifiers

[postgis-users] ST_DWithin Performance

2011-02-10 Thread Carl S. Yestrau Jr.
I have a geography(Point,4326) column with a gist index with ~700K records. A simple query using the ST_DWithin() is taking about 15 secs. Any pointers from the resident experts? Arch Linux x86 postgis-1.5.2-1 postgresql-9.0.2-2 ___ postgis-users

[postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread nguyen liem
Hi all At the first time i used ST_Contains but it take a long time, so I used ST_Dwithin to improve the performance for the query statement but i don't know it is correct or not. I would like to know my points are within in polygon or not: SELECT id, geom FROM my_neighbour WHERE ST_Dwithin

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread Nicklas Av�n
Hallo What you are doing with ST_Dwithin is to check if your geom and geometry have parts closer to (or exactly) 0.1 mapunits from eachother. If you are using a meter based SRID then you are checking if they are within 0.1 meters from eachother. So actually in this case your points can

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread nguyen liem
Hi Nicklas Actually the points can be outside the polygon and returning true but it can be tolerance about 1 meters outside. I'm using SRID: 4326. I would like to know 0.1 with the projection 4326 is equal 1 meter or not ? I used ST_Intersects (geom, geometry); but it's really slow, I don't

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread Nicklas Av�n
Ok The distance of 0.1 degree in east west direction will vary depending on how far from the equator you are. How many points is there in your dataset? Do you see if the index is used? /Nicklas 2010-05-25 nguyen liem wrote: Hi Nicklas Actually the points can be outside the polygon and

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread nguyen liem
Hi Nicklas my dataset about 100.000 rows and after run my query i get about 15.000 rows. I has created index for geom field but it was improve the perofrmance for ST_intersect I used SRID 4326, but I don't know how to convert from degree to meter. Cheers On Tue, May 25, 2010 at 3:43 PM,

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread nguyen liem
Hi Nicklas sr for the mistake ... field but it *was not* improve the perofrmance for ST_intersect Cheers On Tue, May 25, 2010 at 3:53 PM, nguyen liem liemnguye...@gmail.com wrote: Hi Nicklas my dataset about 100.000 rows and after run my query i get about 15.000 rows. I has created index

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread Nicklas Av�n
The polygon you are testing against, is it very complex? How long time does it take? did you analyse the table after adding the index? /Nicklas 2010-05-25 nguyen liem wrote: Hi Nicklas sr for the mistake ... field but it was not improve the perofrmance for ST_intersect Cheers On

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread nguyen liem
HI Nicklas If i use ST_Intersect that take 30s (got 15356 rows) If ST_DWithin: 5s (got 15482 rows) I see ST_DWithin is really faster than ST_Intersect. It got more neighbours but it's not a problem. One more question, if i would like to use ST_DWithin in projection WGS84 and the radius is in 1

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread Charles Galpin
On May 25, 2010, at 5:43 AM, nguyen liem wrote: One more question, if i would like to use ST_DWithin in projection WGS84 and the radius is in 1 meter, how to do that? As someone else said it depends on the latitude you are dealing with, but you take the circumference of the earth at your

Re: [postgis-users] ST_DWithin with radius 0.000001

2010-05-25 Thread nguyen liem
Hi Charles Thanks for your answer, i can understand a little, i will try to research more. One more time, i would like to say thank you with you and Nicklas. Cheers On Tue, May 25, 2010 at 6:47 PM, Charles Galpin cgal...@lhsw.com wrote: On May 25, 2010, at 5:43 AM, nguyen liem wrote: One

[postgis-users] st_dwithin

2010-05-11 Thread Malm Paul
Hi, I have a database stored in WGS84 EPSG:4326 I would like ti find objects within a distance from a lat/lon point. 1) If i use 1 degree as the distance, will I then get an eliptic search area? 2) Will i find objects on the other side of the Datum shift border if I enter a point like lat=60°,

Re: [postgis-users] st_dwithin

2010-05-11 Thread Emilie Laffray
On 11 May 2010 07:34, Malm Paul paul.m...@saabgroup.com wrote: Hi, I have a database stored in WGS84 EPSG:4326 I would like ti find objects within a distance from a lat/lon point. 1) If i use 1 degree as the distance, will I then get an eliptic search area? 2) Will i find objects on the

Re: [postgis-users] st_dwithin

2010-05-11 Thread Ilya Sterin
Would something like this be inefficient? I store data in a geometry type, as I don't really care about the spheroid accuracy, as my location queries are mostly less than 30 km apart. So... SELECT ST_AsGeoJSON(location), title, description FROM event WHERE ST_DWithin(location::geography,

[postgis-users] st_dwithin in SRID 4269

2009-04-25 Thread Sachin Srivastava
I am a newbie, could somebody explain what distance transformation should i use to eliminate discrepancy in results for the following 2 queries 1) SELECT * from table1 where st_dwithin(geom1, geom2, distance); *(Note, geom1 and geom2 are in SRID 4269) * 2) SELECT * from table1 where

[postgis-users] st_dwithin()

2007-08-07 Thread Santosh Gaikwad
Hi All, I have installed PostGIS 1.2.1 version but I could not able to find out st_dwithin() in it. In which version this function will be available? Thanks Regards, Santosh Gaikwad Senior Software Developer Saama Technologies (India) Pvt Ltd. 6th Floor West Wing, Marisoft III,