<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><OGRVRTDataSource><br> <OGRVRTLayer name="boden"><br> <SrcDataSource>boden.csv</SrcDataSource><br> <span style="font-weight: bold;"><SrcLayer>boden</SrcLayer></span><br style="font-weight: bold;"> <GeometryType>wkbPoint</GeometryType><br> <GeometryField
encoding="PointFromColumns" x="x-utm" y="y-utm"/><br> </OGRVRTLayer><br></OGRVRTDataSource> <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 <SSchantz@BfS.de><br><b><span style="font-weight: bold;">To:</span></b> Carlos Ruiz <boolean10001@yahoo.com><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 "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> "init=epsg:3035"<br> END<br> OUTPUTFORMAT<br> NAME png<br> DRIVER "GD/PNG"<br> MIMETYPE "image/png"<br> EXTENSION PNG<br> IMAGEMODE PC256 TRANSPARENT ON END<br> WEB<br> IMAGEPATH
"/data/tmp/"<br><span> IMAGEURL "<a target="_blank" href="http://10.162.18.107/tmp/">http://10.162.18.107/tmp/</a>"</span><br> METADATA<br> "WMS_ACCESSCONSTRAINTS" "none"<br><span> "WMS_SRS" "EPSG:4326 EPSG:32632 EPSG:25832 EPSG:31466 EPSG:31467 EPSG:31468 EPSG:3035" "WMS_ONLINERESOURCE" "<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> "WMS_TITLE" "RODOS Prognose Karte interpoliert"<br> "WMS_FEATURE_INFO_MIME_TYPE" "text/html"<br> "WMS_ABSTRACT" "RODOS Prognose Karte"<br> END<br> END<br><br> INCLUDE "../include/legend_rodos.map"<br>---------------------------------------<br>Carlos Ruiz schrieb:<br>> Can you show me
the MAP definition ? Maybe I can find something there<br>> <br>> IC Carlos Ruiz<br>> <br>> ------------------------------------------------------------------------<br>> *From:* Stefan Schantz <<a ymailto="mailto:SSchantz@BfS.de" href="mailto:SSchantz@BfS.de">SSchantz@BfS.de</a>><br>> *To:* Carlos Ruiz <<a ymailto="mailto:boolean10001@yahoo.com" href="mailto:boolean10001@yahoo.com">boolean10001@yahoo.com</a>><br>> *Cc:* <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> *Sent:* Wed, January 20, 2010 12:01:40 PM<br>> *Subject:* Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer<br>> <br>> Hello Carlos,<br>> my CSV-file ans VRT-file looks like your examples:<br>> <br>> My CSV is<br>> x-utm,y-utm,Wert<br>> 742226., 5374978., 0.00E+00<br>> 743422., 5375072.,
0.00E+00<br>> 744620., 5375166., 0.00E+00<br>> ...<br>> <br>> and my VTR is<br>> <OGRVRTDataSource><br>> <OGRVRTLayer name="boden"><br>> <SrcDataSource>/daten/csv/boden.csv</SrcDataSource><br>> <GeometryType>wkbPoint</GeometryType><br>> <GeometryField encoding="PointFromColumns" x="x-utm" y="y-utm"/><br>> </OGRVRTLayer><br>> </OGRVRTDataSource><br>> <br>> and as I wrote, ogr2ogr could read my vrt/csv data and transform it into a shapefile..<br>> <br>> Stefan<br>> <br>> Carlos Ruiz schrieb:<br>> > Check that you have your CSV like this:<br>> ><br>> > Lat,Lng,House<br>> > 48.1,0.25,"My house"<br>> > 49.2,1.1,"My girlfriend's house"<br>> > 47.5,0.75,"My mother in law's house"<br>> ><br>> > And that you have your VTR
like this:<br>> ><br>> > <OGRVRTDataSource><br>> > <OGRVRTLayer name="neighborhood"><br>> > <SrcDataSource>[FILE]</SrcDataSource><br>> > <GeometryType>wkbPoint</GeometryType><br>> > <LayerSRS>[YOUR SRS]</LayerSRS><br>> > <GeometryField encoding="PointFromColumns" x="Lng" y="Lat"/><br>> > </OGRVRTLayer><br>> > </OGRVRTDataSource><br>> > IC Carlos Ruiz<br>> ><br>> > ------------------------------------------------------------------------<br>> > *From:* Stefan Schantz <<a ymailto="mailto:SSchantz@BfS.de" href="mailto:SSchantz@BfS.de">SSchantz@BfS.de</a> <mailto:<a ymailto="mailto:SSchantz@BfS.de" href="mailto:SSchantz@BfS.de">SSchantz@BfS.de</a>>><br>> > *To:* <a ymailto="mailto:mapserver-users@lists.osgeo.org"
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> <mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>> > *Sent:* Wed, January 20, 2010 9:32:12 AM<br>> > *Subject:* [mapserver-users] VRT / CSV data sources are not displayed in a layer<br>> ><br>> > Hello List,<br>> ><br>> > 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>> ><br>> > LAYER<br>> > NAME "boden"<br>> > DEBUG on<br>> > STATUS ON<br>> > TYPE POINT<br>> > # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile<br>> > CONNECTION "/daten/csv/boden.vrt"<br>> >
CONNECTIONTYPE OGR<br>> ><br>> > PROJECTION<br>> > "init=epsg:25832"<br>> > END<br>> > METADATA<br>> > "WMS_TITLE" "test"<br>> > "WMS_SRS" "EPSG:25832"<br>> > "WMS_ABSTRACT" "test"<br>> > "WMS_FEATURE_INFO_MIME_TYPE" 'text/html'<br>> > END<br>> ><br>> > CLASS<br>> > NAME "test"<br>> > STYLE<br>> > SYMBOL "circle"<br>> > SIZE 15 COLOR 90 90 90<br>> > END<br>> > END
END<br>> ><br>> ><br>> > But if I transform the CSV/VRT-file into a Shapefile via ogr2ogr<br>> ><br>> > ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden boden.vrt<br>> ><br>> ><br>> > the layer displays the data.<br>> > What is wrong with my VRT/CSV-datasource in the mapfile?<br>> ><br>> > Thanks for any idea.<br>> ><br>> > Best regards<br>> > Stefan<br>> > _______________________________________________<br>> > mapserver-users mailing list<br>> > <a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> <mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> <mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org"
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a> <mailto:<a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>>><br><span>> > <a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br>> ><br>> <br></div></div>
<!-- cg25.c1.mail.mud.yahoo.com compressed/chunked Wed Jan 20 09:14:16 PST 2010 -->
</div><br>
</body></html>