Name

ST_SetGeoReference — Set Georeference 6 georeference parameters in a single call. Numbers should be separated by white space. Accepts inputs in GDAL or ESRI format. Default is GDAL.

Synopsis

raster ST_SetGeoReference(raster rast, text georefcoords, text format=GDAL);

Description

Set Georeference 6 georeference parameters in a single call. Accepts inputs in 'GDAL' or 'ESRI' format. Default is GDAL. If 6 coordinates are not provided will return null.

Difference between format representations is as follows:

GDAL:

scalex skewy skewx scaley upperleftx upperlefty

ESRI:

scalex skewy skewx scaley upperleftx + scalex*0.5 upperlefty + scaley*0.5

Examples

UPDATE dummy_rast SET rast = ST_SetGeoReference(rast, '2 0 0 3 0.5 0.5','GDAL') 
	WHERE rid=1;
	
-- same coordinates set in 'ESRI' format
UPDATE dummy_rast SET rast = ST_SetGeoReference(rast, '2 0 0 3 1.5 2','ESRI') 
	WHERE rid=1;
				

See Also

ST_GeoReference, ST_ScaleX, ST_ScaleY, ST_UpperLeftX, ST_UpperLeftY