<HTML><BODY><div>Hi Steve: thanks for the advice!<br>I will implement Tile buffer logic in python.<br> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Суббота, 10 апреля 2021, 0:19 +03:00 от Steve Lime <sdlime@gmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16180031891629962843_BODY"><div class="cl_178657"><div>Looks like I misspoke. I checked the code and it shows tile_map_edge_buffer being limited to mode=tile only. I don't think that param has any impact on the test you referenced.<div> </div><div>There's another metadata parameter that is more generally useful with metatile generation called "labelcache_map_edge_buffer". It reserves space around the edge of the map to deal with labels at the edge of tiles. Typically you generate metatiles and then carve them up into actual tiles. Mode=tile only generates single tiles which limits utility although it has its place.</div><div> </div><div>I think if you really wanted similar behaviour for your script to mode=tile you'd have to replicate that logic in your python code - so create a larger image and then clip out the center. What is your ultimate goal?</div><div> </div></div> <div class="gmail_quote_mr_css_attr"><div class="mail-quote-collapse"><div class="gmail_attr_mr_css_attr"><span>On Mon, Apr 5, 2021 at 5:57 PM Baev Alexandr <<a href="//e.mail.ru/compose/?mailto=mailto%3aoldbay@bk.ru">oldbay@bk.ru</a>> wrote:</span></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote_mr_css_attr"><div><div>Нi Steve: Тhanks for the answer!<br><br>Are there features of activating tile mode for mapscript? Whether it is necessary to pass in the request variable <strong>mode=tile</strong> (as mapserv CGI), or <strong>TILED=TRUE</strong> (as test in git version <a href="https://github.com/MapServer/MapServer/blob/main/msautotest/wxs/wms_tiled.map" target="_blank">https://github.com/MapServer/MapServer/blob/main/msautotest/wxs/wms_tiled.map</a> … something like a geoserver).<br>By simply including metadata tile_map_edge_buffer - tile buffer does not work for me.<br><br>My Mapfile header (this template):<br><br> MAP<br> NAME "test map"<br> SIZE 1280 1024<br> MAXSIZE 4096<br> UNITS meters<br> IMAGETYPE PNG<br> EXTENT {{extent_x_min}} {{extent_y_min}} {{extent_x_max}} {{extent_y_max}}<br> IMAGECOLOR 255 255 255 <br> SYMBOLSET "{{symbolset}}"<br> FONTSET "{{fontset}}"<br> WEB<br> METADATA<br> "tile_map_edge_buffer" "64"<br> wms_title "test map"<br> wms_featureinfoformat "text/plain"<br> wms_srs "EPSG:3857 EPSG:32638 EPSG:4326" <br> wms_enable_request "*"<br> wms_encoding "UTF8"<br> END<br> END<br> PROJECTION<br> "init=epsg:{{db_epsg}}"<br> END<br> <div> LAYER<br> NAME "test layer"</div><div> PROCESSING "LABEL_NO_CLIP=True"<br> PROCESSING "CLOSE_CONNECTION=DEFER"<br> EXTENT {{extent_x_min}} {{extent_y_min}} {{extent_x_max}} {{extent_y_max}}</div><div> PROJECTION<br> "init=epsg:{{db_epsg}}"<br> END<br> METADATA<br> wms_title "test layer"<br> END<br> CONNECTIONTYPE postgis<br> CONNECTION "{{db_string}}"<br> DATA "{{query_string}}"<br> STATUS ON<br> TYPE POLYGON<br> </div><div> ……...<br> </div>Runing this on python mapscript:<br><br> map_obj = mapscript.mapObj(mapfile) #mapfile described earlier<div> request = mapscript.OWSRequest()<br> mapscript.msIO_installStdoutToBuffer()<br> request.loadParamsFromURL(query_string) #query_string — request of web framework<br> status_id = map_obj.OWSDispatch(request)</div><div> content_type = mapscript.msIO_stripStdoutBufferContentType()<br> result = mapscript.msIO_getStdoutBufferBytes()<br> mapscript.msIO_resetHandlers()</div><br>Сan this work in tile mode? Тhanks in advance!<br><br>Baev Alexandr<br><a href="http://e.mail.ru/compose/?mailto=mailto%3aoldbay@bk.ru" target="_blank">oldbay@bk.ru</a><br> <blockquote style="border-left:1px solid rgb(8,87,166);margin:10px;padding:0px 0px 0px 10px"><span>Вторник, 6 апреля 2021, 0:33 +03:00 от Steve Lime <<a href="//e.mail.ru/compose/?mailto=mailto%3asdlime@gmail.com">sdlime@gmail.com</a>>:<br> </span><div><div id="gmail-m_6609743925172285719_mr_css_attr"><div><div><div id="gmail-m_6609743925172285719style_16176584120064615095_BODY_mr_css_attr"><div><div>Hi Baev: That metadata element is used by the tile mode and by the WMS/GetMap code. So a WMS GetMap request though MapScript should make use of it. --Steve</div> <div><div><div><span><span>On Sun, Apr 4, 2021 at 2:39 PM Baev Alexandr via mapserver-users <<a href="http://e.mail.ru/compose/?mailto=mailto%3amapserver%2dusers@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>> wrote:</span></span></div><div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Mapserver last release version 7.6.2 </div><div>Will tile_map_edge_buffer work in python mapscript? Or does it only work with mapserv CGI (mode=tile)?<br>If it works, what should be done? Additional configuration may be required mapscript.OWSRequest() ?</div><div> </div><div>Help me, please!</div><div><br>Baev Alexandr<br><a href="http://e.mail.ru/compose/?mailto=mailto%3aoldbay@bk.ru" target="_blank">oldbay@bk.ru</a></div></div>_______________________________________________<br>mapserver-users mailing list<br><a href="http://e.mail.ru/compose/?mailto=mailto%3amapserver%2dusers@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></blockquote></div></div></div></div></div></div></div></div></div></div></blockquote> <div> </div><div><div><div>С уважением,<br>Baev Alexandr<br><a href="//e.mail.ru/compose/?mailto=mailto%3aoldbay@bk.ru">oldbay@bk.ru</a></div></div></div><div> </div></div></div></blockquote></div></div></div></div></div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>С уважением,<br>Baev Alexandr<br>oldbay@bk.ru</div></div></div><div> </div></div></BODY></HTML>