Changes between Version 48 and Version 49 of frmts_wtkraster.html
- Timestamp:
- Mar 8, 2012, 4:33:17 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
frmts_wtkraster.html
v48 v49 99 99 Note that the string, up to the part starting with "table='" is a libpq-style [http://www.gdal.org/ogr/drv_pg.html connection string]. That means that you can leave out unnecessary fields (like password, in some cases). 100 100 101 The "table" option requires the name of a WKT Raster table. This table only can be created by using the script ''gdal2tiles'', by now.101 The "table" option requires the name of a PostGIS Raster table. This table was created when the roaster was loaded. 102 102 103 103 The "where" option is used to filter the results of the raster table. Any SQL-WHERE expression is valid. The "mode" option is used to know the expected arrangement of the raster table. There are 2 possible values: 104 104 105 105 * mode = 1. Also called ''ONE_RASTER_PER_ROW'' mode. In this case, a raster table is considered as a bunch of different raster files. This mode is intended for raster tables storing different raster files. It's the default mode if you don't provide this field in connection string. 106 * mode = 2. Also called ''ONE_RASTER_PER_TABLE'' mode. In this case, a raster table is considered as a unique raster file, even if the table has more than one row. This mode is intended for reading tiled rasters from database , just like the rasters created in section 3.1.106 * mode = 2. Also called ''ONE_RASTER_PER_TABLE'' mode. In this case, a raster table is considered as a unique raster file, even if the table has more than one row. This mode is intended for reading tiled rasters from database. 107 107 108 108 Three important notes here: 109 * If a table stores a tiled raster (like ones created in section 3.1)and you execute the driver with mode = 1, each image tile will be considered as a different image, and will be reported as a subdataset.109 * If a table stores a tiled raster and you execute the driver with mode = 1, each image tile will be considered as a different image, and will be reported as a subdataset. 110 110 * There are use cases the driver can't still work with. For example: non-regular blocked rasters. That cases are detected and an error is raised. Anyway, as I've said, the driver is under development, and will work with more raster arrangements ASAP. 111 111 * There's an additional working mode. If you don't provide a table name, the driver will look for existing raster tables in all allowed database' schemas, and will report each table as a subdataset. … … 113 113 You must use this connection string's format in all the gdal tools, like gdalinfo, gdal_translate, gdalwarp, etc. 114 114 115 '''Example 1:''' 116 117 To get info about ''utm.tif'' file stored in database (see section 3.1) run this command: 118 119 {{{ 120 >$ gdalinfo -mm -stats -checksum "PG:host='localhost' dbname='<raster_database>' user='<user>' password='<password>' table='utm' mode='2'" 121 }}} 122 123 As user / password, in a typical installation, you can use '''postgres / postgres''' 124 125 126 '''Example 2:''' 127 128 To get an overview of the ''katrina.tif'' image with half size run this command: 129 130 {{{ 131 >$ gdal_translate -outsize 50% 50% "PG:host='localhost' dbname='<raster_database>' user='<user>' password='<password>' table='katrina' mode='2'" katrina_half_size.tif 132 }}} 133 134 This will create a file called ''katrina_half_size.tif'' like the original ''katrina.tif'' but half size. 115 To see examples, check the PostGIS Raster FAQ section: [http://postgis.refractions.net/documentation/manual-svn/RT_FAQ.html#id3076646 Can I export my PostGIS Raster data to other raster formats?] 135 116 136 117