<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Kyle,<br></div><div><br></div><div>Take a look at LAYER SCALETOKEN - <a href="https://mapserver.org/mapfile/layer.html#mapfile-layer-scaletoken">https://mapserver.org/mapfile/layer.html#mapfile-layer-scaletoken</a><br></div><div>and the RFC <a href="https://mapserver.org/development/rfc/ms-rfc-86.html#rfc86">https://mapserver.org/development/rfc/ms-rfc-86.html#rfc86</a> <br></div><div><br></div><div>You should be able to add a filter directly to the DATA clause based on the scale that would filter the data directly at source.<br></div><div><br></div><div>Seth<br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div><br></div><div>On Sun, Feb 20, 2022, at 12:59 AM, Kyle Qian wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi, I know that MapServer will determine the CLASS of a Feature based on the expression and scale range when drawing, but what if I want to avoid reading data that is not needed under the current scale? FILTER can filter LAYER data at the same time as spatial query, but do I have to create a separate LAYER for each scale range? <br></div><div>Thanks.<br></div></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div></blockquote><div><br></div></body></html>