Thanks Jukka, Shortening file names worked. Asad
-----Original Message----- From: Rahkonen Jukka [mailto:[email protected]] Sent: Thursday, September 29, 2011 10:26 AM To: Asad Ullah; 'Mr. Puneet Kishor' Cc: '[email protected]' Subject: Re: [mapserver-users] Parameter substitution problem Hi, A couple of days ago somebody seemed to have troubles with imagery because of too long paths or filenames. Could you try to shorten your filename by removing some normal characters from it and see it starts to work at some limit? -Jukka Rahkonen- Asad Ullah wrote: > > I don't think (-) is a problem because I have tried changing > (-) with (_) in the file name without success. > > > > -----Original Message----- > From: Mr. Puneet Kishor [mailto:[email protected]] > Sent: Thursday, September 29, 2011 9:47 AM > To: Asad Ullah > Cc: Steve Lime; [email protected] > Subject: Re: [mapserver-users] Parameter substitution problem > > > On Sep 29, 2011, at 8:22 AM, Asad Ullah wrote: > > > Steve, > > Thanks very much for your help. Adding quote did not change > anything. However, if I change file name from, for example, > "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" to " > OMI_OMCLDRRclpWMSNRT_20110922.png" and do the substitution as: > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI_OMCLDRRclpWMS NRT_"+ amsreDate + ".png" > > > > It would work. Where the validation block is same as: > > > > VALIDATION > > 'DATA' '^OMI_.*\.png$' > > END > > > > So, do you think the problem is with validation definition? > > > > Could it be the dashes (-) in the problematic file name? > > > > > > > Thanks, > > > > Asad > > > > > > -----Original Message----- > > From: Steve Lime [mailto:[email protected]] > > Sent: Wednesday, September 28, 2011 11:27 PM > > To: Asad Ullah; [email protected] > > Subject: Re: [mapserver-users] Parameter substitution problem > > > > What happens if you quote the variable in the CGI call, that is: > > > > > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCL DRRclpWMSNRT_"+ > > amsreDate + ".png'" > > > > Note the single quotes in the DATA value... I'll try to > whip up local test case. > > > > Steve > > > > On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah > <[email protected]> wrote: > >> Steve, > >> > >> DATA in the URL has quotes as: > >> > >> > "/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLD RRclpWMSNRT_"+ > >> amsreDate + ".png" > >> > >> I unquoted the value in mapfile but there was no error. > Any more suggestion? > >> > >> > >> > >> Thanks, > >> > >> > >> > >> Asad > >> > >> > >> > >> > >> > >> From: Steve Lime [mailto:[email protected]] > >> Sent: Friday, September 23, 2011 4:55 AM > >> To: Asad Ullah > >> Cc: [email protected] > >> Subject: Re: [mapserver-users] Parameter substitution problem > >> > >> > >> > >> My guess is the validation is correct but the syntax of > the URL parameter is > >> is wrong in that the value passed for DATA is not quoted. > If you unquote the > >> default value in your mapfile does that result in a error? > That would be an > >> easy way to test the need for quotes. > >> > >> One last idea, while map_layer... should work, try > map.layer... instead as > >> you variable name. > >> > >> If you're really are just replacing the date part you > could do that by doing > >> a runtime sub... > >> > >> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png" > >> VALIDATION > >> date 'regex' > >> END > >> > >> And then you pass date as a CGI variable. > >> > >> Steve > >> > >> On Thursday, September 22, 2011, Asad Ullah > <[email protected]> > >> wrote: > >>> List, > >>> I am trying to substitute DATA parameter in my mapfile > with a call from > >>> Openlayers as follow: > >>> > >>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ > amsreDate + ".png" > >>> > >>> The mapfile is: > >>> > >>> LAYER > >>> NAME "OMI_CP" > >>> TYPE RASTER > >>> STATUS DEFAULT > >>> OFFSITE 0 0 0 > >>> PROJECTION > >>> "init=epsg:4326" > >>> END > >>> DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png" > >>> VALIDATION > >>> 'DATA' '^OMI_.*\.png$' > >>> END > >>> > >>> The call should change the date part (20110922) of the > png filename but it > >>> is not doing it. Can anyone point to what I am doing wrong here? > >>> > >>> Thanks, > >>> > >>> Asad > >>> > > _______________________________________________ > > mapserver-users mailing list > > [email protected] > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/mapserver-users > _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
