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

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Sat Mar 17 09:03:06 EDT 2012


Hi,

Start from something simple and try to use DAT with tiff file with %file% and make it to work first. I am pretty sure that is will work. Perhaps there is some trouble with validation or something. If you do not have a luck with RASTER make a similar vector layer and see if you can change %file% with a variable then.

Here are snippets from working vector data examples

DATA "way from (select (way),osm_id,tags from osm_polygon where (tags @>'%tag%=>%value%')) as foo using unique osm_id using srid=3067"
    VALIDATION
    tag "."
    value "."
    END

With this setting user must give both tag and value parameters as &tag=something&value=else. Defaults can be given as

  "default_tag" "amenity"
  "default_value" "toilets"

-Jukka Rahkonen-
________________________________________
teknocreator 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