[mapserver-users] Mapserver 6.4 does not draw dense line segments at lower zoom levels. Why?
Ei Fujioka
efujioka at duke.edu
Tue Mar 3 06:20:27 PST 2020
Thanks, Steve, so much for a quick insight!
Yes, the simpler STYLE was the key to fix the problem. In particular, I think, as you indicated, the unnecessary SYMBOL was the culprit. I didn't need it as the line was just a solid line. And I had to change SIZE 2 to WIDTH 1.5 (WIDTH 2 was a little bit thicker than I preferred).
Now the lines draw quick at any zoom levels!
Thanks again!
Ei
On 3/2/2020 7:26 PM, Steve Lime wrote:
Hi! My guess is your v.5 style is being interpreted differently in v.6. For example, what’s the purpose of the ANGLE 360? There were some big changes between versions 5 and 6. For example you don’t have to use a circular brush to draw a thick line. You should be able to do something much simpler like:
STYLE
COLOR 0 0 255
WIDTH 2
END
—Steve
On Mon, Mar 2, 2020 at 4:48 PM Ei Fujioka <efujioka at duke.edu<mailto:efujioka at duke.edu>> wrote:
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<mailto:efujioka at duke.edu>
========================
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users<https://urldefense.com/v3/__https://lists.osgeo.org/mailman/listinfo/mapserver-users__;!!OToaGQ!4IVGLPk6_lTDv1ZbWoxiAJGFEofPuFCPviKOe47HkAyo1EOpOsjaJzIe5HivtFGP$>
--
========================
Ei Fujioka
Research Scientist
Nicholas School
Duke University
(919) 684-3518
efujioka at duke.edu<mailto:efujioka at duke.edu>
========================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200303/4cbbb6c5/attachment.htm>
More information about the MapServer-users
mailing list