Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer
Hi Greg, thank you! The issue was the two blanks ahead the coordinates. After I have removed them, the mapserver visualized the csv-file. Nevertheless, I don't understand, why ogr2ogr could read and transform the csv-file, but this is a different issue... Thanks! Stefan greg.lu...@scu.edu.au schrieb: Hi Stefan, I'm not an expert, but I see 2 things that I have found might produce problems: > > x-utm,y-utm,Wert Try renaiming your fields without hyphens ie xutm,yutm,wert and encoding="PointFromColumns" x="xutm" y="yutm"/> and remove the decimal point and convert to non-scientific number: > > 742226., 5374978., 0.00E+00 try: 742226, 5374978,0 Does that help any? Thanks, Greg. Greg Luker GIS Lab Manager Southern Cross University Australia 61 2 66203026 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer
Stefan, I would suspect that your .vrt file contains relative rather than absolute paths and that they are relative to a different working directory if used from MapServer. There is an attribute for the that may address this. It might help if you posted the VRT. 2010/1/20 Stefan Schantz : > Hello List, > > 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) > > LAYER > NAME "boden" > DEBUG on > STATUS ON > TYPE POINT > # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile > CONNECTION "/daten/csv/boden.vrt" > CONNECTIONTYPE OGR > > PROJECTION > "init=epsg:25832" > END > METADATA > "WMS_TITLE" "test" > "WMS_SRS" "EPSG:25832" > "WMS_ABSTRACT" "test" > "WMS_FEATURE_INFO_MIME_TYPE" 'text/html' > END > > CLASS > NAME "test" > STYLE > SYMBOL "circle" > SIZE 15 COLOR 90 90 90 > END > END END > > > But if I transform the CSV/VRT-file into a Shapefile via ogr2ogr > > ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden > boden.vrt > > > the layer displays the data. > What is wrong with my VRT/CSV-datasource in the mapfile? > > Thanks for any idea. > > Best regards > Stefan > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer
Stefan, 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: 1. The name of the CSV file has to be the same as the layer name (layer "boden" and file name "boden.csv"). 2. You have to add the SrcLayer tag into your VRT file like this: boden.csv boden wkbPoint Try it ! Greetings from México IC Carlos Ruiz From: Stefan Schantz To: Carlos Ruiz Cc: mapserver-users@lists.osgeo.org Sent: Thu, January 21, 2010 1:31:43 AM Subject: Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer 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. Stefan - MAP NAME "rodos_bgefirst" STATUS ON EXTENT 458690.8459237 1746161.3670216 6216440.5477323 6216440.5477323 UNITS METERS DEBUG 5 CONFIG "MS_ERRORFILE" "/data/tmp/ms_debug.log" SYMBOLSET "../symbols/symbols.sym" FONTSET "../fonts/fonts.list" SHAPEPATH "/daten/rasterkarten/" PROJECTION "init=epsg:3035" END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" EXTENSION PNG IMAGEMODE PC256TRANSPARENT ON END WEB IMAGEPATH "/data/tmp/" IMAGEURL "http://10.162.18.107/tmp/"; METADATA "WMS_ACCESSCONSTRAINTS""none" "WMS_SRS" "EPSG:4326 EPSG:32632 EPSG:25832 EPSG:31466 EPSG:31467 EPSG:31468 EPSG:3035" "WMS_ONLINERESOURCE" "http://10.162.18.107/cgi-bin/mapserv?map=/data/umn/bfs/map/rodos_bgefirst_ssh.map"; "WMS_TITLE""RODOS Prognose Karte interpoliert" "WMS_FEATURE_INFO_MIME_TYPE""text/html" "WMS_ABSTRACT""RODOS Prognose Karte" END END INCLUDE "../include/legend_rodos.map" --- Carlos Ruiz schrieb: > Can you show me the MAP definition ? Maybe I can find something there > > IC Carlos Ruiz > > -------- > *From:* Stefan Schantz > *To:* Carlos Ruiz > *Cc:* mapserver-users@lists.osgeo.org > *Sent:* Wed, January 20, 2010 12:01:40 PM > *Subject:* Re: [mapserver-users] VRT / CSV data sources are not displayed in > a layer > > Hello Carlos, > my CSV-file ans VRT-file looks like your examples: > > My CSV is > x-utm,y-utm,Wert > 742226., 5374978., 0.00E+00 > 743422., 5375072., 0.00E+00 > 744620., 5375166., 0.00E+00 > ... > > and my VTR is > > > /daten/csv/boden.csv > wkbPoint > > > > > and as I wrote, ogr2ogr could read my vrt/csv data and transform it into a > shapefile.. > > Stefan > > Carlos Ruiz schrieb: > > Check that you have your CSV like this: > > > > Lat,Lng,House > > 48.1,0.25,"My house" > > 49.2,1.1,"My girlfriend's house" > > 47.5,0.75,"My mother in law's house" > > > > And that you have your VTR like this: > > > > > > > >[FILE] > >wkbPoint > >[YOUR SRS] > > > > > > > >IC Carlos Ruiz > > > > > > *From:* Stefan Schantz mailto:sscha...@bfs.de>> > > *To:* mapserver-users@lists.osgeo.org > > <mailto:mapserver-users@lists.osgeo.org> > > *Sent:* Wed, January 20, 2010 9:32:12 AM > > *Subject:* [mapserver-users] VRT / CSV data sources are not displayed in a > > layer > > > > Hello List, > > > > 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) > > > > LAYER > > NAME "boden" > > DEBUG on > > STATUS ON > > TYPE POINT > > # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile > > CONNECTION "/daten/csv/boden.vrt" > > CONNECTIONTYPE OGR > > > > PROJECTION > > "init=epsg:25832" > > END > >METADATA > > "WMS_TITLE""test" > > "WMS_SRS" "EPSG:25832" > > "WMS_ABSTRACT""test" > > "WMS_FEATURE_INFO_MIME_TYPE" 'text/html'
Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer
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. Stefan - MAP NAME "rodos_bgefirst" STATUS ON EXTENT 458690.8459237 1746161.3670216 6216440.5477323 6216440.5477323 UNITS METERS DEBUG 5 CONFIG "MS_ERRORFILE" "/data/tmp/ms_debug.log" SYMBOLSET "../symbols/symbols.sym" FONTSET "../fonts/fonts.list" SHAPEPATH "/daten/rasterkarten/" PROJECTION "init=epsg:3035" END OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" EXTENSION PNG IMAGEMODE PC256 TRANSPARENT ON END WEB IMAGEPATH "/data/tmp/" IMAGEURL "http://10.162.18.107/tmp/"; METADATA "WMS_ACCESSCONSTRAINTS""none" "WMS_SRS" "EPSG:4326 EPSG:32632 EPSG:25832 EPSG:31466 EPSG:31467 EPSG:31468 EPSG:3035" "WMS_ONLINERESOURCE" "http://10.162.18.107/cgi-bin/mapserv?map=/data/umn/bfs/map/rodos_bgefirst_ssh.map"; "WMS_TITLE""RODOS Prognose Karte interpoliert" "WMS_FEATURE_INFO_MIME_TYPE""text/html" "WMS_ABSTRACT""RODOS Prognose Karte" END END INCLUDE "../include/legend_rodos.map" --- Carlos Ruiz schrieb: Can you show me the MAP definition ? Maybe I can find something there IC Carlos Ruiz -------------------- *From:* Stefan Schantz *To:* Carlos Ruiz *Cc:* mapserver-users@lists.osgeo.org *Sent:* Wed, January 20, 2010 12:01:40 PM *Subject:* Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer Hello Carlos, my CSV-file ans VRT-file looks like your examples: My CSV is x-utm,y-utm,Wert 742226., 5374978., 0.00E+00 743422., 5375072., 0.00E+00 744620., 5375166., 0.00E+00 ... and my VTR is /daten/csv/boden.csv wkbPoint and as I wrote, ogr2ogr could read my vrt/csv data and transform it into a shapefile.. Stefan Carlos Ruiz schrieb: > Check that you have your CSV like this: > > Lat,Lng,House > 48.1,0.25,"My house" > 49.2,1.1,"My girlfriend's house" > 47.5,0.75,"My mother in law's house" > > And that you have your VTR like this: > > > >[FILE] >wkbPoint > [YOUR SRS] > > > >IC Carlos Ruiz > > > *From:* Stefan Schantz mailto:sscha...@bfs.de>> > *To:* mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> > *Sent:* Wed, January 20, 2010 9:32:12 AM > *Subject:* [mapserver-users] VRT / CSV data sources are not displayed in a layer > > Hello List, > > 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) > > LAYER > NAME "boden" > DEBUG on > STATUS ON > TYPE POINT > # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile > CONNECTION "/daten/csv/boden.vrt" > CONNECTIONTYPE OGR > > PROJECTION > "init=epsg:25832" > END >METADATA > "WMS_TITLE""test" > "WMS_SRS" "EPSG:25832" > "WMS_ABSTRACT""test" > "WMS_FEATURE_INFO_MIME_TYPE" 'text/html' > END > > CLASS > NAME "test" > STYLE > SYMBOL "circle" > SIZE 15 COLOR 90 90 90 > END > END END > > > But if I transform the CSV/VRT-file into a Shapefile via ogr2ogr > > ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden boden.vrt > > > the layer displays the data. > What is wrong with my VRT/CSV-datasource in the mapfile? > > Thanks for any idea. > > Best regards > Stefan > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> <mailto:mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer
Hello Carlos, my CSV-file ans VRT-file looks like your examples: My CSV is x-utm,y-utm,Wert 742226., 5374978., 0.00E+00 743422., 5375072., 0.00E+00 744620., 5375166., 0.00E+00 ... and my VTR is /daten/csv/boden.csv wkbPoint and as I wrote, ogr2ogr could read my vrt/csv data and transform it into a shapefile.. Stefan Carlos Ruiz schrieb: Check that you have your CSV like this: Lat,Lng,House 48.1,0.25,"My house" 49.2,1.1,"My girlfriend's house" 47.5,0.75,"My mother in law's house" And that you have your VTR like this: [FILE] wkbPoint [YOUR SRS] IC Carlos Ruiz *From:* Stefan Schantz *To:* mapserver-users@lists.osgeo.org *Sent:* Wed, January 20, 2010 9:32:12 AM *Subject:* [mapserver-users] VRT / CSV data sources are not displayed in a layer Hello List, 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) LAYER NAME "boden" DEBUG on STATUS ON TYPE POINT # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile CONNECTION "/daten/csv/boden.vrt" CONNECTIONTYPE OGR PROJECTION "init=epsg:25832" END METADATA "WMS_TITLE""test" "WMS_SRS" "EPSG:25832" "WMS_ABSTRACT""test" "WMS_FEATURE_INFO_MIME_TYPE" 'text/html' END CLASS NAME "test" STYLE SYMBOL "circle" SIZE 15 COLOR 90 90 90 END END END But if I transform the CSV/VRT-file into a Shapefile via ogr2ogr ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden boden.vrt the layer displays the data. What is wrong with my VRT/CSV-datasource in the mapfile? Thanks for any idea. Best regards Stefan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org> http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] VRT / CSV data sources are not displayed in a layer
Check that you have your CSV like this: Lat,Lng,House 48.1,0.25,"My house" 49.2,1.1,"My girlfriend's house" 47.5,0.75,"My mother in law's house" And that you have your VTR like this: [FILE] wkbPoint [YOUR SRS] IC Carlos Ruiz From: Stefan Schantz To: mapserver-users@lists.osgeo.org Sent: Wed, January 20, 2010 9:32:12 AM Subject: [mapserver-users] VRT / CSV data sources are not displayed in a layer Hello List, 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) LAYER NAME "boden" DEBUG on STATUS ON TYPE POINT # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile CONNECTION "/daten/csv/boden.vrt" CONNECTIONTYPE OGR PROJECTION "init=epsg:25832" END METADATA "WMS_TITLE""test" "WMS_SRS" "EPSG:25832" "WMS_ABSTRACT""test" "WMS_FEATURE_INFO_MIME_TYPE" 'text/html' END CLASS NAME "test" STYLE SYMBOL "circle" SIZE 15 COLOR 90 90 90 END END END But if I transform the CSV/VRT-file into a Shapefile via ogr2ogr ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden boden.vrt the layer displays the data. What is wrong with my VRT/CSV-datasource in the mapfile? Thanks for any idea. Best regards Stefan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] VRT / CSV data sources are not displayed in a layer
Hello List, 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) LAYER NAME "boden" DEBUG on STATUS ON TYPE POINT # DATA "/daten/csv/boden/boden" # Datenquelle Shapefile CONNECTION "/daten/csv/boden.vrt" CONNECTIONTYPE OGR PROJECTION "init=epsg:25832" END METADATA "WMS_TITLE""test" "WMS_SRS" "EPSG:25832" "WMS_ABSTRACT""test" "WMS_FEATURE_INFO_MIME_TYPE" 'text/html' END CLASS NAME "test" STYLE SYMBOL "circle" SIZE 15 COLOR 90 90 90 END END END But if I transform the CSV/VRT-file into a Shapefile via ogr2ogr ogr2ogr -s_srs EPSG:25832 -t_srs EPSG:25832 -f "ESRI Shapefile" boden boden.vrt the layer displays the data. What is wrong with my VRT/CSV-datasource in the mapfile? Thanks for any idea. Best regards Stefan ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users