[mapserver-users] RE: WMS for netcdf [SEC=UNCLASSIFIED]
pcreso at pcreso.com
pcreso at pcreso.com
Sun Mar 4 10:34:10 PST 2012
Hi,
One advantage of having mapserver run as a cgi, is it is relatively easy to have a cgi script wrapper to enable such variable substitution by generating a modified mapfile then invoking mapserver to use this.
Not necessarily the most efficient way, but very effective.
A simple example would read the appropriate substring from the URL querystring,
create a new mapfile with something like:
cat <mapfile template> | sed 's/<variable_name>/<new_string>/' > <new_mapfile>
& fire off mapserver with the new mapfile
Maybe not ideal for lots of concurrent users, but adequate for some circumstances, & may work for you?
Cheers,
Brent Wood
--- On Mon, 3/5/12, teknocreator <teknocreator at gmail.com> wrote:
From: teknocreator <teknocreator at gmail.com>
Subject: [mapserver-users] RE: WMS for netcdf [SEC=UNCLASSIFIED]
To: mapserver-users at lists.osgeo.org
Date: Monday, March 5, 2012, 4:19 AM
Kathleen,
I've searched through the lists and on the web for an answer to your issue
as I have it too only with GRIB data. The MapServer docs seem to indicate
that variable substitution won't work for the PROCESSING directive.
Therefore I tried several variations "Changing map file parameters via a
form or a URL". What should've worked here considering that part of the
documentation is to add this to the GetMap request string:
map[layer].processing[0]="BANDS=01"
because it was the first PROCESSING directive for my layer and it needs a
string for the directive. But, I received an msloadLayer error. I tried a
few variations but all ended up with the same error. I've seen folks have a
similar issue with this in the MS Users list with no solution at present.
While what Puneet wrote may be a solution for you and possibly our GRIB data
as well, it seems like a much more complicated way just to get at a
particular band in the file. I do see why this has been done as NetCDF does
come in many flavors and there's the possibility of 4 dimensions in the
file. There are many links on using WCS with NetCDF, a good number coming
from UCAR.
Still, this looks like a possible code problem where the ability to change
map file parameter via a URL does not work in this case or else the ability
to change BANDS needs to be added to variable substitution.
Hopefully, someone from MapServer can help here. Looks like I'm going to be
investigating WCS, though. I'll definitely be checking back on this one.
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/WMS-for-netcdf-SEC-UNCLASSIFIED-tp4519496p4545262.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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120304/c06ad5d5/attachment.htm>
More information about the MapServer-users
mailing list