[gdal-dev] Does ogrtindex start counting layers from zero?

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Fri Jan 31 05:04:58 PST 2014


Ogrtindex has an option -lnum x http://www.gdal.org/ogrtindex.html

I fear that layer numbers are count in a computer geeky way by starting from
zero and for creating a tileindex for point layer I should give the
parameter as -lnum 0 and not -lnum 1 as it is listed by ogrinfo.

C:\data>ogrinfo berlin.sqlite
INFO: Open of `berlin.sqlite'
      using driver `SQLite' successful.
1: points (Point)
2: lines (Line String)
3: polygons (Polygon)
4: multilinestrings (Multi Line String)
5: multipolygons (Multi Polygon)
6: other_relations (Geometry Collection)

By the way, I can see that this gets written for Mapserver into the
tileindex file:
LOCATION (String) = C:\data\berlin.sqlite,4

I would enjoy if I could save some key clicks and typos and do also with GDAL
"ogrinfo berlin.sqlite,4"

-Jukka Rahkonen-

More information about the gdal-dev mailing list