[mapserver-users] Mapserver 6.4 does not draw dense line segments at lower zoom levels. Why?

Ei Fujioka efujioka at duke.edu
Mon Mar 2 14:30:03 PST 2020


Hello all,

I'm upgrading a web site that I have been developing for many years. The 
web site uses Mapserver & Mapscript along with PHP. Mapserver layers are 
drawn on top of Google Maps using Javascript.

What I'm struggling to figure out is that a line layer is not drawn at 
lower zoom levels with Mapserver & Mapscript 6.4 and PHP 5.4.16. When 
zooming in, the lines will start getting drawn but still not fully.

The same layer was drawn at any zoom levels without any problem under 
Mapserver 5.2 and PHP 5.2.6.

Are there any mapfile settings (new to Mapserver 6.4 or changed from 
Mapserver 5.2) that limit the number of line segments to be drawn at 
unit cell or affects how the lines are drawn at differently zoom levels? 
Are there any limits in Mapscript/PHP regarding data size to fetch or 
draw? The line data of the layer is stored in a PostgreSQL table which 
has a lot of records (~270,000 line segments). If the line layer does 
not have such a large number of records (e.g. ~10,000), it draws fine.

Please take a look at an image (screenshots) that shows how the lines 
are drawn differently between Mapserver 5.2 and Mapserver 6.4:
http://seamap.env.duke.edu/images/mapserver6_4_not_draw_lines.png

The new web site is not publicly available yet, so I can't let you 
explore but the existing web site that draws the example line layer fine 
can be accessed at
http://seamap.env.duke.edu/dataset/2001
# Please turn on "Survey tracks" in the Layer selection.


The snippet of the mapfile is below.
Thanks for your help in advance!

Ei Fujioka
Duke University


=== Mapfile ===
MAP
   EXTENT -20001364 -15000982 20001253 15000982
   IMAGETYPE "PNG"
   NAME "OBIS-SEAMAP_OGC_SERVICES"
   SIZE 256 256
   STATUS ON
   TRANSPARENT TRUE
   UNITS METERS

   OUTPUTFORMAT
     NAME "PNG"
     MIMETYPE "image/png"
     DRIVER "AGG/PNG"
     EXTENSION "png"
     IMAGEMODE RGBA
     TRANSPARENT TRUE
   END # OUTPUTFORMAT

   PROJECTION
     "init=epsg:3857"
   END # PROJECTION

SYMBOL
   NAME "solid_line"
   TYPE ELLIPSE
   POINTS
     1 1
   END
     FILLED true
END

   WEB
     IMAGEPATH "/var/www/tmp/"
     IMAGEURL "/tmp/"
     METADATA
       "wms_srs"    "EPSG:3857 EPSG:4326"
       "ows_enable_request"    "*"
       "wms_title"    "Online Mapper"
     END # METADATA
   END # WEB

   LAYER
     CLASSITEM "classitem_dataset"
     CONNECTION "user=xxx password=xxx dbname=xxx host=xxx"
     CONNECTIONTYPE POSTGIS
     DATA "geom from (SELECT ..., as classitem_dataset, 'solid_line' as 
symbol FROM z_tracks WHERE ...) AS foo USING UNIQUE oid USING SRID=4326"
     METADATA
       "wms_legend_graphic"    "true"
       "gml_featureid"    "oid"
       "title"    "Survey tracklines"
       "gml_include_items"    "all"
       "wms_title"    "Survey tracklines"
     END # METADATA
     NAME "survey_tracks"
     PROJECTION
       "init=epsg:4326"
     END # PROJECTION
     STATUS OFF
     TILEITEM "location"
     TOLERANCE 1
     TYPE LINE
     UNITS METERS
     CLASS
       NAME "class_0"
       EXPRESSION "0_ON"
       STYLE
         ANGLE 360
         COLOR 255 0 0
         OUTLINECOLOR 255 0 0
         SIZE 2
         SYMBOL [symbol]
       END # STYLE
     END # CLASS

     # In total 60 CLASS ... END are defined
   END # LAYER


-- 
========================
   Ei Fujioka
   Research Scientist
   Nicholas School
   Duke University

   (919) 684-3518
   efujioka at duke.edu
========================



More information about the mapserver-users mailing list