[gdal-dev] OGR csv driver: feature numbering
Hermann Peifer
peifer at gmx.eu
Sat Aug 27 06:07:12 EDT 2011
Hi,
I am just wondering why the csv driver starts numbering at 1, rather
than at 0, see e.g. the "First point" in the test.csv example at [1],
which ends up as OGRFeature(test):1.
However, if I take the test.vrt/test.csv example and convert it to
shapefile format, I end up with features 0, 1 and 2, see [2].
Is this how it should be?
Hermann
[1] http://www.gdal.org/ogr/drv_csv.html
[2]
$ ogr2ogr test.shp test.vrt
$ ogrinfo -al test.shp
INFO: Open of `test.shp'
using driver `ESRI Shapefile' successful.
Layer name: test
Geometry: Point
Feature Count: 3
Extent: (0.250000, 47.500000) - (1.100000, 49.200000)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]]
Latitude: String (80.0)
Longitude: String (80.0)
Name: String (80.0)
OGRFeature(test):0
Latitude (String) = 48.1
Longitude (String) = 0.25
Name (String) = First point
POINT (0.25 48.1)
OGRFeature(test):1
Latitude (String) = 49.2
Longitude (String) = 1.1
Name (String) = Second point
POINT (1.1 49.2)
OGRFeature(test):2
Latitude (String) = 47.5
Longitude (String) = 0.75
Name (String) = Third point
POINT (0.75 47.5)
More information about the gdal-dev
mailing list