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  creates  an OGR-supported dataset with a record for each
16       input raster file, an attribute containing the filename, and a  polygon
17       geometry  outlining  the  raster.  This output is suitable for use with
18       MapServer as a 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              dataset will be created if it doesn't already  exist,  otherwise
60              it will append to the existing dataset.
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       • Perform  the  same  command as before, but now we create a GeoPackage
77         instead of a Shapefile.
78
79          gdaltindex -f GPKG doq_index.gpkg doq/*.tif
80
81       • The -t_srs option can also be used to  transform  all  input  rasters
82         into the same output projection:
83
84          gdaltindex -t_srs EPSG:4326 -src_srs_name src_srs tile_index_mixed_srs.shp *.tif
85
86       • Make a tile index from files listed in a text file :
87
88          gdaltindex doq_index.shp --optfile my_list.txt
89

SEE ALSO

91       Common  options for raster programs for other command-line options, and
92       in particular the --optfile switch that can be used to specify  a  list
93       of input datasets.
94

AUTHOR

96       Frank Warmerdam <warmerdam@pobox.com>
97
99       1998-2023
100
101
102
103
104                                 Oct 30, 2023                    GDALTINDEX(1)
Impressum