<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p class="elementToProof" style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Hello,
<br>
I would like to define several dimensions for filtering my WMS (Web Map Service). They are based on a PostGIS table from which the service is exposed. Here lies my problem because among the required information to expose, I need to provide the following to
 the map server:</span></p>
<ul style="list-style-type: disc;">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">wms_dimensionlist: (Mandatory)</span></li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">wms_[dimensionname]_item: (Mandatory)</span></li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">wms_[dimensionname]_units: (Mandatory)</span></li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">wms_[dimensionname]_extent: (Mandatory)</span></li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">wms_[dimensionname]_default: (Optional)</span></li></ul>
<p><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">My issue arises because I want to filter my data based on the "product_id" column containing a string. The table
 is large, so it's not possible to provide all the ID values to "wms_productid_extent."</span></p>
<p class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">So, I thought about using
<a href="https://mapserver.org/cgi/runsub.html#table-of-contents" target="_new" id="OWA43134fc7-8bfe-2965-6535-6bc31bf80344" class="OWAAutoLink" style="margin-top: 0px; margin-bottom: 0px;">
https://mapserver.org/cgi/runsub.html#table-of-contents</a>, but the problem arises with the implementation in the query. I would like to lead to a situation where if I don't provide any filtering parameters (product_id, cloud_cover), the entire data set is
 returned.<br>
<br>
I do not want to use this:<br>
DATA 'geometry from (select * from mrc order by maxcc desc) where pid = '%pid%' as subquerry using unique unique_id using srid=3857'<br>
because if I do not provide pid, my query wiill not work.</span></p>
<p class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof"><br>
</span></p>
<p class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">So, to summarize I'm looking for something like this:<br>
<br>
</span></p>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">DATA 'geometry from (select * from mrc order by maxcc desc) as subquerry using unique
 unique_id using srid=3857'<br>
<br>
VALIDATION</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">    'maxCC' '^[0-9](1, 3)$'</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">    'tile' '^.{6}$'</span></div>
<div><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">    'pid' '^.{65}$'</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">END<br>
<br>
No default values (except time), if none is provided Mapserver does not filter the data (except time).</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Best,<br>
Marcin</span></div>
<div id="Signature">
<table style="margin-top: 30px; margin-bottom: 30px; width: 892.894px; box-sizing: border-box; height: 283px;" id="tableSelected0">
</table>
<table id="pbpsiglinktable">
<tbody>
<tr>
<td><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><a href="https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature"><img src="https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png"></a></span></td>
<td></td>
<td><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 120, 212);"><a href="https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature" style="text-decoration: none; color: rgb(0, 120, 212);">Book
 time to meet with me</a></span></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>