Spurred on by Zmitser, I've given some much needed love to the tileindex examples (see https://mapserver.org/optimization/tileindex.html#long-ogrtindex-example ). It doesn't answer Zmitser's exact questions but it hopefully helps the next person understand how to implement.

Also, pull requests are encouraged if you want to add more, to the documentation repository at https://github.com/MapServer/MapServer-documentation

Side note: this latest effort was kind of special to me, as in fact back in year 2004 I did a similar effort to give examples of tile4ms, notice the QGIS version 0.6 screen captures that I had made back in 2004, and now these tileindex examples use a more recent QGIS version of 3.18.1 ha. The circle of life. https://mapserver.org/utilities/tile4ms.html#long-example

-jeff



--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2021-03-24 4:02 a.m., Zmitser Kozhukh via mapserver-users wrote:
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.
Sincerely, Zmitser

    Среда, 24 марта 2021, 6:53 +03:00 от Carlos Ruiz
    <[email protected]>:
    Zmitser,
    You have to have the following on a MAP file:
    LAYER
    ...
    CONNECTION "host=<HOST> ... password=<PASSWORD>"
    CONNECTIONTYPE <CONNECTION_TYPE>
    DATA "<GEOM_COLUMN> FROM <TABLE NAME> USING UNIQUE <ID> USING
    SRID=<SRID>"
    ...
    END
    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.
    On Tuesday, March 23, 2021, 2:34:48 AM CST, Zmitser Kozhukh via
    mapserver-users <[email protected]
    </compose?To=mapserver%[email protected]>> wrote:
    Dear mapserver users, I need to specify data parameter at the
    location item of tileindex.
    So far, I have tried many possibilities but none works:
    ‘host=127.0.0.1 dbname=database user=admin password=admin DATA "geom
    from table using unique id using srid=4326"’
    or
    host=127.0.0.1 dbname=database user=admin password=admin data="geom
    from table using unique id using srid=4326"
    etc.
    Still I get an error :
    msDrawMap(): Image handling error. Failed to draw layer named
    'layer'. msPostGISLayerOpen(): Query error. Nothing specified in
    DATA statement.
    Could someone please tell in which format data statement should be?
    In documentation it is written vaguely:
    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.
    --
    Zmitser Kozhukh
    _______________________________________________
    mapserver-users mailing list
    [email protected]
    <//e.mail.ru/compose/?mailto=mailto%3amapserver%[email protected]>
    https://lists.osgeo.org/mailman/listinfo/mapserver-users
    <https://lists.osgeo.org/mailman/listinfo/mapserver-users>

--
Zmitser Kozhukh

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


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

Reply via email to