[mapserver-users] Doubling of labels on high resolution maps
lars.schylberg at blixtmail.se
lars.schylberg at blixtmail.se
Thu Oct 17 07:19:15 PDT 2019
Hi,
The best way is most likely to set up a WMTS service with mapcache.
It handles meta tiling in a more proper way.
There are good examples in the mapproxy documentation how to do labels in mapserver.
https://mapproxy.org/docs/nightly/labeling.html (https://mapproxy.org/docs/nightly/labeling.html)
Mapproxy is anotther good alternative instead of mapcache.
Be sure to specify "labelcache_map_edge_buffer" "-10" in the mapfile MAP-WEB data section.
You can still run WMS requests from QGIS towards mapcache if You have enabled that in the mapcache config.
/Lars S.
17 oktober 2019 kl. 16:04, "Jan Hartmann" <j.l.h.hartmann at uva.nl (mailto:j.l.h.hartmann at uva.nl?to=%22Jan%20Hartmann%22%20<j.l.h.hartmann at uva.nl>)> skrev:
No, neither maxsize nor partials works. I guess that's just the way QGIS requests large WMS-images.
There is a "tile_metatile_level" configuration directive that should solve this problem:
https://mapserver.org/output/tile_mode.html (https://mapserver.org/output/tile_mode.html)
but it does not seem to work for WMS layers.
So I used the underlying PostGIS layer in QGIS, and that works OK, of course. Not sure if this is a bug in MapServer, though.
Thanks for your help,
Jan
On 10/16/2019 5:55 PM, Rahkonen Jukka (MML) wrote:
Hi,
Print composer is probably making tiled requests from WMS. That is compulsory for any bigger maps because the default maxsize on the Mapserver side is 2048x2048 pixels https://mapserver.org/uk/mapfile/map.html (https://mapserver.org/uk/mapfile/map.html). It is easy to increase the maxsize but I do not know if print composer as a client can be aware of that.
Partials FALSE may help, but based on the screenshot it is possible that print composer is making requests with some overlap.
-Jukka Rahkonen-
Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org> (mailto:mapserver-users-bounces at lists.osgeo.org) Puolesta Travis Kirstine
Lähetetty: keskiviikko 16. lokakuuta 2019 18.24
Vastaanottaja: Jan Hartmann <j.l.h.hartmann at uva.nl> (mailto:j.l.h.hartmann at uva.nl)
Kopio: MapServer-users <mapserver-users at lists.osgeo.org> (mailto:mapserver-users at lists.osgeo.org)
Aihe: Re: [mapserver-users] Doubling of labels on high resolution maps
There are a few options you could add to your label but I would start with
MINDISTANCE 200
PARTIALS FALSE
See
https://mapserver.org/mapfile/label.html (https://mapserver.org/mapfile/label.html)
On Wed, 16 Oct 2019 at 10:37, Jan Hartmann <j.l.h.hartmann at uva.nl (mailto:j.l.h.hartmann at uva.nl)> wrote:
Hi,
I'm trying to generate high resolution print maps with QGIS, based on a MapServer WMS layer. When displayed in the regular QGIS application with 72dpi, all looks fine. When using the Print Composer based on the same Mapfile, but with 300dpi, some labels are duplicated (not all). Some duplicates are clipped. The two versions can be seen here:
https://maps.hisgis.nl/marken_072dpi.png (https://maps.hisgis.nl/marken_072dpi.png)
https://maps.hisgis.nl/marken_300dpi.png (https://maps.hisgis.nl/marken_300dpi.png)
Below the Mapfile. Any idea what goes wrong here?
Jan
map
name Markegrenzen
web
metadata
"wms_title" "Markegrenzen"
"wms_srs" "EPSG:28992 EPSG:3857"
"wms_extent" "13000 301000 279000 620000"
"wms_enable_request" "*"
end
end
extent 13000 301000 279000 620000
units meters
size 400 400
resolution 300
defresolution 72
projection
"init=epsg:28992"
end
z
layer
name Markegrenzen
status on
type polygon
connectiontype postgis
connection "dbname=ov options='-c search_path=horigheid,public'"
data " the_geom from (
select gid,the_geom,naam from markegrenzen
) as foo using unique gid using srid=28992
"
labelitem "naam"
class
style
outlinecolor 255 0 0
width 1
end
label
color 255 0 0
size 4
end
end
end
end
_______________________________________________
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://lists.osgeo.org/mailman/listinfo/mapserver-users)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20191017/60fe051d/attachment.htm>
More information about the MapServer-users
mailing list