Projection

Projection information is a set of parameters, defining the relation between a local grid and a geographical coordinate system.

For multiple grid file formats the projection information is read from the grid files or accompanying world files (a GeoTiff file for example often has this information stored in a .tfw file in the same folder).

The projection information can also be explicitly configured in the GeoDMS configuration, see: geographic grid domain.

The projection is presented in the GeoDMS GUI > Detail Pages > General > Projection for the geographic domain unit and all attributes with this Domain unit.

contents

Projection information consists of the following set of parameters:

  • pixel size in the x-direction in map units, often positive
  • pixel size in the y-direction in map units, often negative
  • x-coordinate of the center of the upper left pixel
  • y-coordinate of the center of the upper left pixel

A world file can also contain rotation information. Gdal.grid applies it. The tiff and bmp StorageManagers refuse it: a rotated GeoTIFF, or a world file with rotation terms, read into a grid domain that takes its georeference from the file stops with an error that names gdal.grid. Reading only the values of such a file, into a domain without a georeference, works.

A grid with a rotated or sheared georeference cannot be written, neither with gdalwrite.grid nor to the world file that the tiff and bmp StorageManagers write next to a grid: the write stops with the error writing …: a rotated or sheared grid georeference cannot be written yet.

reading a raster into a domain

An attribute that reads a raster into a Domain unit other than the grid domain of the file, such as a ReadData attribute (see GeoTiff) or an attribute with a StorageName of its own (see Gdal.grid), is placed on the raster through two georeferences: the one of its domain and the one of the file. GeoDMS expresses the georeference of the file in a coordinate unit: the unit that the DialogData of the storage holder names, or else the base unit of the projection of the domain. When it finds such a unit, the tiff and bmp StorageManagers need a georeference in the file, from its GeoTIFF tags or from the world file beside it (.tfw, .bmpw); without one the read stops with an error that names the missing world file. DialogData that names no item also stops the read. Each cell of the domain gets the value of the raster cell at the same place, and a cell that lies outside the raster reads as null.

When neither side has a georeference, for instance a domain without one and a storage holder without DialogData, the raster is read cell for cell, by row and column.

When only one side has a georeference, the read takes the row and column numbers of the other side for world coordinates. That is right when the georeference of one side places it on the other side itself, as for a domain made with TiledUnit from the grid domain. Otherwise it mostly puts the domain beside the raster, so that every cell reads as null, and the read warns, without changing what it reads. That happens in two cases. A domain with a georeference is read under a grid domain that has none, because the grid domain names no coordinate unit with DialogData or has SyncMode None:

Domain … has a georeference and the grid … of … has none; the read takes the row and column numbers of that grid for world coordinates

Or a domain without a georeference is read from a raster that DialogData, on the attribute or on the grid domain above it, gives one:

The grid of … has a georeference and domain … has none; the read takes the row and column numbers of the domain for world coordinates

files written by older versions

A version before 20.23.1 writes a grid with a rotated or sheared georeference as if it were axis-aligned, with a wrong georeference and without an error, both with gdalwrite.grid and in the world file next to a tiff or bmp grid. Such a version also reads a rotation differently: the tiff and bmp StorageManagers drop it without a message and place the grid as if it were axis-aligned, and gdal.grid transposes every rotated georeference, so that a rotated grid gets the wrong world coordinates.