[mapserver-users] VRT / CSV data sources are not displayed in a layer

Carlos Ruiz boolean10001 at yahoo.com
Wed Jan 20 08:20:10 PST 2010


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:

<OGRVRTDataSource>
<OGRVRTLayer name="neighborhood">
    <SrcDataSource>[FILE]</SrcDataSource>
    <GeometryType>wkbPoint</GeometryType>
    <LayerSRS>[YOUR SRS]</LayerSRS>
    <GeometryField encoding="PointFromColumns" x="Lng" y="Lat"/>
</OGRVRTLayer>
</OGRVRTDataSource>

 
IC Carlos Ruiz


________________________________
From: Stefan Schantz <SSchantz at BfS.de>
To: mapserver-users at 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 at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100120/1a7c10da/attachment.htm>


More information about the MapServer-users mailing list