[mapserver-users] data parameter in tileindex

Zmitser Kozhukh zmitserk at mail.ru
Wed Mar 24 01:32:33 PDT 2021


Dear Jukka, you right with OGR it works. If I type something like:
"PG:"dbname=database host=127.0.0.1 port=5432 user=admin password=admin tables=objects_in_countryA(geom)""
It works. Because for OGR layer types, providing connection is enough.
But for PostGIS , also the data part need to be provided separately.
In fact , it is just a matter of interest for me. What will be faster , have it with OGR PostGIS driver or with native mapserver postgis driver (I assume if type of connection PostGIS mapserver uses its own driver for reading features).
I will let you know after I find out the way.
Sincerely, Zmitser
>Среда, 24 марта 2021, 10:43 +03:00 от Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi>:
> 
>Hi,
> 
>Obviously you are playing with vector data, not rasters, and you are trying to make a ogrtileindex instead of gdaltindex. I know, technically there is no difference.
> 
>I have used ogrtileindex with great success with shapefiles. I have never tried to do the same with PostGIS data and I can only wish you luck with your experiments. One thing that came into my mind it that perhaps OGR connection to PostGIS would work better than the native one with tileindex.
> 
>-Jukka Rahkonen-
> 
>Lähettäjä: mapserver-users < mapserver-users-bounces at lists.osgeo.org >  Puolesta  Zmitser Kozhukh via mapserver-users
>Lähetetty: keskiviikko 24. maaliskuuta 2021 9.03
>Vastaanottaja: Carlos Ruiz < boolean10001 at yahoo.com >
>Kopio: mapserver-users at lists.osgeo.org
>Aihe: Re: [mapserver-users] data parameter in tileindex
> 
>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 < boolean10001 at yahoo.com >:
>> 
>>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 < mapserver-users at lists.osgeo.org > 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
>>mapserver-users at lists.osgeo.org
>>https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
>--
>Zmitser Kozhukh
>  
 
 
--
Zmitser Kozhukh
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210324/adb64430/attachment-0001.html>


More information about the mapserver-users mailing list