<div dir="ltr"><div dir="ltr">Have you tried making your CLASS for NULLs the last of the three classes and with no EXPRESSION? The first two classes would pick up 2000 and 2100 and then anything not matching would be in the third class. This works in most cases but I haven't tried it with NULLs.</div><div dir="ltr"><br></div><div>Rich</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Mar 28, 2025 at 4:36 AM Björn Danielsson via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6977349107554290354">




<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
This works for me.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Try this:</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Create two layers with the same name and group.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Layer 1 ( takes care of values 2000 and 2100) :</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
LAYER</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
    NAME  "A"</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   GROUP "A"</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   .....</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
 </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   PROCESSING 'NATIVE_FILTER=gst IS NOT NULL'</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
  CLASS for 2000</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
....</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
  CLASS for 2100</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
....</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
END</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Layer 2 ( value = NULL ) ❤️</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
LAYER</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   NAME  "A"</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   GROUP "A"</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   ....</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
  PROCESSING 'NATIVE_FILTER=gst IS NULL'</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
 CLASS for NULL</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
....</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
END</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_-6977349107554290354appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-6977349107554290354divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Från:</b> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>> för Seth G via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br>
<b>Skickat:</b> den 28 mars 2025 10:43<br>
<b>Till:</b> <a href="mailto:angelique.kroisl@stadt-koeln.de" target="_blank">angelique.kroisl@stadt-koeln.de</a> <<a href="mailto:angelique.kroisl@stadt-koeln.de" target="_blank">angelique.kroisl@stadt-koeln.de</a>>; MapServer Users <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>><br>
<b>Ämne:</b> Re: [MapServer-users] NULL-EXPRESSION</font>
<div> </div>
</div>

<div>
<div>Hi,<br>
</div>
<div><br>
</div>
<div>Unfortunately, MapServer doesn't have a NULL type.<br>
</div>
<div>The workaround is to create a database view or query that will set the NULL to a numeric value of your choosing, e.g. -1 and then use that value in the CLASS expressions.<br>
</div>
<div><br>
</div>
<div>Seth</div>
<div><br>
</div>
<div id="m_-6977349107554290354x_sig62266145">
<div>--<br>
</div>
<div>web:<a href="https://geographika.net" target="_blank">https://geographika.net</a> & <a href="https://mapserverstudio.net" target="_blank">https://mapserverstudio.net</a><br>
</div>
<div>mastodon: @<a href="mailto:geographika@mastodon.social" target="_blank">geographika@mastodon.social</a><br>
</div>
</div>
<div><br>
</div>
<div>On Fri, Mar 28, 2025, at 8:55 AM, Angelique Kroisl via MapServer-users wrote:<br>
</div>
<blockquote type="cite" id="m_-6977349107554290354x_qt">
<div>
<p>Hello,<br>
</p>
<p>I'm trying to create a class using the class item "gst."<br>
</p>
<p>The attribute in the database can only have three values (2000, 2100, and <NULL>).<br>
</p>
<p>Unfortunately, I can't create the NULL EXPRESSION.<br>
</p>
<p> <br>
</p>
<p>I've already tried the following:<br>
</p>
<p>EXPRESSION IS NULL<br>
</p>
<p> <br>
</p>
<p>EXPRESSION "<NULL>"<br>
</p>
<p> <br>
</p>
<p>EXPRESSION <NULL><br>
</p>
<p> <br>
</p>
<p>EXPRESSION EMPTY<br>
</p>
<p> <br>
</p>
<p>What is the correct syntax for this?<br>
</p>
</div>
<p><br>
</p>
<div>
<hr>
<br>
</div>
<p><br>
</p>
<div><span style="font-family:Arial">Monatlich aktuelle Informationen Ihrer Stadtverwaltung in unserem Newsletter!
<a href="https://www.stadt-koeln.de/service/onlinedienste/newsletter-anmeldung?para=allgemein" target="_blank">
Newsletter Anmeldung</a></span><br>
</div>
<div>
<hr>
<br>
</div>
<p><br>
</p>
<p><br>
</p>
<div><span style="font-family:arial"><br>
<a href="https://www.stadt-koeln.de/leben-in-koeln/freizeit-natur-sport/veranstaltungskalender/lidl-final4-dhb-pokal" target="_blank"><img></a></span></div>
<div>_______________________________________________<br>
</div>
<div>MapServer-users mailing list<br>
</div>
<div><a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
</div>
<div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div>
<div><br>
</div>
</blockquote>
<div><br>
</div>
</div>
</div>

_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div></div>