Hi,

Currently raster tileindex layers are rendered according to painter's 
algorithm. First image that it found from the tileindex is rendered first, then 
pixels from the next image are added by method "b over a" which is the default 
https://mapserver.org/uk/development/rfc/ms-rfc-113.html#rfc113 until the last 
image is processed. The end result is fine and if user wants to get a result 
that is composed from the newest available images overall it can be done by 
reading the tileindex sorted by time "select * from tileindex order by time".

Unfortunately the service gets pretty slow when the tileindex contains lots of 
overlapping images from different times because every image that gets selected 
by the bounding box gets also rendered even if all the pixels from some image 
will get overwritten later.  Setting a lower limit for time does not resolve 
our problem because the newest image can be quite old in some places.

I would like to see suggestions about how to implement a fast pre-selection 
that discards all the images which will not have any effect on the final 
raster. Ideally Mapserver would do it natively if the default blend mode is 
used but SQL or function for PostGIS or Spatialite would suit me as well. I 
have been thinking that some sort of pre-selection with the reverse painter's 
method might do for this purpose: test the footprints of the images from top to 
bottom, skip images which are covered by the growing union of footprints and 
stop when the whole BBOX is full.

-Jukka Rahkonen-

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to