[mapserver-users] minscaledenom puzzle, Mapserver 6.0.1

Steve Lime sdlime at gmail.com
Thu Sep 29 00:02:14 EDT 2011


Hmmm... What if you use one layer with the various class/expressions
and MAXSCALEDENOM set at the layer level for
all the various squares and then a second layer with just one class
for the pixels with MINSCALEDENOM set. I typically
use layer scales far more than class scale and that setup would
perform much better than what you have since there would
be no expressions or scale computations in the scale > 7000000 case. E.g.:

LAYER
  NAME 'sites_high'
  GROUP 'sites'
  MAXSCALE 7000000
  ...multi-class...
END
LAYER
  NAME 'sites_low'
  GROUP 'sites'
  MINSCALE 7000000
  ...one class...
END

If the second layer indeed renders then it's a class handling issue.
If the second layer (with pixels) doesn't render then
it's a drawing issue. What backend is used, GD or AGG?

Steve

On Tue, Sep 27, 2011 at 3:55 PM, Peter N. Schweitzer
<pschweitzer at usgs.gov> wrote:
> Surely I have misunderstood minscaledenom or otherwise have misused it.
>
> I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in
> PostgreSQL+PostGIS)
>
> The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html
> Feature type is point.  The classes from the map file are these:
>
>  labelitem "site_name"
>  labelmaxscaledenom 250000
>  classitem "dev_stat"
>  class
>    maxscaledenom 7000000
>    expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past
> Producer')
>    name "Mine, past or present producer"
>    color 160 0 0
>    symbol "mine"
>    size 5
>    label
>      color 0 0 0
>      size 10
>      type truetype
>      font arial
>      position cr
>      offset 4 4
>      end
>    end
>  class
>    maxscaledenom 7000000
>    expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence')
>    name "Prospect or occurrence"
>    color 0 160 0
>    symbol "opensquare"
>    size 5
>    end
>  class
>    maxscaledenom 7000000
>    expression ('[dev_stat]' == 'Plant')
>    name "Processing plant"
>    color 0 0 160
>    symbol "mine"
>    size 6
>    label
>      color 0 0 0
>      size 10
>      type truetype
>      font arial
>      position cr
>      offset 4 4
>      end
>    end
>  class
>    maxscaledenom 7000000
>    expression ('[dev_stat]' == 'Unknown')
>    name "Unknown"
>    color 0 0 0
>    symbol "occurrence"
>    size 6
>    end
>  class
>    minscaledenom 7000000
>    color 160 0 0
>    symbol 0
>    end
>
> Under mapserver 5.6.7, this generated red pixels for every point when
> the map is zoomed out; those are replaced by the square symbols when
> the map is zoomed in.
>
> But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out.
> I assumed that the last class defined above would apply when the scale
> is coarser than 1:7M.
>
> Here is the OpenLayers command that loads this layer:
>
>  var wms = new OpenLayers.Layer.WMS(
>    "Mineral Resources",
>    "http://mrdata.usgs.gov/cgi-bin/mapserv?",
>    {
>      map: 'mrds.map',
>      transparent: 'true',
>      layers: 'mrds'
>      },
>    {
>      singleTile: 'true',
>      ratio: 1
>      }
>    );
>
> Would some modification of my map file or my OpenLayers javascript
> bring back my little red pixels?
>
> Thanks for any help you might offer.
>
> Peter
> --
> Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
> (703) 648-6533  FAX: (703) 648-6252  email: pschweitzer at usgs.gov
> <http://geology.usgs.gov/peter/>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list