| 301 | Structure of the "raster" Type |
| 302 | |
| 303 | Like the geometry type, the raster type is a complex PostgreSQL type composed of many attributes accessible using various functions. A raster attribute may be composed of many bands sharing a common size, pixel size and georeference. Each band has a pixel type and may have a nodata value. |
| 304 | |
| 305 | Table 2 summarizes the composition of a raster type. |
| 306 | |
| 307 | |
| 308 | '''''Table 2 - Structure of a raster type''''' |
| 309 | |
| 310 | || '''Attribute''' || '''Description''' || '''Storage''' || '''Accessible with function...''' || |
| 311 | || '''version''' || WKB format version (now 0). || unsigned 16 bit integer || Not accessible. || |
| 312 | || '''number of bands''' || Number of raster bands stored in the raster. || unsigned 16 bit integer || ST_NumBands() || |
| 313 | || '''width''' || Width of the raster. || unsigned 16 bit integer || ST_Width() || |
| 314 | || '''height''' || Height of the raster. || unsigned 16 bit integer || ST_Height() || |
| 315 | || '''Georeference information''' || |
| 316 | || '''pixelsizex''' || Pixel size in the x-direction in the same map units as the coordinate system. Same as parameter A in a world file. || 64 bit double || ST_PixelSizeX() || |
| 317 | || '''pixelsizey''' || Pixel size in the y-direction in the same map units as the coordinate system. Same as parameter E in a world file. || 64 bit double || ST_PixelSizeY() || |
| 318 | || '''upperleftx''' || X-coordinate of the center of the upper left pixel. Same as parameter C in a world file. || 64 bit double || ST_UpperLeftX() || |
| 319 | || '''upperlefty''' || Y-coordinate of the center of the upper left pixel. Same as parameter F in a world file. || 64 bit double || ST_UpperLeftY() || |
| 320 | || '''rotationx''' || Rotation about x-axis. Same as parameter B in a world file. || 64 bit double || ST_RotationX() || |
| 321 | || '''rotationy''' || Rotation about y-axis. Same as parameter D in a world file. || 64 bit double || ST_RotationY() || |
| 322 | || '''srid''' || Spatial reference id. || 32 bit integer || ST_SRID() || |
| 323 | || '''Band information''' (one set per band) || |
| 324 | || '''isoffline''' || Flag specifying if the band data is stored in the database or as a file in the file system. || 1 bit || If ST_BandPath() return an empty string, the data is stored in the database. || |
| 325 | || '''hasnodatavalue''' || Flag specifying if the stored nodatavalue is significant or not. || 1 bit || ST_BandHasNoDataValue() || |
| 326 | || '''pixeltype''' || Pixel type for this band. || 4 bits || ST_BandPixelType() || |
| 327 | || '''nodatavalue''' || Nodata value for the band. || Depend on band pixel type. || ST_BandNodataValue() || |
| 328 | || '''Band data''' (one set per band) for '''in-db''' raster || |
| 329 | || '''values[]''' || Value of each pixel. || Depends on band pixel type. || ST_ Value() || |
| 330 | || '''Band data''' (one set per band) for '''out-db''' raster || |
| 331 | || '''bandnumber''' || Number of the out-db band. || unsigned 8 bit integer || Not accessible yet. || |
| 332 | || '''path''' || Path to the out-db raster file. || string || ST_BandPath() || |
| 333 | |
| 334 | |
| 335 | |