Thanks Thomas and Steve!

Thomas is right that I needed a real symbol and not "symbol 0"
within the pixel-sized class.  I was confused by the docs under
class:symbol, which says "Default is 0, which results in a single
pixel, ..."  Is that part now out of date?

But I like Steve's suggestion that using two layer definitions and
setting the scale denominator for the entire layer in each case
might save time that mapserver would have spent deciding how to draw
each point's symbol.

Of course the most important optimization I can make is the one that
I have not yet learned to implement--tiling.  But I want to get the
basics done as well as I can first.

I appreciate being pointed to "group"--this is something I had not
learned about before, perhaps because I had not seen its practical use
until now.  Works very nicely.

I don't know how to answer the question "what renderer are you using"
beyond doing mapserv -v; its output is

MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML 
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER 
SUPPORTS=SOS_SERVER SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

and in my openlayers code that calls this layer I'm not specifying
an image format.  So I assume that mapserv is falling into a default
that is based on my compilation options.  Based on the docs, it looks
like I'm defaulting to AGG for png images (which my openlayers is
requesting by default).

My map now (at version 6) appears "fuzzier" than it did at version 5.
Perhaps this renderer does more anti-aliasing?

Anyway thanks for your help.  I will continue to explore.

Peter

On 09/29/2011 12:02 AM, Steve Lime wrote:
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?

On 09/28/2011 01:53 PM, thomas bonfort wrote:
You have to define a valid ellipse type symbol and reference it in the 
classes/styles where you want the circles to appear.

On Tue, Sep 27, 2011 at 3:55 PM, Peter N. Schweitzer
<pschweit...@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 N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  FAX: (703) 648-6252  email: pschweit...@usgs.gov
<http://geology.usgs.gov/peter/>
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to