<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:8pt">Stefan, <br><br>I asked you about your MAP definition to do some tests. This is what I tried and it works: It seems that you have to consider the following:<br><br>1. The name of the CSV file has to be the same as the layer name (layer "boden" and file name "boden.csv").<br>2. You have to add the SrcLayer tag into your VRT file like this:<br><br>&lt;OGRVRTDataSource&gt;<br>&nbsp;&nbsp;&nbsp; &lt;OGRVRTLayer name="boden"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;SrcDataSource&gt;boden.csv&lt;/SrcDataSource&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">&lt;SrcLayer&gt;boden&lt;/SrcLayer&gt;</span><br style="font-weight: bold;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;GeometryField
 encoding="PointFromColumns" x="x-utm" y="y-utm"/&gt;<br>&nbsp; &lt;/OGRVRTLayer&gt;<br>&lt;/OGRVRTDataSource&gt; <br><div><br>Try it !<br><br>Greetings from México<br><br><span style="font-weight: bold; color: rgb(0, 96, 191);">IC Carlos Ruiz</span></div><div style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"><br style="font-weight: bold; color: rgb(0, 96, 191);"><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Stefan Schantz &lt;SSchantz@BfS.de&gt;<br><b><span style="font-weight: bold;">To:</span></b> Carlos Ruiz &lt;boolean10001@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, January 21, 2010 1:31:43 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [mapserver-users] VRT / CSV data sources are
 not displayed in a layer<br></font><br>
Well, here is the MAP definition, but the same mapfile works with the Shapefile, which I have transformed from the CSV/VRT-files, so I think, that the mapfile shouldn't be the issue.<br>Stefan<br>---------------------------------<br>MAP<br> NAME "rodos_bgefirst"<br> STATUS ON<br> EXTENT 458690.8459237 1746161.3670216 6216440.5477323 6216440.5477323<br> UNITS METERS<br><br> DEBUG 5<br> CONFIG&nbsp; "MS_ERRORFILE" "/data/tmp/ms_debug.log"<br><br> SYMBOLSET "../symbols/symbols.sym"<br> FONTSET "../fonts/fonts.list"<br> SHAPEPATH "/daten/rasterkarten/"<br><br> PROJECTION<br>&nbsp;  "init=epsg:3035"<br> END<br>&nbsp; &nbsp;  OUTPUTFORMAT<br>&nbsp; &nbsp; &nbsp;  NAME png<br>&nbsp; &nbsp; &nbsp;  DRIVER "GD/PNG"<br>&nbsp; &nbsp; &nbsp;  MIMETYPE "image/png"<br>&nbsp; &nbsp; &nbsp;  EXTENSION PNG<br>&nbsp; &nbsp; &nbsp;  IMAGEMODE PC256&nbsp; &nbsp; &nbsp; &nbsp; TRANSPARENT ON&nbsp; &nbsp; &nbsp; END<br>&nbsp;  WEB<br>&nbsp;  IMAGEPATH
 "/data/tmp/"<br><span>&nbsp;  IMAGEURL "<a target="_blank" href="http://10.162.18.107/tmp/">http://10.162.18.107/tmp/</a>"</span><br>&nbsp;  METADATA<br>&nbsp; &nbsp;  "WMS_ACCESSCONSTRAINTS"&nbsp; &nbsp; "none"<br><span>&nbsp; &nbsp;  "WMS_SRS"&nbsp;  "EPSG:4326 EPSG:32632 EPSG:25832 EPSG:31466 EPSG:31467 EPSG:31468 EPSG:3035"&nbsp; &nbsp; &nbsp; "WMS_ONLINERESOURCE"&nbsp; &nbsp; "<a target="_blank" href="http://10.162.18.107/cgi-bin/mapserv?map=/data/umn/bfs/map/rodos_bgefirst_ssh.map">http://10.162.18.107/cgi-bin/mapserv?map=/data/umn/bfs/map/rodos_bgefirst_ssh.map</a>" </span><br>&nbsp; &nbsp;  "WMS_TITLE"&nbsp; &nbsp; "RODOS Prognose Karte interpoliert"<br>&nbsp; &nbsp;  "WMS_FEATURE_INFO_MIME_TYPE"&nbsp; &nbsp; "text/html"<br>&nbsp; &nbsp;  "WMS_ABSTRACT"&nbsp; &nbsp; "RODOS Prognose Karte"<br>&nbsp;  END<br> END<br><br> INCLUDE "../include/legend_rodos.map"<br>---------------------------------------<br>Carlos Ruiz schrieb:<br>&gt; Can you show me
 the MAP definition ? Maybe I can find something there<br>&gt; <br>&gt; IC Carlos Ruiz<br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; *From:* Stefan Schantz &lt;<a ymailto="mailto:SSchantz@BfS.de" href="mailto:SSchantz@BfS.de">SSchantz@BfS.de</a>&gt;<br>&gt; *To:* Carlos Ruiz &lt;<a ymailto="mailto:boolean10001@yahoo.com" href="mailto:boolean10001@yahoo.com">boolean10001@yahoo.com</a>&gt;<br>&gt; *Cc:* <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>&gt; *Sent:* Wed, January 20, 2010 12:01:40 PM<br>&gt; *Subject:* Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer<br>&gt; <br>&gt; Hello Carlos,<br>&gt; my CSV-file ans VRT-file looks like your examples:<br>&gt; <br>&gt; My CSV is<br>&gt; x-utm,y-utm,Wert<br>&gt;&nbsp;  742226.,&nbsp; 5374978., 0.00E+00<br>&gt;&nbsp;  743422.,&nbsp; 5375072.,
 0.00E+00<br>&gt;&nbsp;  744620.,&nbsp; 5375166., 0.00E+00<br>&gt; ...<br>&gt; <br>&gt; and my VTR is<br>&gt; &lt;OGRVRTDataSource&gt;<br>&gt;&nbsp;  &lt;OGRVRTLayer name="boden"&gt;<br>&gt;&nbsp; &nbsp; &nbsp;  &lt;SrcDataSource&gt;/daten/csv/boden.csv&lt;/SrcDataSource&gt;<br>&gt;&nbsp; &nbsp; &nbsp;  &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;<br>&gt;&nbsp; &nbsp; &nbsp;  &lt;GeometryField encoding="PointFromColumns" x="x-utm" y="y-utm"/&gt;<br>&gt;&nbsp;  &lt;/OGRVRTLayer&gt;<br>&gt; &lt;/OGRVRTDataSource&gt;<br>&gt; <br>&gt; and as I wrote, ogr2ogr could read my vrt/csv data and transform it into a shapefile..<br>&gt; <br>&gt; Stefan<br>&gt; <br>&gt; Carlos Ruiz schrieb:<br>&gt; &gt; Check that you have your CSV like this:<br>&gt; &gt;<br>&gt; &gt; Lat,Lng,House<br>&gt; &gt; 48.1,0.25,"My house"<br>&gt; &gt; 49.2,1.1,"My girlfriend's house"<br>&gt; &gt; 47.5,0.75,"My mother in law's house"<br>&gt; &gt;<br>&gt; &gt; And that you have your VTR
 like this:<br>&gt; &gt;<br>&gt; &gt; &lt;OGRVRTDataSource&gt;<br>&gt; &gt; &lt;OGRVRTLayer name="neighborhood"&gt;<br>&gt; &gt;&nbsp; &nbsp; &lt;SrcDataSource&gt;[FILE]&lt;/SrcDataSource&gt;<br>&gt; &gt;&nbsp; &nbsp; &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;<br>&gt; &gt;&nbsp; &nbsp; &lt;LayerSRS&gt;[YOUR SRS]&lt;/LayerSRS&gt;<br>&gt; &gt;&nbsp; &nbsp; &lt;GeometryField encoding="PointFromColumns" x="Lng" y="Lat"/&gt;<br>&gt; &gt; &lt;/OGRVRTLayer&gt;<br>&gt; &gt; &lt;/OGRVRTDataSource&gt;<br>&gt; &gt;&nbsp; &nbsp; IC Carlos Ruiz<br>&gt; &gt;<br>&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt; *From:* Stefan Schantz &lt;<a ymailto="mailto:SSchantz@BfS.de" href="mailto:SSchantz@BfS.de">SSchantz@BfS.de</a> &lt;mailto:<a ymailto="mailto:SSchantz@BfS.de" href="mailto:SSchantz@BfS.de">SSchantz@BfS.de</a>&gt;&gt;<br>&gt; &gt; *To:* <a ymailto="mailto:mapserver-users@lists.osgeo.org"
 href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> &lt;mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br>&gt; &gt; *Sent:* Wed, January 20, 2010 9:32:12 AM<br>&gt; &gt; *Subject:* [mapserver-users] VRT / CSV data sources are not displayed in a layer<br>&gt; &gt;<br>&gt; &gt; Hello List,<br>&gt; &gt;<br>&gt; &gt; The following layer uses a CSV-file (together with a VRT-File (Virtual Format) ) as datasource . When I try to visualize the layer, nothing is shown (neither the data nor error messages; shp2img shows also nothing)<br>&gt; &gt;<br>&gt; &gt; LAYER<br>&gt; &gt;&nbsp; NAME "boden"<br>&gt; &gt;&nbsp; DEBUG on<br>&gt; &gt;&nbsp; STATUS ON<br>&gt; &gt;&nbsp; TYPE POINT<br>&gt; &gt; # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile<br>&gt; &gt;&nbsp; CONNECTION&nbsp; "/daten/csv/boden.vrt"<br>&gt; &gt;&nbsp;
 CONNECTIONTYPE OGR<br>&gt; &gt;<br>&gt; &gt;&nbsp; PROJECTION<br>&gt; &gt;&nbsp; &nbsp; &nbsp; "init=epsg:25832"<br>&gt; &gt;&nbsp; END<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; METADATA<br>&gt; &gt;&nbsp; &nbsp; &nbsp; "WMS_TITLE"&nbsp; &nbsp; "test"<br>&gt; &gt;&nbsp; &nbsp; &nbsp; "WMS_SRS"&nbsp; "EPSG:25832"<br>&gt; &gt;&nbsp; "WMS_ABSTRACT"&nbsp; &nbsp; "test"<br>&gt; &gt;&nbsp; &nbsp; &nbsp; "WMS_FEATURE_INFO_MIME_TYPE" 'text/html'<br>&gt; &gt;&nbsp; END<br>&gt; &gt;<br>&gt; &gt;&nbsp; &nbsp; &nbsp; CLASS<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NAME "test"<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STYLE<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYMBOL "circle"<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZE 15&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLOR 90 90 90<br>&gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END<br>&gt; &gt;&nbsp; &nbsp; &nbsp; END&nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; END<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; But if I transform the CSV/VRT-file into a Shapefile&nbsp; via ogr2ogr<br>&gt; &gt;<br>&gt; &gt; ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden boden.vrt<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; the layer displays the data.<br>&gt; &gt; What is wrong with my VRT/CSV-datasource in the mapfile?<br>&gt; &gt;<br>&gt; &gt; Thanks for any idea.<br>&gt; &gt;<br>&gt; &gt; Best regards<br>&gt; &gt; Stefan<br>&gt; &gt; _______________________________________________<br>&gt; &gt; mapserver-users mailing list<br>&gt; &gt; <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> &lt;mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt; &lt;mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org"
 href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> &lt;mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;&gt;<br><span>&gt; &gt; <a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br>&gt; &gt;<br>&gt; <br></div></div>
<!-- cg25.c1.mail.mud.yahoo.com compressed/chunked Wed Jan 20 09:14:16 PST 2010 -->
</div><br>



      </body></html>