Re: Doubling of labels on high resolution maps

Travis Kirstine <[email protected]> Wed, 16 Oct 2019 11:23:55 -0400
Newsgroups gmane.comp.gis.mapserver.user
Message-ID <CALtm4h3pB9SnHJGG5-17Zp0GdhKp=xFUcjeiTvNA8TVcM-GTrA@mail.gmail.com>
--===============6051818540943089399==
Content-Type: multipart/alternative; boundary="00000000000023252d059508b14f"

--00000000000023252d059508b14f
Content-Type: text/plain; charset="UTF-8"

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



On Wed, 16 Oct 2019 at 10:37, Jan Hartmann <[email protected]> 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_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
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users

--00000000000023252d059508b14f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>There are a few options you could add to your label b=
ut I would start with<br></div><div><br></div><div>
MINDISTANCE 200<br></div><div>PARTIALS FALSE</div><div><br></div><div>See</=
div><div><a href=3D"https://mapserver.org/mapfile/label.html">https://mapse=
rver.org/mapfile/label.html</a></div><div><br></div><div><br></div></div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, =
16 Oct 2019 at 10:37, Jan Hartmann &lt;<a href=3D"mailto:j.l.h.hartmann@uva=
.nl">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">
 =20

   =20
 =20
  <div bgcolor=3D"#FFFFFF">
    <div style=3D"font-family:monospace;font-size:14px" lang=3D"x-unicode">=
Hi,
      <br>
      <br>
      I&#39;m trying to generate high resolution print maps with QGIS, base=
d
      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:<br>
      <br>
      <a href=3D"https://maps.hisgis.nl/marken_072dpi.png" target=3D"_blank=
">https://maps.hisgis.nl/marken_072dpi.png</a><br>
      <a href=3D"https://maps.hisgis.nl/marken_300dpi.png" target=3D"_blank=
">https://maps.hisgis.nl/marken_300dpi.png</a><br>
      <br>
      Below the Mapfile.=C2=A0 Any idea what goes wrong here?
      <br>
      <br>
      Jan
      <br>
      <br>
      map
      <br>
      name Markegrenzen
      <br>
      <br>
      web
      <br>
      =C2=A0 metadata
      <br>
      =C2=A0=C2=A0=C2=A0 &quot;wms_title&quot; &quot;Markegrenzen&quot;
      <br>
      =C2=A0=C2=A0=C2=A0 &quot;wms_srs&quot; &quot;EPSG:28992 EPSG:3857&quo=
t;
      <br>
      =C2=A0=C2=A0=C2=A0 &quot;wms_extent&quot;=C2=A0 &quot;13000 301000 27=
9000 620000&quot;
      <br>
      =C2=A0=C2=A0=C2=A0 &quot;wms_enable_request&quot; &quot;*&quot;
      <br>
      =C2=A0 end
      <br>
      end
      <br>
      <br>
      extent 13000 301000 279000 620000
      <br>
      units meters
      <br>
      size 400 400
      <br>
      resolution 300
      <br>
      defresolution 72
      <br>
      <br>
      <br>
      projection
      <br>
      =C2=A0 &quot;init=3Depsg:28992&quot;
      <br>
      end
      <br>
      <br>
      z
      <br>
      layer
      <br>
      =C2=A0 name Markegrenzen
      <br>
      =C2=A0 status on
      <br>
      =C2=A0 type polygon
      <br>
      =C2=A0 connectiontype postgis
      <br>
      =C2=A0 connection &quot;dbname=3Dov options=3D&#39;-c search_path=3Dh=
origheid,public&#39;&quot;
      <br>
      =C2=A0 data &quot; the_geom from (
      <br>
      =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 select gid,the_geom,naam f=
rom markegrenzen
      <br>
      =C2=A0=C2=A0=C2=A0 ) as foo using unique gid using srid=3D28992
      <br>
      =C2=A0 &quot;
      <br>
      =C2=A0 labelitem &quot;naam&quot;
      <br>
      =C2=A0 class
      <br>
      =C2=A0=C2=A0=C2=A0 style
      <br>
      =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 outlinecolor 255 0 0
      <br>
      =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 width 1
      <br>
      =C2=A0=C2=A0=C2=A0 end
      <br>
      =C2=A0=C2=A0=C2=A0 label
      <br>
      =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 color 255 0 0
      <br>
      =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 size 4
      <br>
      =C2=A0=C2=A0=C2=A0 end
      <br>
      =C2=A0 end
      <br>
      end
      <br>
      end
      <br>
      <br>
      <br>
    </div>
  </div>

_______________________________________________<br>
mapserver-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">mapser=
[email protected]</a><br>
<a href=3D"https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel=3D=
"noreferrer" target=3D"_blank">https://lists.osgeo.org/mailman/listinfo/map=
server-users</a></blockquote></div>

--00000000000023252d059508b14f--

--===============6051818540943089399==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbWFwc2VydmVy
LXVzZXJzIG1haWxpbmcgbGlzdAptYXBzZXJ2ZXItdXNlcnNAbGlzdHMub3NnZW8ub3JnCmh0dHBz
Oi8vbGlzdHMub3NnZW8ub3JnL21haWxtYW4vbGlzdGluZm8vbWFwc2VydmVyLXVzZXJz

--===============6051818540943089399==--