MapServer / MapServer-import

3 stars 2 forks source link

[WMS} time support : overriding Filter paramter #1261

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: assefa Date: 2005/03/01 - 16:18

e-mail from uli mueller : uli.mueller@GMX.CH

I finally got some nice WMS with time support running. Now I fell into
the problem that any time filter seems to override everything in the
PostGIS layer's FILTER setting.
I had read most of http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=872
so I understand that WMS time support is done (mis)using the FILTER
parameter. However it would be preferrable if any existing FILTER could
persist. Why not combine an existing filter and a WMS time filter
through SQL-AND?
tbonfort commented 12 years ago

Author: assefa Date: 2006/03/28 - 19:37

I have updated the setting so the an And is used if the layer has already a 
filter of an expression type. This was added for regular layers 9all beside 
postgis).
I will add the postgis next.
tbonfort commented 12 years ago

Author: assefa Date: 2007/07/27 - 20:59 this Patch was sent and tested by Denis Nadeau dnadeau@pop600.gsfc.nasa.gov

mappostgis.c:2061 replace : if(lp->filteritem) free(lp->filteritem); lp->filteritem = strdup(timefield); if (&lp->filter) freeExpression(&lp->filter);

for: if (&lp->filter) { /* if the filter is set and it's a string type, concatenate it with the time. If not just free it */ if (lp->filter.type == MS_EXPRESSION) { strcat(buffer, "("); strcat(buffer, lp->filter.string); strcat(buffer, ") and "); } else { freeExpression(&lp->filter); } }

Patch applied in dd1632a3235072af45c98f1f5c8de160a7d718fb (r6412) Denis please give it a try from svn and if all goes well I will close the bug

tbonfort commented 12 years ago

Author: dnadeau Date: 2007/07/27 - 22:31 I have tested the patch and everything works fine.

I have tried FILTER and TIME without problem.

Good job.

tbonfort commented 12 years ago

Author: assefa Date: 2007/07/27 - 23:23 Thnaks for the tests. closing bug.