<HTML><BODY><div><div>Thank you very much, Edward, for the suggestion. But I use tiles of vector data. And currently the problem is how to put postgis connection and data parameter in one (so that mapserver parses it correctly from location column of tileindex) .</div><div>With best regards, Zmitser</div><div><br> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Среда, 24 марта 2021, 10:45 +03:00 от Edward Mac Gillavry <emacgillavry@hotmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16165719471648779602_BODY"><div class="cl_582961"><div style="background-color:#ffffff; color:#212121">Zmister,</div><div style="background-color:#ffffff; color:#212121"> </div><div style="background-color:#ffffff; color:#212121">Check out the GH repo of the Amsterdam municipality. The MAP-file for 2020 is at <a href="https://github.com/Amsterdam/mapserver/blob/master/lufo2020.map" target="_blank">https://github.com/Amsterdam/mapserver/blob/master/lufo2020.map</a> where you can see the DATA connection to the Shape file that holds the tile index. The Shape files for the various years are in the folder <a href="https://github.com/Amsterdam/mapserver/tree/master/luchtfoto" target="_blank">https://github.com/Amsterdam/mapserver/tree/master/luchtfoto</a>. These were created using <span style="color: rgb(36, 41, 46);font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;font-size: 12px;background-color: rgb(255, 255, 255);display: inline !important;">gdaltindex </span><span style="font-size: 12pt;">as you can see in the bash script at </span><a style="font-size: 12pt;" href="https://github.com/Amsterdam/mapserver/blob/master/lufopyramids.sh" target="_blank">https://github.com/Amsterdam/mapserver/blob/master/lufopyramids.sh</a>. That's where you pass the location of the GeoTIFFs to populate the column in the Shape files so MapServer can open the required GeoTIFFs to generate an image  Hopefully these practical examples guide you.</div><div style="background-color:#ffffff; color:#212121"> </div><div style="background-color:#ffffff; color:#212121">Best,</div><div style="background-color:#ffffff; color:#212121"> </div><div style="background-color:#ffffff; color:#212121">Edward</div><div style="background-color:#ffffff; color:#212121"> </div><div style="background-color:#ffffff; color:#212121"> </div><div id="ms-outlook-mobile-signature_mr_css_attr"> </div><div id="ms-outlook-mobile-signature_mr_css_attr"> </div><div id="ms-outlook-mobile-signature_mr_css_attr"><a href="https://aka.ms/AAb9ysg" target="_blank">Outlook voor Android</a> downloaden</div><hr style="display:inline-block;width:98%"><div id="divRplyFwdMsg_mr_css_attr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> mapserver-users <<a href="/compose?To=mapserver%2dusers%2dbounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>> on behalf of Zmitser Kozhukh via mapserver-users <<a href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br><b>Sent:</b> Wednesday, March 24, 2021 8:02:45 AM<br><b>To:</b> Carlos Ruiz <<a href="/compose?To=boolean10001@yahoo.com">boolean10001@yahoo.com</a>><br><b>Cc:</b> <a href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> <<a href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br><b>Subject:</b> Re: [mapserver-users] data parameter in tileindex</font><div> </div></div><div><div><div>Dear Carlos, it is not about mapfile, it is in location cell of tileindex. It is one cell in table (database table, dbf file etc.), and I need to put there both connection and data details. The question is how to make it so that mapserver parses it correctly.</div><div>Sincerely, Zmitser</div> <blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px"><span>Среда, 24 марта 2021, 6:53 +03:00 от Carlos Ruiz <<a href="/compose?To=boolean10001@yahoo.com">boolean10001@yahoo.com</a>>:<br>  </span><div><div id=""><div class="x_js-helper_mr_css_attr x_js-readmsg-msg_mr_css_attr"><div><div id="x_style_16165579951276773355_BODY_mr_css_attr"><div class="x_cl_597328_mr_css_attr"><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; font-size:13px" class="x_ydpe19f82e2yahoo-style-wrap_mr_css_attr_mr_css_attr"><div>Zmitser,</div><div> </div><div>You have to have the following on a MAP file:</div><div> </div><div>LAYER</div><div> </div><div>...</div><div> </div><div>CONNECTION "host=<HOST> ... password=<PASSWORD>"</div><div>CONNECTIONTYPE <CONNECTION_TYPE></div><div>DATA "<GEOM_COLUMN> FROM <TABLE NAME> USING UNIQUE <ID> USING SRID=<SRID>"</div><div> </div><div>...</div><div> </div><div>END</div><div> </div><div>On DATA you must specify the name of the geometry column and the table, if you're using a database. If you are using a shape file you just have to include the DATA keyword with the path and the name of the SHP file.</div><div> </div><div> </div></div><div id="x_ydp4a9c06dayahoo_quoted_6860825563_mr_css_attr_mr_css_attr" class="x_ydp4a9c06dayahoo_quoted_mr_css_attr_mr_css_attr"><div style="color:#26282a; font-family:'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:13px"><div>On Tuesday, March 23, 2021, 2:34:48 AM CST, Zmitser Kozhukh via mapserver-users <<a>mapserver-users@lists.osgeo.org</a>> wrote:</div><div> </div><div> </div><div><div id="x_ydp4a9c06dayiv6459760804_mr_css_attr_mr_css_attr"><div><div>Dear mapserver users, I need to specify data parameter at the location item of tileindex.</div><div>So far, I have tried many possibilities but none works:<br>‘host=127.0.0.1 dbname=database user=admin password=admin DATA "geom from table using unique id using srid=4326"’</div><div>or</div><div>host=127.0.0.1 dbname=database user=admin password=admin data="geom from table using unique id using srid=4326"</div><div>etc.</div><div>Still I get an error :</div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:13px;font-style:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;display:inline!important;float:none">msDrawMap(): Image handling error. Failed to draw layer named 'layer'. msPostGISLayerOpen(): Query error. Nothing specified in DATA statement.</span></div><div><div>Could someone please tell in which format data statement should be?</div></div><div>In documentation it is written vaguely:</div><div><span style="color:rgb(62,67,73);font-family:Arial,sans-serif;font-size:12.8px;font-style:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline!important;float:none">Normally the location should contain the path to the tile file relative to the shapepath, not relative to the tileindex itself. If the DATA parameter contains a value then it is added to the end of the location.</span></div><div> </div><div><div><div>--<br>Zmitser Kozhukh</div></div></div></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></div></div></div></div></div></div></div></div></div></blockquote> <div> </div><div><div><div>--<br>Zmitser Kozhukh</div></div></div><div> </div></div></div></div></div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Zmitser Kozhukh</div></div></div><div> </div></div></BODY></HTML>