Geoscience Reference
In-Depth Information
-lnum n
Add layer number 'n' from each source file in the tile index.
-lname name
Add the layer named 'name' from each source file in the tile index.
-f output_format
Select an output format name. The default is to create a shapefile.
-tileindex field_name
The name to use for the dataset name. Defaults to LOCATION.
-write_absolute_path
Filenames are written with absolute paths
-skip_different_projection
Only layers with same projection ref as layers already inserted in the tileindex
will be inserted. If no -lnum or -lname arguments are given it is assumed
that all layers in source datasets should be added to the tile index as independent
records.
If the tile index already exists it will be appended to, otherwise it will be created.
It is a flaw of the current ogrtindex program that no attempt is made to copy
the coordinate system definition from the source datasets to the tile index (as is
expected by MapServer when PROJECTION AUTO is in use).
Assuming we wanted to create a tile index for the following Shapefiles exported
from the OpenStreetMap dataset for the Ile de France region, we would need to either
navigate to directory or use the relative path.
ls *.shp
landuse.shp
natural.shp
places.shp
points.shp
railways.shp
roads.shp
tileindex.shp
waterways.shp
We would then run the following command where we specify the output format as
an ESRI Shapefile. We also define the new attribute that holds the file path as “Loca-
tion”. The output file name is set to ile_de_france_tileindex.shp and
the wildcard *.shp indicates that all ESRI Shapefiles located within the directory
should be added to the tile index. The option accept_different_schemas is
important if the attributes in the individual Shapefiles differs, but it is necessary to
note that this may cause an incompatability with UMN MapServer.
ogrtindex -f 'ESRI Shapefile' -tileindex 'Location'
-accept_different_schemas ile_de_france_tileindex.shp
*.shp
 
 
Search WWH ::




Custom Search