1GDALTINDEX(1)                        GDAL                        GDALTINDEX(1)
2
3
4

NAME

6       gdaltindex - Builds a shapefile as a raster tileindex.
7

SYNOPSIS

9          gdaltindex [-f format] [-tileindex field_name] [-write_absolute_path]
10                  [-skip_different_projection] [-t_srs target_srs]
11                  [-src_srs_name field_name] [-src_srs_format [AUTO|WKT|EPSG|PROJ]
12                  [-lyr_name name] index_file [gdal_file]*
13

DESCRIPTION

15       This  program  builds  a  shapefile with a record for each input raster
16       file, an attribute containing the filename, and a polygon geometry out‐
17       lining the raster.  This output is suitable for use with MapServer as a
18       raster tileindex.
19
20       -f <format>
21              The OGR format of the output tile index file. Starting with GDAL
22              2.3,  if not specified, the format is guessed from the extension
23              (previously was ESRI Shapefile).
24
25       -tileindex <field_name>
26              The output field name to hold the file path/location to the  in‐
27              dexed rasters. The default tile index field name is location.
28
29       -write_absolute_path
30              The  absolute path to the raster files is stored in the tile in‐
31              dex file.  By default the raster filenames will be  put  in  the
32              file exactly as they are specified on the command line.
33
34       -skip_different_projection
35              Only files with same projection as files already inserted in the
36              tileindex will be inserted (unless -t_srs is specified). Default
37              does not check projection and accepts all inputs.
38
39       -t_srs <target_srs>:
40              Geometries  of  input  files  will be transformed to the desired
41              target coordinate reference system.  Default creates simple rec‐
42              tangular polygons in the same coordinate reference system as the
43              input rasters.
44
45       -src_srs_name <field_name>
46              The name of the field to store the SRS of each tile. This  field
47              name  can  be  used  as  the  value  of  the  TILESRS keyword in
48              MapServer
49
50       -src_srs_format <type>
51              The format in which the SRS of each tile must be written.  Types
52              can be AUTO, WKT, EPSG, PROJ.
53
54       -lyr_name <name>
55              Layer name to create/append to in the output tile index file.
56
57       index_file
58              The  name  of  the  output file to create/append to. The default
59              shapefile will be created if it doesn't already exist, otherwise
60              it will append to the existing file.
61
62       <gdal_file>
63              The  input GDAL raster files, can be multiple files separated by
64              spaces.  Wildcards my also be used. Stores the file locations in
65              the  same  style  as specified here, unless -write_absolute_path
66              option is also used.
67

EXAMPLES

69       • Produce a shapefile (doq_index.shp) with a  record  for  every  image
70         that  the utility found in the doq folder. Each record holds informa‐
71         tion that points to the location of the image  and  also  a  bounding
72         rectangle shape showing the bounds of the image:
73
74          gdaltindex doq_index.shp doq/*.tif
75
76       • The  -t_srs  option  can  also be used to transform all input rasters
77         into the same output projection:
78
79          gdaltindex -t_srs EPSG:4326 -src_srs_name src_srs tile_index_mixed_srs.shp *.tif
80
81       • Make a tile index from files listed in a text file :
82
83          gdaltindex doq_index.shp --optfile my_list.txt
84

SEE ALSO

86       raster_common_options for other command-line options, and in particular
87       the  --optfile  switch  that  can  be  used  to specify a list of input
88       datasets.
89

AUTHOR

91       Frank Warmerdam <warmerdam@pobox.com>
92
94       1998-2021
95
96
97
98
99                                 Sep 07, 2021                    GDALTINDEX(1)
Impressum