[postgis-devel] [PostGIS] #497: [raster] Start testing displaying PostGIS raster with Mapserver

PostGIS trac at osgeo.org
Wed Feb 16 05:57:15 PST 2011


#497: [raster] Start testing displaying PostGIS raster with Mapserver
----------------------------+-----------------------------------------------
 Reporter:  robe            |       Owner:  robe         
     Type:  task            |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by robe):

 Jorge,
 I'm still not quite understanding .  I'm still not quite clear why you
 need to pull the whole tables metadata (even with a distinct on those
 elements -- which is pretty slow too).  Wouldn't it be sufficient to pull
 the records that overlap the region of interest or even do a limit 1 call
 for the meta data? Or is the issue because you need to start a a pixel
 (0,0) and need to know its offset from that?

 If I use mode='2' I was assuming that meant to create one GDALRaster
 dataset and assume that by saying mode='2' I'm basically saying its evenly
 blocked, it has the same srid and there are no overlapping tiles.
 otherwise I'd want multiple datasets.

 If that is not the case then like I said we should introduce a mode='3'
 since I really think this is the most common use case.

 That said I would think you could reduce your first call to

 {{{
 SELECT (foo.md).srid, (foo.md).skew , etc.
 FROM (select st_metadata(rast) as md   from aerials.o_2_boston WHERE rast
 &&
 somebbox
 LIMIT 1) as foo }}}

 }}}

 or at the very list put in a rast && somebbox call in there.


 In the second query you do a spatial range anyway so I would expect the
 metadata call to do the same is all.  I'll play around with not tiling and
 see if it is better.

 I think part of the issue of the slowness in this particular usecase I am
 testing is that when using OpenLayers I normally use the buffer tiles mode
 so the responsiveness is better (e.g. if you have a 600x600 screen -- it
 will break it into several calls so you can see the screen loading -- so I
 might have like 12 calls of 100x100 pixelsize each.  So the fact you are
 pulling the meta data of the whole table on each call is really killing
 the performance.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/497#comment:12>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list