<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, <div>i will do so on Monday. Is it possible that the fact that we use a tiny map script wrapper to avoid the map file in the url have something to do with it. </div><div>By the way i tried the leaving away of the single '  '  already but it just fails again because the parameter name doesn't get replaced. Thanks for all of your hints.</div><div>Just to complete the circumstances. The map file uses the include mechanism to get the layer definitions and the layer which needs the substitutions is only referenced by a raster layer as an tile index. Don't know if this have something to do with it. If i use static values everything is working fine.</div><div><br></div><div>Kind regards,<br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-- <br>Peter Freimuth </div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br></div>
</div>
<br><div><div>On 2013-08-22, at 3:17 AM, thomas bonfort <<a href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Peter,<br>can you email me your full mapfile, with the snippets you provided I<br>can't see anything wrong and would therefore need to see any<br>side-effects from the rest of the mapfile, and/or run it through a<br>debugger to see where it's failing.<br><br>--<br>thomas<br><br>On 21 August 2013 01:26, Peter Freimuth <<a href="mailto:freimuth69@gmail.com">freimuth69@gmail.com</a>> wrote:<br><blockquote type="cite">Hi,<br>i am trying to get the dynamic variable substitution work on Mapserver<br>6.3dev but somehow it does'nt work as it worked before and as documented.<br>When i execute<br><a href="http://10.10.4.18/cgi-bin/LI_USA-MT.cgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=48.046271,-115.929840,48.198407,-115.666914&CRS=EPSG:4326&WIDTH=1647&HEIGHT=953&LAYERS=data_view&STYLES=&FORMAT=image/png&DPI=96&TRANSPARENT=TRUE&STARTDATE=2011-01-01&ENDDATE=2013-09-01">http://10.10.4.18/cgi-bin/LI_USA-MT.cgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=48.046271,-115.929840,48.198407,-115.666914&CRS=EPSG:4326&WIDTH=1647&HEIGHT=953&LAYERS=data_view&STYLES=&FORMAT=image/png&DPI=96&TRANSPARENT=TRUE&STARTDATE=2011-01-01&ENDDATE=2013-09-01</a><br><br>or<br><br>http://10.10.4.18/cgi-bin/LI_USA-MT.cgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=48.046271,-115.929840,48.198407,-115.666914&CRS=EPSG:4326&WIDTH=1647&HEIGHT=953&LAYERS=data_view&STYLES=&FORMAT=image/png&DPI=96&TRANSPARENT=TRUE<br><br>I get an error in<br> msDrawMap(): Image handling error. Failed to draw layer named 'data_view'.<br>msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:<br>invalid input syntax for type date: "%STARTDATE%"<br>LINE 8: ...     (((acquisition_date >= date_trunc('day',date '%STARTDAT...<br>                                                             ^<br>So the substitution does not happen or the default is not applied.<br>Any hint on what i am doing wrong would be great.<br><br>See below the components from the mapfile:<br><br>MAP<br>.....<br>    #<br>    # Start of web interface definition<br>    #<br>    DATAPATTERN '^[a-zA-Z0-9\-\_\,]+$'<br><br>    WEB<br>        IMAGEPATH "/mnt/mapserver/mapserver_wms/geocloud_config/image_path"<br>        METADATA<br>            .....<br>            'PRODUCTID_validation_pattern'  '^[a-zA-Z0-9\-\_\,]+$'<br>            'default_PRODUCTID'  '1234567'<br>            'CONTRACTIDS_validation_pattern'  '^[a-zA-Z0-9\-\_\,]+$'<br>            'default_CONTRACT_IDS'  '0000'<br>            'STARTDATE_validation_pattern'<br>'^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>            'default_STARTDATE'  '2011-01-01'<br>            'ENDDATE_validation_pattern'<br>'^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>            'default_END_DATE'  '2013-09-01'<br>        END<br>        VALIDATION<br>             'PRODUCTID'  '^[a-zA-Z0-9\-\_\,]+$'<br>             'CONTRACTIDS' '^[a-zA-Z0-9\-\_\,]+$'<br>             'STARTDATE'  '^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>             'ENDDATE'  '^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>        END<br>    END<br>.....<br>    LAYER<br>        # this is the tileindex that aggregates the single image products<br>together and makes them accessible for the RASTER LAYER "data_view" and<br>"data_raw" for rendering<br>        NAME "data_idx"<br>        STATUS ON<br>        DEBUG 5<br>        UNITS dd<br>        TYPE POLYGON<br>        EXTENT -116.364631680367 44.1932837062986 -103.698350095065<br>49.1892799088128<br>        PROCESSING "CLOSE_CONNECTION=DEFER"<br>        CONNECTIONTYPE POSTGIS<br>        CONNECTION "user=***** password=***** dbname=***** host='*****'<br>port=5432"<br>        DATA "wkb_geom FROM (SELECT t1.* FROM (SELECT re3aip.cat_id as<br>archived_in_archiving_identifier, ico.image_id, ico.acquisition_date,<br>re3aip.tile_id,<br>ico.product_provider_image_identifier, re3aip.ohs_order_id,<br>re3aip.imagetake_cat_id, ico.epsg_code,<br>re3aip.ohs_contract_id,  ico.service_name,<br>ico.footprint_poly::geometry as wkb_geom, ico.image_location,<br>ico.vrt_location<br>FROM ows.imagepool_catalogue_ows ico<br>JOIN ows.re_l3a_imagepool re3aip ON (re3aip.image_id=ico.image_id)<br>WHERE ico.service_name in ('LI_USA-MT') AND<br>(((acquisition_date >= date_trunc('day',date '%STARTDATE%') AND<br>acquisition_date < date_trunc('day',date '%ENDDATE%') + interval '1 day')))<br>AND<br>re3aip.ohs_contract_id in ('%CONTRACTID%')<br>) t1<br>LEFT OUTER JOIN<br>(SELECT ico.image_id, ico.acquisition_date, re3aip.tile_id<br>FROM ows.imagepool_catalogue_ows ico<br>JOIN ows.re_l3a_imagepool re3aip ON (re3aip.image_id=ico.image_id)<br>WHERE ico.service_name in ('LI_USA-MT') AND<br>                            (((acquisition_date >= date_trunc('day',date<br>'%STARTDATE%') AND<br>acquisition_date < date_trunc('day',date '%ENDDATE%') + interval '1 day')))<br>AND<br>re3aip.ohs_contract_id in ('%CONTRACTID%')<br>                                                                   ) t2<br>                                                                  ON<br>t1.tile_id = t2.tile_id AND<br>((t1.acquisition_date < t2.acquisition_date) OR<br>(t1.acquisition_date = t2.acquisition_date AND t1.image_id < t2.image_id))<br>WHERE t2.tile_id is NULL<br>ORDER BY t1.ohs_contract_id, t1.tile_id<br>                                        ) foo USING UNIQUE image_id USING<br>SRID=4326"<br>        #FILTER ( '[product_provider_image_identifier]'='%PRODUCTID%')<br>        PROJECTION<br>            "init=epsg:4326"<br>        END<br>        METADATA<br>            "ows_title" "Data Index"<br>            "ows_extent"  "-116.364631680367 44.1932837062986<br>-103.698350095065 49.1892799088128"<br>            #'PRODUCTID_validation_pattern'  '^[a-zA-Z0-9\-\_\,]+$'<br>            #'default_PRODUCTID'  '1234567'<br>            'CONTRACTIDS_validation_pattern'  '^[a-zA-Z0-9\-\_\,]+$'<br>            'default_CONTRACTIDS'  '0000'<br>            'STARTDATE_validation_pattern'<br>'^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>            'default_STARTDATE'  '2011-01-01'<br>            'ENDDATE_validation_pattern'<br>'^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>            'default_ENDDATE'  '2013-09-01'<br>            #disable explicitly everything that shall not be supported for<br>this Layer<br>            "wms_enable_request"  "!GetCapabilities !GetMap<br>!GetLegendgraphic"<br>            "wcs_enable_request" "!GetCapabilities !GetCoverage<br>!DescribeCoverage"<br>            "wfs_enable_request" "!GetCapabilities !GetFeature<br>!DescribeFeatureType"<br>        END<br>        VALIDATION<br>            'PRODUCTID'  '^[a-zA-Z0-9\-\_\,]+$'<br>            'CONTRACT_IDS'  '^[a-zA-Z0-9\-\_\,]+$'<br>            'STARTDATE'  '^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>            'END_DATE'  '^([0-9]{4})-([0-9]{2})-([0-9]{2})$'<br>        END<br>    END<br>....<br>END<br>_______________________________________________<br>mapserver-users mailing list<br>mapserver-users@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br></blockquote></blockquote></div><br></div></body></html>