[mapserver-users] Rendering of Symbols outside map window

deduikertjes deduikertjes at xs4all.nl
Thu Feb 18 12:09:41 PST 2016


My pull request (https://github.com/mapserver/mapserver/pull/5199) 
implements a gutter in WMS mode.

It is rather unobtrusive and straightforward. I am using it in 
production for quit some time now.
I could not find any side effects, but I did not try in combination with 
labeling or extremely large symbols.

Maybe a nice moment to review and/ or test by Patrick?

MArco

On 17-02-16 18:01, Lime, Steve D (MNIT) wrote:
>
> My memory is lousy I guess. Expanding the search rect used based on 
> style sizes and to account for the use case Thomas mentions seems 
> logical to me (more efficient), that or a gutter (probably easier). 
> Needs a small RFC IMHO as I’m sure there would be side effects.
>
> In terms of what might be done immediately in Patrick’s case.
>
> -I wonder if using CIRCLE shapes might work. A circle must be defined 
> by a minimum bounding rectangle. That is, two points that define the 
> smallest square that can contain it. These two points are the two 
> opposite corners of said box. Since the which shapes function operates 
> on bounding boxes it should identify any of the circles that intersect 
> the map extent.
>
> -Issues like this are also handled correctly with tiling (mapcache) if 
> I’m not mistaken – and you can define a metatile gutter. Maybe that 
> could be used. You could set up tiling and then make arbitrary WMS 
> calls against mapcache if you had to, or even just use the tiles directly.
>
> -Go the PostGIS route as suggested by Ambrogio…
>
> Steve
>
> *From:*deduikertjes [mailto:deduikertjes at xs4all.nl]
> *Sent:* Tuesday, February 16, 2016 1:44 AM
> *To:* thomas bonfort <thomas.bonfort at gmail.com>; Lime, Steve D (MNIT) 
> <Steve.Lime at state.mn.us>
> *Cc:* Patrick Meis <Meis at stadt-muenster.de>; 
> mapserver-users at lists.osgeo.org
> *Subject:* Re: [mapserver-users] Rendering of Symbols outside map window
>
>
> >>>That's something we may want to fix.
>
> If I remember correctly, Mapserver in  tile mode draws a slightly 
> larger tile and crops that one (something configurable with GUTTER or 
> so). I wrote my the code in my pull request along the same principle.
> Adjusting the query extent when doing whichshapes() and account for 
> the size of symbols when adjusting  the clipping rectangle once the 
> feature is obtained might be more efficient?
>
> But maybe this discussion shoud be done in mapserver-dev?
>
> MArco
>
> On 15-02-16 21:23, thomas bonfort wrote:
>
>     Steve,
>
>     IIRC, we account for the size of symbols when adjusting our
>     clipping rectangle once we have obtained a feature, but we do not
>     adjust the query extent when doing whichshapes(). That's something
>     we may want to fix.
>
>     Another use-case would also be when the DATA statement does
>     something like "ST_Buffer(the_geom,...) as the geom"
>
>     --
>
>     thomas
>
>     On 15 February 2016 at 17:44, Lime, Steve D (MNIT)
>     <Steve.Lime at state.mn.us <mailto:Steve.Lime at state.mn.us>> wrote:
>
>         I know. We use to account for that explicitly.
>
>         ------------------------------------------------------------------------
>
>         *From:*deduikertjes [deduikertjes at xs4all.nl
>         <mailto:deduikertjes at xs4all.nl>]
>         *Sent:* Monday, February 15, 2016 2:44 AM
>         *To:* Lime, Steve D (MNIT); Patrick Meis
>
>
>         *Cc:* mapserver-users at lists.osgeo.org
>         <mailto:mapserver-users at lists.osgeo.org>
>         *Subject:* Re: [mapserver-users] Rendering of Symbols outside
>         map window
>
>         Steve,
>
>         I think the key part in the question is here:
>
>         " and the center point of the symbol is no longer inside the
>         map window".
>
>         To my experience a symbol doesn't get drawn at all when the
>         point which is symbolized is outside the requested extent (WMS
>         mode at least).
>
>         To solve that I created the mentioned pull request.
>
>         Or do I miss something?
>
>         MArco
>
>
>         On 13-02-16 00:17, Lime, Steve D (MNIT) wrote:
>
>             This should already be happening. The drawing code
>             traverses a layer's class/styles to commute a selection
>             and clipping rectangle that is larger than the map extent.
>
>             ------------------------------------------------------------------------
>
>             *From:*mapserver-users
>             [mapserver-users-bounces at lists.osgeo.org
>             <mailto:mapserver-users-bounces at lists.osgeo.org>] on
>             behalf of mdprive [deduikertjes at xs4all.nl
>             <mailto:deduikertjes at xs4all.nl>]
>             *Sent:* Friday, February 12, 2016 4:15 PM
>             *To:* Patrick Meis
>             *Cc:* mapserver-users at lists.osgeo.org
>             <mailto:mapserver-users at lists.osgeo.org>
>             *Subject:* Re: [mapserver-users] Rendering of Symbols
>             outside map window
>
>             Hi Patrick,
>
>             i've submitted a pull request for extending the map by a
>             buffer and then clipping it, so that partial symbols on
>             the edge get rendered as well (wms non tiled mode).
>
>             maybe you can build from sources and use this patch to
>             solve your problem.
>
>             marco
>
>             -- 
>
>
>             Op 11 feb. 2016 om 21:54 heeft Ambrogio Foletti
>             <afoletti at gmail.com <mailto:afoletti at gmail.com>> het
>             volgende geschreven:
>
>                 Hello Patrick,
>
>                 if you are using PostGIS as datasource, I would solve
>                 the problem by integrating a st_buffer in the DATA
>                 element itself ;) The added bonus is that you will get
>                 the attribute values from a GetFeatureInfo (if
>                 implemented) in the whole buffer zone.
>
>                 If not, you can try to use tile mode, and add some
>                 metabuffer (see mapserver doc
>                 <http://mapserver.org/output/tile_mode.html>)
>
>                 Cheers!
>
>                 A. Foletti
>
>                 2016-02-05 10:58 GMT+01:00 Patrick Meis
>                 <Meis at stadt-muenster.de <mailto:Meis at stadt-muenster.de>>:
>
>                     Hallo,
>
>                     i have stumbled on a problem.
>
>                     I am simulating a buffering of point-data with the
>                     help of symbols, which I have set to
>
>                     sizeunit = meters
>
>                     size = 760
>
>                     These rather big symbols disappear from my map
>                     when I zoom in and
>
>                     the center point of the symbol is no longer inside
>                     the map window.
>
>                     But a significant part of the symbol should still
>                     be displayed.
>
>                     Is there any possibility of extending the rendered
>                     map, so that the symbols of my points
>
>                     are still rendered even when they are outside my
>                     map window?
>
>                     Greetz
>
>                     Patrick
>
>
>                     _______________________________________________
>                     mapserver-users mailing list
>                     mapserver-users at lists.osgeo.org
>                     <mailto:mapserver-users at lists.osgeo.org>
>                     http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>         _______________________________________________
>         mapserver-users mailing list
>         mapserver-users at lists.osgeo.org
>         <mailto:mapserver-users at lists.osgeo.org>
>         http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160218/e41bf1da/attachment-0001.html>


More information about the mapserver-users mailing list