[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-users
Subject:    Re: [mapserver-users] =?utf-8?q?data_parameter_in_tileindex?=
From:       Zmitser Kozhukh via mapserver-users <mapserver-users () lists ! osgeo ! org>
Date:       2021-03-24 8:58:00
Message-ID: 1616576279.909857355 () f152 ! i ! mail ! ru
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]


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) . With best \
regards, Zmitser

  
> Среда, 24 марта 2021, 10:45 +03:00 от Edward Mac Gillavry \
> <emacgillavry@hotmail.com>: 
> Zmister,
> 
> Check out the GH repo of the Amsterdam municipality. The MAP-file for 2020 is at  \
> https://github.com/Amsterdam/mapserver/blob/master/lufo2020.map  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  \
> https://github.com/Amsterdam/mapserver/tree/master/luchtfoto . These were created \
> using  gdaltindex  as you can see in the bash script at  \
> https://github.com/Amsterdam/mapserver/blob/master/lufopyramids.sh . 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. 
> Best,
> 
> Edward
> 
> 
> 
> 
> Outlook voor Android downloaden
> ----------------------------------------------------------------------
> From: mapserver-users < mapserver-users-bounces@lists.osgeo.org > on behalf of \
>                 Zmitser Kozhukh via mapserver-users < \
>                 mapserver-users@lists.osgeo.org >
> Sent: Wednesday, March 24, 2021 8:02:45 AM
> To: Carlos Ruiz < boolean10001@yahoo.com >
> Cc: mapserver-users@lists.osgeo.org < mapserver-users@lists.osgeo.org >
> Subject: 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@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@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@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users 
> 
> 
> --
> Zmitser Kozhukh
> 
 
 
--
Zmitser Kozhukh
 


[Attachment #5 (text/html)]


<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&nbsp;of tileindex) .</div><div>With best regards, \
Zmitser</div><div><br>&nbsp;</div><blockquote style="border-left:1px solid #0857A6; \
margin:10px; padding:0 0 0 10px;">Среда, 24 марта 2021, 10:45 +03:00 от \
Edward Mac Gillavry &lt;emacgillavry@hotmail.com&gt;:<br>&nbsp;<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">&nbsp;</div><div style="background-color:#ffffff; color:#212121">Check \
out the GH repo of the Amsterdam municipality. The MAP-file for 2020 is at&nbsp;<a \
href="https://github.com/Amsterdam/mapserver/blob/master/lufo2020.map" \
target="_blank">https://github.com/Amsterdam/mapserver/blob/master/lufo2020.map</a>&nbsp;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&nbsp;<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&nbsp;<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&nbsp;</span><span style="font-size: 12pt;">as you can see in \
the bash script at&nbsp;</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&nbsp; \
Hopefully these practical examples guide you.</div><div \
style="background-color:#ffffff; color:#212121">&nbsp;</div><div \
style="background-color:#ffffff; color:#212121">Best,</div><div \
style="background-color:#ffffff; color:#212121">&nbsp;</div><div \
style="background-color:#ffffff; color:#212121">Edward</div><div \
style="background-color:#ffffff; color:#212121">&nbsp;</div><div \
style="background-color:#ffffff; color:#212121">&nbsp;</div><div \
id="ms-outlook-mobile-signature_mr_css_attr">&nbsp;</div><div \
id="ms-outlook-mobile-signature_mr_css_attr">&nbsp;</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 &lt;<a \
href="/compose?To=mapserver%2dusers%2dbounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>&gt; \
on behalf of Zmitser Kozhukh via mapserver-users &lt;<a \
href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br><b>Sent:</b> \
Wednesday, March 24, 2021 8:02:45 AM<br><b>To:</b> Carlos Ruiz &lt;<a \
href="/compose?To=boolean10001@yahoo.com">boolean10001@yahoo.com</a>&gt;<br><b>Cc:</b> \
<a href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> \
&lt;<a href="/compose?To=mapserver%2dusers@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br><b>Subject:</b> \
Re: [mapserver-users] data parameter in \
tileindex</font><div>&nbsp;</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,&nbsp;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>&nbsp;<blockquote style="border-left:1px \
solid #0857A6;margin:10px;padding:0 0 0 10px"><span>Среда, 24 марта 2021, \
6:53 +03:00 от Carlos Ruiz &lt;<a \
href="/compose?To=boolean10001@yahoo.com">boolean10001@yahoo.com</a>&gt;:<br>&nbsp; \
</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>&nbsp;</div><div>You \
have to have the following on a MAP \
file:</div><div>&nbsp;</div><div>LAYER</div><div>&nbsp;</div><div>...</div><div>&nbsp;</div><div>CONNECTION \
"host=&lt;HOST&gt; ... password=&lt;PASSWORD&gt;"</div><div>CONNECTIONTYPE \
&lt;CONNECTION_TYPE&gt;</div><div>DATA "&lt;GEOM_COLUMN&gt; FROM &lt;TABLE NAME&gt; \
USING UNIQUE &lt;ID&gt; USING \
SRID=&lt;SRID&gt;"</div><div>&nbsp;</div><div>...</div><div>&nbsp;</div><div>END</div><div>&nbsp;</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>&nbsp;</div><div>&nbsp;</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 \
&lt;<a>mapserver-users@lists.osgeo.org</a>&gt; \
wrote:</div><div>&nbsp;</div><div>&nbsp;</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&nbsp;user=admin&nbsp;password=admin&nbsp;DATA "geom from table using \
unique id using srid=4326"'</div><div>or</div><div>host=127.0.0.1 \
dbname=database&nbsp;user=admin&nbsp;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-st \
yle:normal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transf \
orm: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:no \
rmal;font-weight:400;letter-spacing:normal;orphans:2;text-indent:0px;text-transform:no \
ne;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>&nbsp;</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></di \
v></div></div></div></div></div></div></div></blockquote>&nbsp;<div>&nbsp;</div><div><div><div>--<br>Zmitser \
Kozhukh</div></div></div><div>&nbsp;</div></div></div></div></div></div></div></div></blockquote>&nbsp;<div>&nbsp;</div><div \
data-signature-widget="container"><div \
data-signature-widget="content"><div>--<br>Zmitser \
Kozhukh</div></div></div><div>&nbsp;</div></div></BODY></HTML>



_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic