OGRTINDEX(1)

✨ NAME ✨

ogrtindex β€” she creates a tileindex, bestie πŸ’…

This is the ogrtindex(1) page from the GDAL manual, and we're gonna get you fully caught up. No cap.


🌸 SYNOPSIS 🌸

Usage: ogrtindex [--help] [--long-usage] [--help-general]
                 [-lnum <n>]... [-lname <name>]... [-of <output_format>]
                 [-tileindex <tileindex>] [-write_absolute_path]
                 [-skip_different_projection] [-t_srs <srs_def>]
                 [-src_srs_name <field_name>]
                 [-src_srs_format {AUTO|WKT|EPSG|PROJ}]
                 [-accept_different_schemas]
                 <output_dataset> <src_dataset>...

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so ogrtindex is that girl fr β€” she makes a tileindex, which is literally just a file holding a list of the identities of a bunch of other files, plus their spatial extents. Iconic. πŸ—ΊοΈβœ¨

Her main character purpose? Being used with MapServer for tiled access to layers through the OGR connection type. Periodt.

πŸ’‘ TIP: There's an equivalent in the new gdal command line interface β€” go look at gdal vector index. Slay.

✨ OPTIONS ✨

  • --help β€” shows you this help message and dips out. Bye! πŸ‘‹
  • --help-general β€” gives you the brief usage message for the generic GDAL commandline options and exits.
  • -lnum <n> β€” adds layer number n from every source file into the tile index. (You can pass this more than once, note the ... in the synopsis πŸ‘€)
  • -lname <name> β€” adds the layer named name from every source file into the tile index. Also stackable ✨
  • -f <output_format> β€” picks your output format name. If you say nothing, default is to make a shapefile. πŸŽ€
  • -tileindex <field_name> β€” the name to use for the dataset name. Defaults to LOCATION.
  • -write_absolute_path β€” filenames get written with absolute paths. No relativeness here, she's being direct πŸ’…
  • -skip_different_projection β€” only layers whose projection ref matches the layers already inserted in the tileindex will get inserted. Projection mismatch? Not today. 🚫
  • -t_srs <target_srs> β€” the extents of input files get transformed into the target coordinate reference system you want. Heads up though: using this option generates files that are not compatible with MapServer < 7.2 😭 The default instead makes simple rectangular polygons in the same coordinate reference system as the input vector layers.
  • -src_srs_name <field_name> β€” the name of the field that stores the SRS of each tile. You can use this field name as the value of the TILESRS keyword in MapServer >= 7.2. Cute and functional ✨
  • -src_srs_format {AUTO|WKT|EPSG|PROJ} β€” the format the SRS of each tile must be written in. The available formats are: AUTO, WKT, EPSG, PROJ.
  • -accept_different_schemas β€” by default ogrtindex checks that all the layers inserted into the index have the same attribute schemas. Specify this and that test gets disabled. But be aware, bestie: the resulting index may be incompatible with MapServer! πŸ’€

If you don't pass any -lnum or -lname arguments, it's assumed that all layers in the source datasets should be added to the tile index as independent records. Every single one, go off πŸ‘‘

And if the tile index already exists? She appends to it. If it doesn't? She creates it. Simple as that 🫢


πŸ’– RETURN STATUS CODE πŸ’–

  • Returns status code 0 when it's a success story πŸŽ‰
  • Returns non-zero when there's an error. (Quick note: non-blocking errors that get emitted as warnings still count as a successful execution, so don't panic 🌈)

πŸŽ€ EXAMPLES πŸŽ€

Example 1

This one creates a shapefile (tindex.shp) holding a tile index of the BL2000_LINK layers in all the NTF files inside the wrk directory:

ogrtindex tindex.shp wrk/*.NTF

Ate. No crumbs. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer <silke@intevation.de>


1998-2026


And that's the whole page, bestie 🧚 It's from GDAL, dated Aug 18, 2026 β€” OGRTINDEX(1), iykyk. Go index some tiles and be the main character of your own geospatial pipeline. Byeeee πŸ’…βœ¨πŸ¦‹

periodt.

πŸ“¦ where this page comes from