[postgis-devel] [WKT Raster] Regular blocking and null extent

Mateusz Loskot mateusz at loskot.net
Fri May 8 14:03:48 PDT 2009


Pierre Racine wrote:
>>>> Certainly, if regular blocking coverage is empty, dimensions of extent
>>>> rectangle are equal to Zero. 0
>>>>
>>>> Is that correct?
> 
>>> There is no similar example on the vector side as there
>>> is no (need for an) extent in the geometry_columns table.
>> That's unclear how it relates to my question.
> 
> I guess I misunderstood... You mean what to put in the raster_columns's
> "extent" column if there is no raster in the table?

I've not asked about it.

I assumed, according to my understanding of the specification,
that a table configured for regular blocking mode must have valid
extent, and if such table is empty, then extent dimensions are Zero.


>>>> Shall we allow generation of regular blocking tables
>>> >from non-georeferenced datasets reported by GDAL as follows:
>>>> $ gdalinfo chessboard-64x64.tif
>>>> Driver: GTiff/GeoTIFF
>>>> Files: chessboard-64x64.tif
>>>> Size is 64, 64
>>>> Coordinate System is `'
>>>> Metadata:
>>>>  TIFFTAG_DOCUMENTNAME=/home/mloskot/data/test/sample/chessboard-64x64.tif
>>>>  TIFFTAG_IMAGEDESCRIPTION=Sample 4-fields greyscale chessboard
>>>>  TIFFTAG_XRESOLUTION=72
>>>>  TIFFTAG_YRESOLUTION=72
>>>>  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
>>>> Image Structure Metadata:
>>>>  INTERLEAVE=BAND
>>>> Corner Coordinates:
>>>> Upper Left  (    0.0,    0.0)
>>>> Lower Left  (    0.0,   64.0)
>>>> Upper Right (   64.0,    0.0)
>>>> Lower Right (   64.0,   64.0)
>>>> Center      (   32.0,   32.0)
>>>> Band 1 Block=64x64 Type=Byte, ColorInterp=Gray
>>>>
>>>> and assume pixelsize_x = 1 and pixelsize_y = -1 ?
>>> That's what I would do also. There is an extent but no (geographical)
>>> coordinate system. That's what ArcGIS does when importing an ungeoreferenced
>>> raster.
>> Givne what GDAL reports for chessboard-64x64.tif, could you explain
>> what values you put into RASTER header in each row (tile) and
>> what goes to RASTER_COLUMNS, etc.?
> 
> In the raster header (there should be only one tile, right?):
> 
> scaleX = 1
> scaleY = -1
> ipX = 0.0
> ipY = 0.0
> skewX = 0.0
> skewY = 0.0
> srid = -1 (or 0?)
> width = 64
> height = 64
> 
> In RASTER_COLUMNS:
> 
> srid = -1 (or 0?)
> pixel_types = 8BUI
> regular_blocking = true
> pixelsize_x = 1.0
> pixelsize_y = -1.0
> blocksize_x = 64
> blocksize_y = 64
> 
> No?

What's in the extent field of RASTER_COLUMNS?

Please note that you have confirmed my assumptions regarding the
specification are correct. Here they are:

"If the regular_blocking field is true", these conditions apply:
* non-NULL extent must be specified
* specified extent must be non-rotated rectangle.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the postgis-devel mailing list