[mapserver-users] OGR csv - no field names

Schepers, Benjamin schepers at rvr-online.de
Mon Apr 25 21:58:36 PDT 2016


Hi Ian,

maybe creating a .vrt-File helps? This works as a preprocessor/transformer - the impact on performance for that kind of modification shouldn't be noticeable.
Mapserver can read those vrt-Files, so this could be a solution for you.
There is an example at the gdal-csv-driver documentation:
http://www.gdal.org/drv_csv.html


Regards
Benjamin

Benjamin Schepers

Luftbild und Geoinformationssysteme
luftbilder.geoportal.ruhr
schepers at rvr-online.de



Kronprinzenstraße 35
45128 Essen
Germany
www.metropoleruhr.de


-----Ursprüngliche Nachricht-----
Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Ian Walberg
Gesendet: Sonntag, 24. April 2016 04:50
An: mapserver-users at lists.osgeo.org
Betreff: [mapserver-users] OGR csv - no field names

Folks,

Can a csv file with no field names as the first row be used as an OGR source?

GDAL creates dummy field names, are these passed to mapserver?

OGRFeature(USA-Hilton):652
  field_1 (String) = -74.16958
  field_2 (String) =  40.73526
  field_3 (String) =  Penn Station

What do we need in the layer to make this work?

LABELITEM 'name' - this throws an error, 'field_3' does not seem to work either.
CONNECTIONTYPE OGR
CONNECTION 'Stations.csv'

Thanks

Ian
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list