[mapserver-users] Re: Run-time Substitution and Raster file problem

thomas bonfort thomas.bonfort at gmail.com
Sat Mar 17 08:29:34 EDT 2012


as a rule of thumb, you should always use quotes around your strings.

the stars I was talking about come from your mapfile snippet:

DATA         *../grib/ds_vis%fhour%.grb*

with RTS, your queries will fail if you do not add a fhour= parameter
to your http query, as in that case %fhour% will not be replaced. you
can have a look at using default substitutions in the docs if you want
the fhour parameter to become optional.

--
thomas

On Sat, Mar 17, 2012 at 13:24, teknocreator <teknocreator at gmail.com> wrote:
> Thomas,
>
> I'm not positive about what you wrote as I don't enclose the data string
> with '*'.  The '*' in the "*_validation_pattern" I mentioned was just a
> wildcard for the RTS variables that I use as we use a few in the DB call I
> mentioned.
>
> However, when I tried what you suggested, the parser tries to find a file
> named ds_vis%fhour%.grb:
>
> msDrawMap(): Image handling error. Failed to draw layer named 'mosaic'.
> msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing
> file '../grib/%file%' for layer 'mosaic'.
>
> I've tried variations on this using the full path enclosed in quotes (which
> throws the error above) and without (which throws the first one).  Then
> tried this:
>
> DATA  ../grib/%file%, (full path)/grib/%file% (with and without quotes),
> thinking I should pass the whole file name.
>
> I either get a parsing error for the '%' or it can't find the file because
> the quotes cause the parser to look for a filename with '%' in it.
>
> Dave M
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Run-time-Substitution-and-Raster-file-problem-tp4626749p4627796.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list