[postgis-devel] [PostGIS] #231: New distance-calculations proposal

PostGIS trac at osgeo.org
Fri Aug 7 06:16:26 PDT 2009


#231: New distance-calculations proposal
--------------------------+-------------------------------------------------
  Reporter:  nicklas      |       Owner:  robe         
      Type:  enhancement  |      Status:  assigned     
  Priority:  medium       |   Milestone:  postgis 1.5.0
 Component:  postgis      |     Version:               
Resolution:               |    Keywords:               
--------------------------+-------------------------------------------------
Changes (by robe):

  * owner:  pramsey => robe
  * status:  new => assigned

Comment:

 Nicklas,

 I did some tests with this against my real data and it looks really good.

 For example I did a test on the ST_DWithin for my 190,000 data set of
 parcels against my 15 boston neighborhoods and the answers from yours are
 the same as what I get with a PostGIS 1.4 install, but yours appears to be
 faster:

 I ran the below query
 SELECT COUNT(*) As tot, n.name
 FROM neighborhoods As n INNER JOIN landparcels As l
 ON
  ST_DWithin(n.the_geom, l.the_geom,0.001)
  GROUP BY n.name
  ORDER BY n.name

 with my PostGIS 1.4 install -- takes --385719ms - 1.4  to run this query -
 with my PostGIS 1.5SVN patched with your distance takes --  -- 249859 ms

 I also did some random samples of ST_Distance between each neighborhood
 and a given landparcel and the numbers agreed down to as many decimals as
 displayed (around 9 decimal places).

 So from a cursory user standpoint, this patch looks really good.  I'll try
 to do more extensive testings and test out the ST_Max_Distance.  Since I
 don't have a regress that since its broken in older releases and new
 functions, I'll probably have to pull out a pen and paper for those or
 some plpgsql equivalent to test against it.

 Mark,Paul, Kevin -- can you please look at Nicklas patch.  I was afraid to
 look at the code since I'm not a good judge of c-programming, but if you
 think it looks fine and no glaring errors, I vote to accept it into 1.5
 and consider back-porting (the speed and st_max_distance fix) to 1.4.

 Thanks,
 Regina

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/231#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list