layer with "truncated" symbols 2

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

layer with "truncated" symbols 2

Leehan
Hello,

Here i am again with nealry the same problem : it now seems that red circles
are cut by osm tiles.
Whatever symbol, the result is the same. I am running out of idea.

<http://osgeo-org.1560.x6.nabble.com/file/t372757/Annotation_2020-03-25_145605.jpg>






--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Jörg Thomsen (WhereGroup)
are there any layer extents of the cities defined?

Jörg

Am 25.03.20 um 15:02 schrieb Leehan:

> Hello,
>
> Here i am again with nealry the same problem : it now seems that red circles
> are cut by osm tiles.
> Whatever symbol, the result is the same. I am running out of idea.
>
> <http://osgeo-org.1560.x6.nabble.com/file/t372757/Annotation_2020-03-25_145605.jpg>
>
>
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


Viele Grüße,
Jörg Thomsen

--

Jörg Thomsen
WhereGroup GmbH
Bundesallee 23
10717 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11

[hidden email]
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

jmckenna
Administrator
In reply to this post by Leehan
Be aware of QGIS issue with caching GetCapabilities/images as well
(which I point to at bottom of
https://github.com/mapserver/mapserver/wiki/Get-the-Raw-WMS-Request-Generated-by-QGIS 
)

Something to always be aware of when battling QGIS+MapServer tasks.

Likely not your issue, but it's a good thing to mention here anyway.

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/



On 2020-03-25 11:02 a.m., Leehan wrote:

> Hello,
>
> Here i am again with nealry the same problem : it now seems that red circles
> are cut by osm tiles.
> Whatever symbol, the result is the same. I am running out of idea.
>
> <http://osgeo-org.1560.x6.nabble.com/file/t372757/Annotation_2020-03-25_145605.jpg>
>
>
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Leehan
In reply to this post by Jörg Thomsen (WhereGroup)
By cities, you mean extent for the grey polygons ?
If so, nope.
So I can try with an EXTENT definition.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Jörg Thomsen (WhereGroup)
Am 25.03.20 um 16:46 schrieb Leehan:
> By cities, you mean extent for the grey polygons ?

no, I thoght the center of the red circles were citie-points...
doesn't make sense. Perhaps qgis requests your wms as tiles?

see jeff's advice.  I have no more ideas at the moment.

Jörg

> If so, nope.
> So I can try with an EXTENT definition.
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


Viele Grüße,
Jörg Thomsen

--

Jörg Thomsen
WhereGroup GmbH
Bundesallee 23
10717 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11

[hidden email]
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Leehan
I am not using qgis : It s an Openlayers + Mapserver application ;



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

TC Haddad

Can you configure Openlayers to not send tiled WMS requests to Mapserver?

If you still want to send tiled requests, you could try setting up MapCache to see if it improves the situation.

On Thu, Mar 26, 2020 at 1:09 AM Leehan <[hidden email]> wrote:
I am not using qgis : It s an Openlayers + Mapserver application ;



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Steve Lime-2
With symbols MapServer typically handles this situation by adjusting the extent used to select features based on the largest symbol size - so features just off the edge of the map are still rendered partially. That said, based on your sample graphic it looks like you're setting the size of the circles dynamically using attribute binding? If so, MapServer wouldn't have access to those values ahead of time to adjust the selection extent. One idea might be to somehow add something in the red circle layer to force that computation, I'd have to see the layer definition to be sure but you could try adding a dummy class with a size value that represents the largest expected size. So:

LAYER
  NAME 'red_circles'
  ...
  CLASS # this class is never drawn
    EXPRESSION 'dummy'
    STYLE SYMBOL 'cicle' SIZE 175 COLOR 0 0 0 END
  END
  CLASS
    # your normal red circle class
  END

Of course this forces the larger selection extent for all tiles but it could work and if the data isn't particularly big it wouldn't add too much overhead.

--Steve

On Thu, Mar 26, 2020 at 12:49 PM TC Haddad <[hidden email]> wrote:

Can you configure Openlayers to not send tiled WMS requests to Mapserver?

If you still want to send tiled requests, you could try setting up MapCache to see if it improves the situation.

On Thu, Mar 26, 2020 at 1:09 AM Leehan <[hidden email]> wrote:
I am not using qgis : It s an Openlayers + Mapserver application ;



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Leehan
following your advice, I added quedalle classe :

...
LAYER
        NAME "nombre de cas"
        TYPE POINT
        PROJECTION
                "init=epsg:2154"
        END
        EXTENT 276838.0988 4584246.823 909596.998 8872270.142
        CONNECTIONTYPE POSTGIS
        CONNECTION blabla
        LABELITEM "nb_cas"
        CLASS
         EXPRESSION "quedalle"
         STYLE
                SYMBOL "circle"
                SIZE 150
                COLOR 0 0 0
         END
        END
        CLASS
                STYLE
                        SYMBOL "cas"
                        SIZE [ln_nb_cas]
                        COLOR [couleur]
                        OPACITY 70
                END #fin style
                LABEL
                        COLOR 0 0 0
                        OUTLINECOLOR 255 255 255
                        FONT "verdana-gras"
                        TYPE truetype
                        SIZE 8
                END
        END #fin class

And indeed I am using an attribute for red circle size.
But the result is still the same.
(I can't believe I am the first to experience this issue!)
If it can help, here is a snap with the dummy class :
<http://osgeo-org.1560.x6.nabble.com/file/t372757/map.png>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

jratike80
In reply to this post by Leehan
Hi,

Your problem is on the client side. OpenLayers is now requesting tiles with 256x256 pixels. The middle tile has not any point inside its bounding box and therefore no symbols are rendered. Configure OpenLayers to do single tile requests.

http://dev.openlayers.org/examples/single-tile.html

Posts from gis.stackexchange dealing with this common issue with tiling clients:
https://gis.stackexchange.com/questions/198450/need-clarification-on-geoserver-meta-tile
https://gis.stackexchange.com/questions/87116/geoserver-cutting-off-symbols-close-to-tile-edges/87123#87123
https://gis.stackexchange.com/questions/83033/single-tiled-mapserver-wms-to-avoid-labels-and-features-cut-along-tile-borders-a

Duplicated labels is another version of the same issue
https://www.geowebcache.org/docs/current/concepts/metatiles.html

Using some tile cache program like MapProxy, MapCache of GeoWebCache between OpenLayers and WMS is another way to resolve the problem.

-Jukka Rahkonen-


-----Alkuperäinen viesti-----
Lähettäjä: mapserver-users <[hidden email]> Puolesta Leehan
Lähetetty: perjantai 27. maaliskuuta 2020 11.27
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] layer with "truncated" symbols 2

following your advice, I added quedalle classe :

...
LAYER
        NAME "nombre de cas"
        TYPE POINT
        PROJECTION
                "init=epsg:2154"
        END
        EXTENT 276838.0988 4584246.823 909596.998 8872270.142
        CONNECTIONTYPE POSTGIS
        CONNECTION blabla
        LABELITEM "nb_cas"
        CLASS
         EXPRESSION "quedalle"
         STYLE
                SYMBOL "circle"
                SIZE 150
                COLOR 0 0 0
         END
        END
        CLASS
                STYLE
                        SYMBOL "cas"
                        SIZE [ln_nb_cas]
                        COLOR [couleur]
                        OPACITY 70
                END #fin style
                LABEL
                        COLOR 0 0 0
                        OUTLINECOLOR 255 255 255
                        FONT "verdana-gras"
                        TYPE truetype
                        SIZE 8
                END
        END #fin class

And indeed I am using an attribute for red circle size.
But the result is still the same.
(I can't believe I am the first to experience this issue!) If it can help, here is a snap with the dummy class :
<http://osgeo-org.1560.x6.nabble.com/file/t372757/map.png>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Leehan
Thanks for all these links.
I read most of them and understood a very few. I tried to find the simplest
solution for me.
In OL doc, I noticed a gutter option for ol/source/TileWMS. According to
this, on Mapserver side, there was a parameter to adjust :
tile_map_edge_buffer, I never found where to modify it !
So as a start, I only added a "gutter: 50" on my js file. As far as I
understand : a buffer is created around red circle so symbols are "cut" but
farther so they appear entirely. It was enough.
<http://osgeo-org.1560.x6.nabble.com/file/t372757/map.png>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: *NAMESPRO.CA Detected Spam* Re: layer with "truncated" symbols 2

jmckenna
Administrator
To help give back to the community (from all the good support you
received), you could take your mapfile layer, issue description, images,
and solution, and document it on the MapServer wiki in the "Tips,
Tricks, Howto" section at https://github.com/mapserver/mapserver/wiki

thanks,

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/



On 2020-03-27 8:36 a.m., Leehan wrote:

> Thanks for all these links.
> I read most of them and understood a very few. I tried to find the simplest
> solution for me.
> In OL doc, I noticed a gutter option for ol/source/TileWMS. According to
> this, on Mapserver side, there was a parameter to adjust :
> tile_map_edge_buffer, I never found where to modify it !
> So as a start, I only added a "gutter: 50" on my js file. As far as I
> understand : a buffer is created around red circle so symbols are "cut" but
> farther so they appear entirely. It was enough.
> <http://osgeo-org.1560.x6.nabble.com/file/t372757/map.png>  

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Steve Lime-2
In reply to this post by Leehan
It's the dynamic size that's causing the issues. I still think this could work (on the server side) but I'll need to work up my own test case to avoid a bunch of back and forth. --Steve

On Fri, Mar 27, 2020 at 4:27 AM Leehan <[hidden email]> wrote:
following your advice, I added quedalle classe :

...
LAYER
        NAME "nombre de cas"
        TYPE POINT
        PROJECTION
                "init=epsg:2154"
        END
        EXTENT 276838.0988 4584246.823 909596.998 8872270.142
        CONNECTIONTYPE POSTGIS
        CONNECTION blabla
        LABELITEM "nb_cas"
        CLASS
         EXPRESSION "quedalle"
         STYLE
                SYMBOL "circle"
                SIZE 150
                COLOR 0 0 0
         END
        END
        CLASS
                STYLE
                        SYMBOL "cas"
                        SIZE [ln_nb_cas]
                        COLOR [couleur]
                        OPACITY 70                     
                END #fin style
                LABEL
                        COLOR 0 0 0
                        OUTLINECOLOR 255 255 255
                        FONT "verdana-gras"
                        TYPE truetype
                        SIZE 8
                END
        END #fin class

And indeed I am using an attribute for red circle size.
But the result is still the same.
(I can't believe I am the first to experience this issue!)
If it can help, here is a snap with the dummy class :
<http://osgeo-org.1560.x6.nabble.com/file/t372757/map.png>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: layer with "truncated" symbols 2

Steve Lime-2
In reply to this post by Leehan
The parameter tile_map_edge_buffer applies *only* to MapServer CGI with mode=tile (https://mapserver.org/output/tile_mode.html). It's set as a METADATA property within the WEB object (I think). The gutter parameter has a similar effect. I assume it's padding the WMS extent sent to MapServer and requesting a larger image. You could look at the WMS URLs being requested with that parameter set to 0 and to 50 to be sure.

--Steve

On Fri, Mar 27, 2020 at 6:36 AM Leehan <[hidden email]> wrote:
Thanks for all these links.
I read most of them and understood a very few. I tried to find the simplest
solution for me.
In OL doc, I noticed a gutter option for ol/source/TileWMS. According to
this, on Mapserver side, there was a parameter to adjust :
tile_map_edge_buffer, I never found where to modify it !
So as a start, I only added a "gutter: 50" on my js file. As far as I
understand : a buffer is created around red circle so symbols are "cut" but
farther so they appear entirely. It was enough.
<http://osgeo-org.1560.x6.nabble.com/file/t372757/map.png>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users