Thread

  1. spatial index

    James Reid <james.reid@ed.ac.uk> — 2001-11-29T10:20:41Z

    hi - a very simple question from a newbie. Im tyring to outdo my colleagues Perl code (running on the same machine) for spatial operations (point-in-poly) but on a vanilla install of postgres 7.1 his perl is 20 times faster!! Ive no spatial index built on the polygon but I cant get one built as it complains of a tuple_row error which  i assume relates to the use of the default 8Kb block size - my question is - how do I rebuild with a bigger block size so as I can build an rtree on the poly? (or can someone give me some idea of how postgres spatial operations perform relative to other solutions - Id like to employ postgres for a gazetteer service but I need to get the speed of response up....any ideas/thoughts appreciated)
    
    +----------------------------------------------------------------------------------------+ 
    ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸
    
    James S Reid, 
    National Service Coordinator UKBORDERS 
    EDINA ,                                          Tel: +44 0131 651 1383 
    Data Library,                                  Fax: +44 0131 650 3308 
    Main Library, 
    Edinburgh University, 
    Edinburgh EH8 9LJ,              E-mail: James.Reid@ed.ac.uk 
    Scotland.                           Internet: edina.ed.ac.uk/ukborders/
    
    ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸ 
    +------------------------------------------------------------------------------------------+
            
    
    
    
  2. Re: spatial index

    ghaverla@freenet.edmonton.ab.ca — 2001-11-29T14:11:30Z

    On Thu, 29 Nov 2001, James Reid wrote:
    
    > hi - a very simple question from a newbie. Im tyring to outdo my colleagues Perl code (running on the same machine) for spatial operations (point-in-poly) but on a vanilla install of postgres 7.1 his perl is 20 times faster!! Ive no spatial index built on the polygon but I cant get one built as it complains of a tuple_row error which  i assume relates to the use of the default 8Kb block size - my question is - how do I rebuild with a bigger block size so as I can build an rtree on the poly? (or can someone give me some idea of how postgres spatial operations perform relative to other solutions - Id like to employ postgres for a gazetteer service but I need to get the speed of response up....any ideas/thoughts appreciated)
    
    [ Sorry, I'm not going to reformat his paragraph. ]
    Are you running 7.1?  That gets around some of the tuple size 
    issues.  There is a Spatial DBase add-on to PostgreSQL
    called PostGIS (?).  You might want to look around the
    OpenGIS consortium website to get info on this, and other
    spatial oriented things.
    
    Gord
    
    Matter Realisations     http://www.materialisations.com/
    Gordon Haverland, B.Sc. M.Eng. President
    101  9504 182 St. NW    Edmonton, AB, CA  T5T 3A7
    780/481-8019            ghaverla @ freenet.edmonton.ab.ca
    780/993-1274 (cell)
    
    
    
  3. Re: spatial index

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-11-29T14:49:10Z

    James Reid <james.reid@ed.ac.uk> writes:
    > [ how to do a spatial index ]
    
    Take a look at PostGIS, http://postgis.refractions.net.
    Not sure that you want everything in there, but their
    approaches to indexing might be useful.
    
    BTW, there are nontrivial bug fixes for both rtree and gist
    index types in 7.2, so you might want to run on latest 7.2
    beta rather than 7.1.
    
    			regards, tom lane