Version 1 (modified by 12 years ago) ( diff ) | ,
---|
Procedure to create indexes for shapefiles on DOS shell
I often need to create indexes for shapefiles. The shapefiles are on remote disc and are on many gerarchical folders
So I use this simply but surely useful procedure to create the indexes using a dos shell.
Suppose the path to the root filder of shapefile is:
F:\folder1\folder2
you must run this simply script from a shell dos.
for /R F:\folder1\folder2 %f IN (*.shp) do ogrinfo.exe -sql "CREATE SPATIAL INDEX ON %~nf" %f
The script start from F:\folder1\folder2 and recurse on all the folder creating the index for every shapefile found and creating shapefile index.
Happy indexing.
Andrea Peri.
Note:
See TracWiki
for help on using the wiki.