<div dir="ltr">Hi all,<div>I'm using the virtual plugin of OGR to consume a web service who return CSV coordinates and mapserver is able to draw the points without any problems.</div><div><br></div><div>The connection definition in my mapfile is something like this.</div><div>CONNECTION "<OGRVRTDataSource><OGRVRTLayer name='select'><SrcDataSource>CSV:/vsicurl/http://<my server>/service.php</SrcDataSource><GeometryType>wkbPoint</GeometryType><SrcLayer>select</SrcLayer><LayerSRS>WGS84</LayerSRS><GeometryField encoding='PointFromColumns' x='PHOTO_LONGITUDE' y='PHOTO_LATITUDE'/></OGRVRTLayer></OGRVRTDataSource>"<br></div><div><br></div><div>I would like to pass arguments to that CONNETION string so I could build dynamic request.  something like this</div><div>CONNECTION "<OGRVRTDataSource><OGRVRTLayer name='select'><SrcDataSource>CSV:/vsicurl/http://<my server>/service.php?<b>param1=%PARAM1%&amp;param2=%PARAM2%</b></SrcDataSource><GeometryType>wkbPoint</GeometryType><SrcLayer>select</SrcLayer><LayerSRS>WGS84</LayerSRS><GeometryField encoding='PointFromColumns' x='PHOTO_LONGITUDE' y='PHOTO_LATITUDE'/></OGRVRTLayer></OGRVRTDataSource>"<br></div><div><br></div><div>I know the argument values (in my example PARAM1 and PARAM2) are OK because I'm seeing them in the error message thrown by mapserver (see below).  But mapserver refuse to render the points:</div><div><br></div><div><div><?xml version='1.0' encoding="UTF-8" standalone="no" ?></div><div><!DOCTYPE ServiceExceptionReport SYSTEM "<a href="http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd</a>"></div><div><ServiceExceptionReport version="1.1.1"></div><div><ServiceException></div><div>msDrawMap(): Image handling error. Failed to draw layer named &#39;photo_ownedby_all&#39;.</div><div>msOGRFileNextShape(): OGR error. Failed to find layer &#39;select&#39; on datasource &#39;CSV:/vsicurl/<b>http://<my server>/geophoto/select.php?PARAM1=40.886913500823205%2C-84.41259765625011&amp;PARAM2=63.97980162961738%2C-43.587402343750284</b>&#39;.</div><div></ServiceException></div><div></ServiceExceptionReport></div></div><div><br></div><div>Strangely, if I copy paste this url in the browser, the web service is returning valid csv data:</div><div><b>http://<my server>/geophoto/select.php?ll=40.886913500823205%2C-84.41259765625011&amp;ur=63.97980162961738%2C-43.587402343750284</b><br></div><div>returned </div><div><pre style="color:rgb(0,0,0);line-height:normal;word-wrap:break-word;white-space:pre-wrap">PHOTO_LATITUDE,PHOTO_LONGITUDE
48.8099315451953,-77.0906915758454
48.8119226339273,-77.123176861499
48.8139039864207,-77.1556648776822
48.8158756013937,-77.1881556113468
48.8178374775437,-77.2206490494331
48.8171607148511,-77.2546364217682
48.8164732928131,-77.2886228129866
48.8157752119077,-77.3226082078249
48.815066472652,-77.356592590973</pre></div><div><br></div><div>any thoughts?</div><div><br></div><div>MartinO</div></div>