tileindexes, time and raster inputs

Frank Warmerdam warmerdam at POBOX.COM
Fri Jun 23 19:49:44 EDT 2006


Yewondwossen Assefa wrote:
>> I found this was not working when I made a request with a time set.
>> Internally the msLayerMakePlainTimeFilter() was being used which 
>> generated
>> filter expressions like "TIME = '2006-03-10'".  To get things working I
>> have modified rasters layers to default to using the
>> msLayerMakeBackticsTimeFilter() which is what is used for in-mapserver
>> filter expression evaluation with times for formats like shapefiles.  
>> Since
>> direct tileindexes in raster layers need to be shapefiles, this seems 
>> like
>> the most appropriate default.
>>
>> OK, one problem solved.  Perhaps I should move the fix into 4.8.x as 
>> well?
> 
> I personnaly think you should add it to the 4.8.x release. The issue 
> with tileindex and rasters was marked as fixed in another bug (1506) but 
> I guess was broken at one point.

Assefa,

I looked at 1506.  I'm not sure how it used to work.  Perhaps it used
to be that the backtics filter was the default instead of the plain time
filter?  In any event it is working again in 4.9.

>> DEFAULT TIME
>> ------------
>>
>> The next problem is that if I don't include &TIME=something in the 
>> request
>> url, the default time is not used.  Shouldn't it be?  It seems I have to
>> add "&TIME=" (that is an empty time request) in order to get the default
>> time to kick in.  Is that the desired behavior?  This is annoying in this
>> application context since we end up rendering all the time images (quick
>> slow) if a WMS request is made without an explicit time.  Denis and I had
>> assumed the default time would be used any time the user did not supply
>> a time.
>>
>>
> 
>  After reading carefully the specs of wms 1.1.1 there is this paragrah 
> (Annec C 4.1) that suggests that your assumptions are correct :
> 
> "...The absence of Time or Elevation parameters is equivalent to a 
> request for the Layer’s default value (if defined) along that 
> dimension;..."
> 
> So it makes sense to change the current behaviour to reflect this. If 
> changes are made to reftect this, note that if a layer is time aware 
> (ows/wms_timeextent and ows/wms_timefield metadata are defined) but the 
> default time is not given (which is not manadatory but desired element), 
> a request to a GetMap on that layer would return an exception.
> 
>  I missed this parahrah at implemenation time and only implemented the 
> use of the default value when the value was missing (which is also 
> defined in the specs).  Code modification to change it is minimal. Le me 
> know if you want me to chenge it or you will do it.

Cool, I will take a crack at implementing the default behavior you
describe.

>> TILEINDEX LAYERS
>> ----------------
>>
>> The next problem I encountered was when trying to use a distinct 
>> tileindex
>> layer.  This did not seem to work for me, and generally resulted in
>> everything being selected.  I tried copying the time metadata to the
>> tileindex layer in the hopes it would then get the time filter assigned
>> to it, but that did not seem to occur.  The raster layer's filter was
>> set (with backtics) but this filter is not propagated on to the tileindex
>> layer in mapraster.c.
>>
>> How should this work?  How do others handle it?  It also seems that
>> direct propogation from the raster layer to the tileindex layer isn't
>> safe since the tileindex layer may use a different time query format,
>> so the time query needs to be generated directly on the tileindex layer.
>>
> 
> Not sure I understand this properly ? how is this diffrent from what is 
> descibed in point 1 ?

In point (1) I was talking about having the tileindex keyword pointing
directly to a shapefile.  In that case a temporary tileindex layer object
is created, and code from bug 1506 applies the raster layer filter to the
temporary layer.

In this point I am using a separate tileindex layer and nothing was
assigning the filter to that layer.  As part of Bug 1809 I have now
fixed this issue.

   http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1809

I think it would be pretty safe to propogate this back to 4.8.x if folks
wish me to.

Thanks for the excellent feedback!

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-dev mailing list