# SOME DESCRIPTIVE TITLE. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2017-01-28 07:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title #: using_raster_dataman.xml:3 #, no-c-format msgid "Raster Data Management, Queries, and Applications" msgstr "" #. Tag: title #: using_raster_dataman.xml:5 #, no-c-format msgid "Loading and Creating Rasters" msgstr "" #. Tag: para #: using_raster_dataman.xml:6 #, no-c-format msgid "" "For most use cases, you will create PostGIS rasters by loading existing " "raster files using the packaged raster2pgsql raster " "loader." msgstr "" #. Tag: title #: using_raster_dataman.xml:9 #, no-c-format msgid "Using raster2pgsql to load rasters" msgstr "" #. Tag: para #: using_raster_dataman.xml:10 #, no-c-format msgid "" "The raster2pgsql is a raster loader executable that loads " "GDAL supported raster formats into sql suitable for loading into a PostGIS " "raster table. It is capable of loading folders of raster files as well as " "creating overviews of rasters." msgstr "" #. Tag: para #: using_raster_dataman.xml:13 #, no-c-format msgid "" "Since the raster2pgsql is compiled as part of PostGIS most often (unless you " "compile your own GDAL library), the raster types supported by the executable " "will be the same as those compiled in the GDAL dependency library. To get a " "list of raster types your particular raster2pgsql supports use the -" "G switch. These should be the same as those provided by your " "PostGIS install documented here if you " "are using the same gdal library for both." msgstr "" #. Tag: para #: using_raster_dataman.xml:16 #, no-c-format msgid "" "The older version of this tool was a python script. The executable has " "replaced the python script. If you still find the need for the Python script " "Examples of the python one can be found at GDAL PostGIS Raster Driver Usage. Please note that the raster2pgsql python script may not work with " "future versions of PostGIS raster and is no longer supported." msgstr "" #. Tag: para #: using_raster_dataman.xml:21 #, no-c-format msgid "" "When creating overviews of a specific factor from a set of rasters that are " "aligned, it is possible for the overviews to not align. Visit http://trac.osgeo.org/postgis/" "ticket/1764 for an example where the overviews do not align." msgstr "" #. Tag: para #: using_raster_dataman.xml:23 #, no-c-format msgid "EXAMPLE USAGE:" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:24 #, no-c-format msgid "" "raster2pgsql raster_options_go_here raster_file someschema.sometable > out." "sql" msgstr "" #. Tag: term #: using_raster_dataman.xml:28 #, no-c-format msgid "-?" msgstr "" #. Tag: para #: using_raster_dataman.xml:30 #, no-c-format msgid "" "Display help screen. Help will also display if you don't pass in any " "arguments." msgstr "" #. Tag: term #: using_raster_dataman.xml:37 #, no-c-format msgid "-G" msgstr "" #. Tag: para #: using_raster_dataman.xml:39 #, no-c-format msgid "Print the supported raster formats." msgstr "" #. Tag: term #: using_raster_dataman.xml:46 #, no-c-format msgid "(c|a|d|p) These are mutually exclusive options:" msgstr "" #. Tag: term #: using_raster_dataman.xml:51 #, no-c-format msgid "-c" msgstr "" #. Tag: para #: using_raster_dataman.xml:53 #, no-c-format msgid "" "Create new table and populate it with raster(s), this is the " "default mode" msgstr "" #. Tag: term #: using_raster_dataman.xml:60 #, no-c-format msgid "-a" msgstr "" #. Tag: para #: using_raster_dataman.xml:62 #, no-c-format msgid "Append raster(s) to an existing table." msgstr "" #. Tag: term #: using_raster_dataman.xml:69 #, no-c-format msgid "-d" msgstr "" #. Tag: para #: using_raster_dataman.xml:71 #, no-c-format msgid "Drop table, create new one and populate it with raster(s)" msgstr "" #. Tag: term #: using_raster_dataman.xml:78 #, no-c-format msgid "-p" msgstr "" #. Tag: para #: using_raster_dataman.xml:80 #, no-c-format msgid "Prepare mode, only create the table." msgstr "" #. Tag: term #: using_raster_dataman.xml:91 #, no-c-format msgid "" "Raster processing: Applying constraints for proper registering in raster " "catalogs" msgstr "" #. Tag: term #: using_raster_dataman.xml:96 #, no-c-format msgid "-C" msgstr "" #. Tag: para #: using_raster_dataman.xml:98 #, no-c-format msgid "" "Apply raster constraints -- srid, pixelsize etc. to ensure raster is " "properly registered in raster_columns view." msgstr "" #. Tag: term #: using_raster_dataman.xml:104 #, no-c-format msgid "-x" msgstr "" #. Tag: para #: using_raster_dataman.xml:106 #, no-c-format msgid "" "Disable setting the max extent constraint. Only applied if -C flag is also " "used." msgstr "" #. Tag: term #: using_raster_dataman.xml:112 #, no-c-format msgid "-r" msgstr "" #. Tag: para #: using_raster_dataman.xml:114 #, no-c-format msgid "" "Set the constraints (spatially unique and coverage tile) for regular " "blocking. Only applied if -C flag is also used." msgstr "" #. Tag: term #: using_raster_dataman.xml:125 #, no-c-format msgid "" "Raster processing: Optional parameters used to manipulate input raster " "dataset" msgstr "" #. Tag: term #: using_raster_dataman.xml:130 #, no-c-format msgid "-s <SRID>" msgstr "" #. Tag: para #: using_raster_dataman.xml:132 #, no-c-format msgid "" "Assign output raster with specified SRID. If not provided or is zero, " "raster's metadata will be checked to determine an appropriate SRID." msgstr "" #. Tag: term #: using_raster_dataman.xml:139 #, no-c-format msgid "-b BAND" msgstr "" #. Tag: para #: using_raster_dataman.xml:141 #, no-c-format msgid "" "Index (1-based) of band to extract from raster. For more than one band " "index, separate with comma (,). If unspecified, all bands of raster will be " "extracted." msgstr "" #. Tag: term #: using_raster_dataman.xml:149 #, no-c-format msgid "-t TILE_SIZE" msgstr "" #. Tag: para #: using_raster_dataman.xml:151 #, no-c-format msgid "" "Cut raster into tiles to be inserted one per table row. TILE_SIZE is expressed as WIDTHxHEIGHT or set to the value \"auto\" to allow " "the loader to compute an appropriate tile size using the first raster and " "applied to all rasters." msgstr "" #. Tag: term #: using_raster_dataman.xml:158 #, no-c-format msgid "-P" msgstr "" #. Tag: para #: using_raster_dataman.xml:160 #, no-c-format msgid "" "Pad right-most and bottom-most tiles to guarantee that all tiles have the " "same width and height." msgstr "" #. Tag: term #: using_raster_dataman.xml:170 #, no-c-format msgid "-R, --register" msgstr "" #. Tag: para #: using_raster_dataman.xml:172 #, no-c-format msgid "Register the raster as a filesystem (out-db) raster." msgstr "" #. Tag: para #: using_raster_dataman.xml:173 #, no-c-format msgid "" "Only the metadata of the raster and path location to the raster is stored in " "the database (not the pixels)." msgstr "" #. Tag: term #: using_raster_dataman.xml:178 #, no-c-format msgid "-l OVERVIEW_FACTOR" msgstr "" #. Tag: para #: using_raster_dataman.xml:179 #, no-c-format msgid "" "Create overview of the raster. For more than one factor, separate with " "comma(,). Overview table name follows the pattern o_overview " "factor_table, where overview factor is a placeholder for numerical overview factor and table is replaced with the base table name. Created overview is stored in " "the database and is not affected by -R. Note that your generated sql file " "will contain both the main table and overview tables." msgstr "" #. Tag: term #: using_raster_dataman.xml:187 #, no-c-format msgid "-N NODATA" msgstr "" #. Tag: para #: using_raster_dataman.xml:189 #, no-c-format msgid "NODATA value to use on bands without a NODATA value." msgstr "" #. Tag: term #: using_raster_dataman.xml:201 #, no-c-format msgid "Optional parameters used to manipulate database objects" msgstr "" #. Tag: term #: using_raster_dataman.xml:206 using_raster_dataman.xml:235 #, no-c-format msgid "-q" msgstr "" #. Tag: para #: using_raster_dataman.xml:208 #, no-c-format msgid "Wrap PostgreSQL identifiers in quotes" msgstr "" #. Tag: term #: using_raster_dataman.xml:213 #, no-c-format msgid "-f COLUMN" msgstr "" #. Tag: para #: using_raster_dataman.xml:215 #, no-c-format msgid "Specify name of destination raster column, default is 'rast'" msgstr "" #. Tag: term #: using_raster_dataman.xml:221 #, no-c-format msgid "-F" msgstr "" #. Tag: para #: using_raster_dataman.xml:223 #, no-c-format msgid "Add a column with the name of the file" msgstr "" #. Tag: term #: using_raster_dataman.xml:228 #, no-c-format msgid "-n COLUMN" msgstr "" #. Tag: para #: using_raster_dataman.xml:230 #, no-c-format msgid "Specify the name of the filename column. Implies -F." msgstr "" #. Tag: para #: using_raster_dataman.xml:237 #, no-c-format msgid "Wrap PostgreSQL identifiers in quotes." msgstr "" #. Tag: term #: using_raster_dataman.xml:242 #, no-c-format msgid "-I" msgstr "" #. Tag: para #: using_raster_dataman.xml:244 #, no-c-format msgid "Create a GiST index on the raster column." msgstr "" #. Tag: term #: using_raster_dataman.xml:251 #, no-c-format msgid "-M" msgstr "" #. Tag: para #: using_raster_dataman.xml:253 #, no-c-format msgid "Vacuum analyze the raster table." msgstr "" #. Tag: term #: using_raster_dataman.xml:261 #, no-c-format msgid "-k" msgstr "" #. Tag: para #: using_raster_dataman.xml:263 #, no-c-format msgid "Skip NODATA value checks for each raster band." msgstr "" #. Tag: term #: using_raster_dataman.xml:271 #, no-c-format msgid "-T tablespace" msgstr "" #. Tag: para #: using_raster_dataman.xml:273 #, no-c-format msgid "" "Specify the tablespace for the new table. Note that indices (including the " "primary key) will still use the default tablespace unless the -X flag is " "also used." msgstr "" #. Tag: term #: using_raster_dataman.xml:282 #, no-c-format msgid "-X tablespace" msgstr "" #. Tag: para #: using_raster_dataman.xml:284 #, no-c-format msgid "" "Specify the tablespace for the table's new index. This applies to the " "primary key and the spatial index if the -I flag is used." msgstr "" #. Tag: term #: using_raster_dataman.xml:293 #, no-c-format msgid "-Y" msgstr "" #. Tag: para #: using_raster_dataman.xml:295 #, no-c-format msgid "Use copy statements instead of insert statements." msgstr "" #. Tag: term #: using_raster_dataman.xml:306 #, no-c-format msgid "-e" msgstr "" #. Tag: para #: using_raster_dataman.xml:307 #, no-c-format msgid "Execute each statement individually, do not use a transaction." msgstr "" #. Tag: term #: using_raster_dataman.xml:311 #, no-c-format msgid "-E ENDIAN" msgstr "" #. Tag: para #: using_raster_dataman.xml:312 #, no-c-format msgid "" "Control endianness of generated binary output of raster; specify 0 for XDR " "and 1 for NDR (default); only NDR output is supported now" msgstr "" #. Tag: term #: using_raster_dataman.xml:316 #, no-c-format msgid "-V version" msgstr "" #. Tag: para #: using_raster_dataman.xml:317 #, no-c-format msgid "" "Specify version of output format. Default is 0. Only 0 is supported at this " "time." msgstr "" #. Tag: para #: using_raster_dataman.xml:320 #, no-c-format msgid "" "An example session using the loader to create an input file and uploading it " "chunked in 100x100 tiles might look like this:" msgstr "" #. Tag: para #: using_raster_dataman.xml:321 #, no-c-format msgid "" "You can leave the schema name out e.g demelevation " "instead of public.demelevation and the raster table will " "be created in the default schema of the database or user" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:323 #, no-c-format msgid "" "raster2pgsql -s 4326 -I -C -M *.tif -F -t 100x100 public.demelevation > elev." "sql\n" "psql -d gisdb -f elev.sql" msgstr "" #. Tag: para #: using_raster_dataman.xml:325 #, no-c-format msgid "A conversion and upload can be done all in one step using UNIX pipes:" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:327 #, no-c-format msgid "" "raster2pgsql -s 4326 -I -C -M *.tif -F -t 100x100 public.demelevation | psql " "-d gisdb" msgstr "" #. Tag: para #: using_raster_dataman.xml:329 #, no-c-format msgid "" "Load rasters Massachusetts state plane meters aerial tiles into a schema " "called aerial and create a full view, 2 and 4 level " "overview tables, use copy mode for inserting (no intermediary file just " "straight to db), and -e don't force everything in a transaction (good if you " "want to see data in tables right away without waiting). Break up the rasters " "into 128x128 pixel tiles and apply raster constraints. Use copy mode instead " "of table insert. (-F) Include a field called filename to hold the name of " "the file the tiles were cut from." msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:331 #, no-c-format msgid "" "raster2pgsql -I -C -e -Y -F -s 26986 -t 128x128 -l 2,4 bostonaerials2008/*." "jpg aerials.boston | psql -U postgres -d gisdb -h localhost -p 5432" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:333 #, no-c-format msgid "" "--get a list of raster types supported:\n" "raster2pgsql -G" msgstr "" #. Tag: para #: using_raster_dataman.xml:335 #, no-c-format msgid "The -G commands outputs a list something like" msgstr "" #. Tag: screen #: using_raster_dataman.xml:336 #, no-c-format msgid "" "Available GDAL raster formats:\n" " Virtual Raster\n" " GeoTIFF\n" " National Imagery Transmission Format\n" " Raster Product Format TOC format\n" " ECRG TOC format\n" " Erdas Imagine Images (.img)\n" " CEOS SAR Image\n" " CEOS Image\n" " JAXA PALSAR Product Reader (Level 1.1/1.5)\n" " Ground-based SAR Applications Testbed File Format (.gff)\n" " ELAS\n" " Arc/Info Binary Grid\n" " Arc/Info ASCII Grid\n" " GRASS ASCII Grid\n" " SDTS Raster\n" " DTED Elevation Raster\n" " Portable Network Graphics\n" " JPEG JFIF\n" " In Memory Raster\n" " Japanese DEM (.mem)\n" " Graphics Interchange Format (.gif)\n" " Graphics Interchange Format (.gif)\n" " Envisat Image Format\n" " Maptech BSB Nautical Charts\n" " X11 PixMap Format\n" " MS Windows Device Independent Bitmap\n" " SPOT DIMAP\n" " AirSAR Polarimetric Image\n" " RadarSat 2 XML Product\n" " PCIDSK Database File\n" " PCRaster Raster File\n" " ILWIS Raster Map\n" " SGI Image File Format 1.0\n" " SRTMHGT File Format\n" " Leveller heightfield\n" " Terragen heightfield\n" " USGS Astrogeology ISIS cube (Version 3)\n" " USGS Astrogeology ISIS cube (Version 2)\n" " NASA Planetary Data System\n" " EarthWatch .TIL\n" " ERMapper .ers Labelled\n" " NOAA Polar Orbiter Level 1b Data Set\n" " FIT Image\n" " GRIdded Binary (.grb)\n" " Raster Matrix Format\n" " EUMETSAT Archive native (.nat)\n" " Idrisi Raster A.1\n" " Intergraph Raster\n" " Golden Software ASCII Grid (.grd)\n" " Golden Software Binary Grid (.grd)\n" " Golden Software 7 Binary Grid (.grd)\n" " COSAR Annotated Binary Matrix (TerraSAR-X)\n" " TerraSAR-X Product\n" " DRDC COASP SAR Processor Raster\n" " R Object Data Store\n" " Portable Pixmap Format (netpbm)\n" " USGS DOQ (Old Style)\n" " USGS DOQ (New Style)\n" " ENVI .hdr Labelled\n" " ESRI .hdr Labelled\n" " Generic Binary (.hdr Labelled)\n" " PCI .aux Labelled\n" " Vexcel MFF Raster\n" " Vexcel MFF2 (HKV) Raster\n" " Fuji BAS Scanner Image\n" " GSC Geogrid\n" " EOSAT FAST Format\n" " VTP .bt (Binary Terrain) 1.3 Format\n" " Erdas .LAN/.GIS\n" " Convair PolGASP\n" " Image Data and Analysis\n" " NLAPS Data Format\n" " Erdas Imagine Raw\n" " DIPEx\n" " FARSITE v.4 Landscape File (.lcp)\n" " NOAA Vertical Datum .GTX\n" " NADCON .los/.las Datum Grid Shift\n" " NTv2 Datum Grid Shift\n" " ACE2\n" " Snow Data Assimilation System\n" " Swedish Grid RIK (.rik)\n" " USGS Optional ASCII DEM (and CDED)\n" " GeoSoft Grid Exchange Format\n" " Northwood Numeric Grid Format .grd/.tab\n" " Northwood Classified Grid Format .grc/.tab\n" " ARC Digitized Raster Graphics\n" " Standard Raster Product (ASRP/USRP)\n" " Magellan topo (.blx)\n" " SAGA GIS Binary Grid (.sdat)\n" " Kml Super Overlay\n" " ASCII Gridded XYZ\n" " HF2/HFZ heightfield raster\n" " OziExplorer Image File\n" " USGS LULC Composite Theme Grid\n" " Arc/Info Export E00 GRID\n" " ZMap Plus Grid\n" " NOAA NGS Geoid Height Grids" msgstr "" #. Tag: title #: using_raster_dataman.xml:339 #, no-c-format msgid "Creating rasters using PostGIS raster functions" msgstr "" #. Tag: para #: using_raster_dataman.xml:340 #, no-c-format msgid "" "On many occasions, you'll want to create rasters and raster tables right in " "the database. There are a plethora of functions to do that. The general " "steps to follow." msgstr "" #. Tag: para #: using_raster_dataman.xml:342 #, no-c-format msgid "" "Create a table with a raster column to hold the new raster records which can " "be accomplished with:" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:343 #, no-c-format msgid "CREATE TABLE myrasters(rid serial primary key, rast raster);" msgstr "" #. Tag: para #: using_raster_dataman.xml:346 #, no-c-format msgid "" "There are many functions to help with that goal. If you are creating rasters " "not as a derivative of other rasters, you will want to start with: , followed by " msgstr "" #. Tag: para #: using_raster_dataman.xml:348 #, no-c-format msgid "" "You can also create rasters from geometries. To achieve that you'll want to " "use perhaps accompanied with other " "functions such as or or any of the family of other map algebra " "functions." msgstr "" #. Tag: para #: using_raster_dataman.xml:350 #, no-c-format msgid "" "There are even many more options for creating new raster tables from " "existing tables. For example you can create a raster table in a different " "projection from an existing one using " msgstr "" #. Tag: para #: using_raster_dataman.xml:352 #, no-c-format msgid "" "Once you are done populating your table initially, you'll want to create a " "spatial index on the raster column with something like:" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:353 #, no-c-format msgid "" "CREATE INDEX myrasters_rast_st_convexhull_idx ON myrasters USING " "gist( ST_ConvexHull(rast) );" msgstr "" #. Tag: para #: using_raster_dataman.xml:354 #, no-c-format msgid "" "Note the use of since most raster " "operators are based on the convex hull of the rasters." msgstr "" #. Tag: para #: using_raster_dataman.xml:355 #, no-c-format msgid "" "Pre-2.0 versions of PostGIS raster were based on the envelop rather than the " "convex hull. For the spatial indexes to work properly you'll need to drop " "those and replace with convex hull based index." msgstr "" #. Tag: para #: using_raster_dataman.xml:356 #, no-c-format msgid "" "Apply raster constraints using " msgstr "" #. Tag: title #: using_raster_dataman.xml:361 #, no-c-format msgid "Raster Catalogs" msgstr "" #. Tag: para #: using_raster_dataman.xml:362 #, no-c-format msgid "" "There are two raster catalog views that come packaged with PostGIS. Both " "views utilize information embedded in the constraints of the raster tables. " "As a result the catalog views are always consistent with the raster data in " "the tables since the constraints are enforced." msgstr "" #. Tag: para #: using_raster_dataman.xml:366 #, no-c-format msgid "" "raster_columns this view catalogs all the raster table " "columns in your database." msgstr "" #. Tag: para #: using_raster_dataman.xml:369 #, no-c-format msgid "" "raster_overviews this view catalogs all the raster table " "columns in your database that serve as overviews for a finer grained table. " "Tables of this type are generated when you use the -l " "switch during load." msgstr "" #. Tag: title #: using_raster_dataman.xml:373 #, no-c-format msgid "Raster Columns Catalog" msgstr "" #. Tag: para #: using_raster_dataman.xml:374 #, no-c-format msgid "" "The raster_columns is a catalog of all raster table " "columns in your database that are of type raster. It is a view utilizing the " "constraints on the tables so the information is always consistent even if " "you restore one raster table from a backup of another database. The " "following columns exist in the raster_columns catalog." msgstr "" #. Tag: para #: using_raster_dataman.xml:376 #, no-c-format msgid "" "If you created your tables not with the loader or forgot to specify the " "-C flag during load, you can enforce the constraints " "after the fact using so that the " "raster_columns catalog registers the common information " "about your raster tiles." msgstr "" #. Tag: para #: using_raster_dataman.xml:381 #, no-c-format msgid "" "r_table_catalog The database the table is in. This will " "always read the current database." msgstr "" #. Tag: para #: using_raster_dataman.xml:384 #, no-c-format msgid "" "r_table_schema The database schema the raster table " "belongs to." msgstr "" #. Tag: para #: using_raster_dataman.xml:387 #, no-c-format msgid "r_table_name raster table" msgstr "" #. Tag: para #: using_raster_dataman.xml:390 #, no-c-format msgid "" "r_raster_column the column in the r_table_name table that is of type raster. There is nothing in PostGIS " "preventing you from having multiple raster columns per table so its possible " "to have a raster table listed multiple times with a different raster column " "for each." msgstr "" #. Tag: para #: using_raster_dataman.xml:393 #, no-c-format msgid "" "srid The spatial reference identifier of the raster. " "Should be an entry in the ." msgstr "" #. Tag: para #: using_raster_dataman.xml:396 #, no-c-format msgid "" "scale_x The scaling between geometric spatial coordinates " "and pixel. This is only available if all tiles in the raster column have the " "same scale_x and this constraint is applied. Refer to " " for more details." msgstr "" #. Tag: para #: using_raster_dataman.xml:399 #, no-c-format msgid "" "scale_y The scaling between geometric spatial coordinates " "and pixel. This is only available if all tiles in the raster column have the " "same scale_y and the scale_y " "constraint is applied. Refer to for more " "details." msgstr "" #. Tag: para #: using_raster_dataman.xml:402 #, no-c-format msgid "" "blocksize_x The width (number of pixels across) of each " "raster tile . Refer to for more details." msgstr "" #. Tag: para #: using_raster_dataman.xml:405 #, no-c-format msgid "" "blocksize_y The width (number of pixels down) of each " "raster tile . Refer to for more details." msgstr "" #. Tag: para #: using_raster_dataman.xml:408 #, no-c-format msgid "" "same_alignment A boolean that is true if all the raster " "tiles have the same alignment . Refer to for more details." msgstr "" #. Tag: para #: using_raster_dataman.xml:411 #, no-c-format msgid "" "regular_blocking If the raster column has the spatially " "unique and coverage tile constraints, the value with be TRUE. Otherwise, it " "will be FALSE." msgstr "" #. Tag: para #: using_raster_dataman.xml:414 #, no-c-format msgid "" "num_bands The number of bands in each tile of your raster " "set. This is the same information as what is provided by" msgstr "" #. Tag: para #: using_raster_dataman.xml:417 #, no-c-format msgid "" "pixel_types An array defining the pixel type for each " "band. You will have the same number of elements in this array as you have " "number of bands. The pixel_types are one of the following defined in ." msgstr "" #. Tag: para #: using_raster_dataman.xml:420 #, no-c-format msgid "" "nodata_values An array of double precision numbers " "denoting the nodata_value for each band. You will have " "the same number of elements in this array as you have number of bands. These " "numbers define the pixel value for each band that should be ignored for most " "operations. This is similar information provided by ." msgstr "" #. Tag: para #: using_raster_dataman.xml:423 #, no-c-format msgid "" "out_db An array of boolean flags indicating if the raster " "bands data is maintained outside the database. You will have the same number " "of elements in this array as you have number of bands." msgstr "" #. Tag: para #: using_raster_dataman.xml:426 #, no-c-format msgid "" "extent This is the extent of all the raster rows in your " "raster set. If you plan to load more data that will change the extent of the " "set, you'll want to run the " "function before load and then reapply constraints with after load." msgstr "" #. Tag: para #: using_raster_dataman.xml:429 #, no-c-format msgid "" "spatial_index A boolean that is true if raster column has " "a spatial index." msgstr "" #. Tag: title #: using_raster_dataman.xml:434 #, no-c-format msgid "Raster Overviews" msgstr "" #. Tag: para #: using_raster_dataman.xml:435 #, no-c-format msgid "" "raster_overviews catalogs information about raster table " "columns used for overviews and additional information about them that is " "useful to know when utilizing overviews. Overview tables are cataloged in " "both raster_columns and raster_overviews because they are rasters in their own right but also serve an " "additional special purpose of being a lower resolution caricature of a " "higher resolution table. These are generated along-side the main raster " "table when you use the -l switch in raster loading or can " "be generated manually using ." msgstr "" #. Tag: para #: using_raster_dataman.xml:436 #, no-c-format msgid "" "Overview tables contain the same constraints as other raster tables as well " "as additional informational only constraints specific to overviews." msgstr "" #. Tag: para #: using_raster_dataman.xml:437 #, no-c-format msgid "" "The information in raster_overviews does not duplicate " "the information in raster_columns. If you need the " "information about an overview table present in raster_columns you can join the raster_overviews and " "raster_columns together to get the full set of " "information you need." msgstr "" #. Tag: para #: using_raster_dataman.xml:438 #, no-c-format msgid "Two main reasons for overviews are:" msgstr "" #. Tag: para #: using_raster_dataman.xml:440 #, no-c-format msgid "" "Low resolution representation of the core tables commonly used for fast " "mapping zoom-out." msgstr "" #. Tag: para #: using_raster_dataman.xml:441 #, no-c-format msgid "" "Computations are generally faster to do on them than their higher resolution " "parents because there are fewer records and each pixel covers more " "territory. Though the computations are not as accurate as the high-res " "tables they support, they can be sufficient in many rule-of-thumb " "computations." msgstr "" #. Tag: para #: using_raster_dataman.xml:444 #, no-c-format msgid "" "The raster_overviews catalog contains the following " "columns of information." msgstr "" #. Tag: para #: using_raster_dataman.xml:447 #, no-c-format msgid "" "o_table_catalog The database the overview table is in. " "This will always read the current database." msgstr "" #. Tag: para #: using_raster_dataman.xml:450 #, no-c-format msgid "" "o_table_schema The database schema the overview raster " "table belongs to." msgstr "" #. Tag: para #: using_raster_dataman.xml:453 #, no-c-format msgid "o_table_name raster overview table name" msgstr "" #. Tag: para #: using_raster_dataman.xml:456 #, no-c-format msgid "" "o_raster_column the raster column in the overview table." msgstr "" #. Tag: para #: using_raster_dataman.xml:460 #, no-c-format msgid "" "r_table_catalog The database the raster table that this " "overview services is in. This will always read the current database." msgstr "" #. Tag: para #: using_raster_dataman.xml:463 #, no-c-format msgid "" "r_table_schema The database schema the raster table that " "this overview services belongs to." msgstr "" #. Tag: para #: using_raster_dataman.xml:466 #, no-c-format msgid "" "r_table_name raster table that this overview services." msgstr "" #. Tag: para #: using_raster_dataman.xml:469 #, no-c-format msgid "" "r_raster_column the raster column that this overview " "column services." msgstr "" #. Tag: para #: using_raster_dataman.xml:472 #, no-c-format msgid "" "overview_factor - this is the pyramid level of the " "overview table. The higher the number the lower the resolution of the table. " "raster2pgsql if given a folder of images, will compute overview of each " "image file and load separately. Level 1 is assumed and always the original " "file. Level 2 is will have each tile represent 4 of the original. So for " "example if you have a folder of 5000x5000 pixel image files that you chose " "to chunk 125x125, for each image file your base table will have (5000*5000)/" "(125*125) records = 1600, your (l=2) o_2 table will have " "ceiling(1600/Power(2,2)) = 400 rows, your (l=3) o_3 will " "have ceiling(1600/Power(2,3) ) = 200 rows. If your pixels aren't divisible " "by the size of your tiles, you'll get some scrap tiles (tiles not completely " "filled). Note that each overview tile generated by raster2pgsql has the same " "number of pixels as its parent, but is of a lower resolution where each " "pixel of it represents (Power(2,overview_factor) pixels of the original)." msgstr "" #. Tag: title #: using_raster_dataman.xml:484 #, no-c-format msgid "Building Custom Applications with PostGIS Raster" msgstr "" #. Tag: para #: using_raster_dataman.xml:485 #, no-c-format msgid "" "The fact that PostGIS raster provides you with SQL functions to render " "rasters in known image formats gives you a lot of optoins for rendering " "them. For example you can use OpenOffice / LibreOffice for rendering as " "demonstrated in Rendering PostGIS Raster graphics with LibreOffice Base Reports. In addition you can use a wide variety of languages as demonstrated " "in this section." msgstr "" #. Tag: title #: using_raster_dataman.xml:488 #, no-c-format msgid "" "PHP Example Outputting using ST_AsPNG in concert with other raster functions" msgstr "" #. Tag: para #: using_raster_dataman.xml:489 #, no-c-format msgid "" "In this section, we'll demonstrate how to use the PHP PostgreSQL driver and " "the family of functions to output " "band 1,2,3 of a raster to a PHP request stream that can then be embedded in " "an img src html tag." msgstr "" #. Tag: para #: using_raster_dataman.xml:492 using_raster_dataman.xml:504 #, no-c-format msgid "" "The sample query demonstrates how to combine a whole bunch of raster " "functions together to grab all tiles that intersect a particular wgs 84 " "bounding box and then unions with the " "intersecting tiles together returning all bands, transforms to user " "specified projection using , and then " "outputs the results as a png using ." msgstr "" #. Tag: para #: using_raster_dataman.xml:495 #, no-c-format msgid "" "You would call the below using http://mywebserver/" "test_raster.php?srid=2249 to get the raster image in " "Massachusetts state plane feet." msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:496 #, no-c-format msgid "" "]]>" msgstr "" #. Tag: title #: using_raster_dataman.xml:499 #, no-c-format msgid "" "ASP.NET C# Example Outputting using ST_AsPNG in concert with other raster " "functions" msgstr "" #. Tag: para #: using_raster_dataman.xml:500 #, no-c-format msgid "" "In this section, we'll demonstrate how to use Npgsql PostgreSQL .NET driver " "and the family of functions to output " "band 1,2,3 of a raster to a PHP request stream that can then be embedded in " "an img src html tag." msgstr "" #. Tag: para #: using_raster_dataman.xml:503 #, no-c-format msgid "" "You will need the npgsql .NET PostgreSQL driver for this exercise which you " "can get the latest of from http://npgsql.projects.postgresql.org/. Just download the " "latest and drop into your ASP.NET bin folder and you'll be good to go." msgstr "" #. Tag: para #: using_raster_dataman.xml:507 #, no-c-format msgid "" "This is same example as except implemented " "in C#." msgstr "" #. Tag: para #: using_raster_dataman.xml:508 #, no-c-format msgid "" "You would call the below using http://mywebserver/TestRaster." "ashx?srid=2249 to get the raster image in Massachusetts " "state plane feet." msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:509 #, no-c-format msgid "" "-- web.config connection string section --\n" "\n" " \n" "]]>" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:510 #, no-c-format msgid "" "// Code for TestRaster.ashx\n" "\n" "using System;\n" "using System.Data;\n" "using System.Web;\n" "using Npgsql;\n" "\n" "public class TestRaster : IHttpHandler\n" "{\n" " public void ProcessRequest(HttpContext context)\n" " {\n" "\n" " context.Response.ContentType = \"image/png\";\n" " context.Response.BinaryWrite(GetResults(context));\n" "\n" " }\n" "\n" " public bool IsReusable {\n" " get { return false; }\n" " }\n" "\n" " public byte[] GetResults(HttpContext context)\n" " {\n" " byte[] result = null;\n" " NpgsqlCommand command;\n" " string sql = null;\n" " int input_srid = 26986;\n" " try {\n" " using (NpgsqlConnection conn = new " "NpgsqlConnection(System.Configuration.ConfigurationManager." "ConnectionStrings[\"DSN\"].ConnectionString)) {\n" " conn.Open();\n" "\n" " if (context.Request[\"srid\"] != null)\n" " {\n" " input_srid = Convert.ToInt32(context.Request[\"srid" "\"]);\n" " }\n" " sql = @\"SELECT ST_AsPNG(\n" " ST_Transform(\n" " ST_AddBand(\n" " ST_Union(rast,1), ARRAY[ST_Union(rast,2)," "ST_Union(rast,3)])\n" " ,:input_srid) ) As " "new_rast\n" " FROM aerials.boston\n" " WHERE\n" " ST_Intersects(rast,\n" " ST_Transform(ST_MakeEnvelope(-71.1217, " "42.227, -71.1210, 42.218,4326),26986) )\";\n" " command = new NpgsqlCommand(sql, conn);\n" " command.Parameters.Add(new NpgsqlParameter(\"input_srid\", " "input_srid));\n" "\n" "\n" " result = (byte[]) command.ExecuteScalar();\n" " conn.Close();\n" " }\n" "\n" " }\n" " catch (Exception ex)\n" " {\n" " result = null;\n" " context.Response.Write(ex.Message.Trim());\n" " }\n" " return result;\n" " }\n" "}]]>" msgstr "" #. Tag: title #: using_raster_dataman.xml:513 #, no-c-format msgid "Java console app that outputs raster query as Image file" msgstr "" #. Tag: para #: using_raster_dataman.xml:514 #, no-c-format msgid "" "This is a simple java console app that takes a query that returns one image " "and outputs to specified file." msgstr "" #. Tag: para #: using_raster_dataman.xml:515 #, no-c-format msgid "" "You can download the latest PostgreSQL JDBC drivers from http://jdbc.postgresql.org/download." "html" msgstr "" #. Tag: para #: using_raster_dataman.xml:516 #, no-c-format msgid "You can compile the following code using a command something like:" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:517 #, no-c-format msgid "" "set env CLASSPATH .:..\\postgresql-9.0-801.jdbc4.jar\n" "javac SaveQueryImage.java\n" "jar cfm SaveQueryImage.jar Manifest.txt *.class" msgstr "" #. Tag: para #: using_raster_dataman.xml:518 #, no-c-format msgid "And call it from the command-line with something like" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:519 #, no-c-format msgid "" "java -jar SaveQueryImage.jar \"SELECT " "ST_AsPNG(ST_AsRaster(ST_Buffer(ST_Point(1,5),10, 'quad_segs=2'),150, 150, " "'8BUI',100));\" \"test.png\"" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:520 #, no-c-format msgid "" "-- Manifest.txt --\n" "" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:521 #, no-c-format msgid "" "// Code for SaveQueryImage.java\n" "" msgstr "" #. Tag: title #: using_raster_dataman.xml:525 #, no-c-format msgid "Use PLPython to dump out images via SQL" msgstr "" #. Tag: para #: using_raster_dataman.xml:526 #, no-c-format msgid "" "This is a plpython stored function that creates a file in the server " "directory for each record. Requires you have plpython installed. Should work " "fine with both plpythonu and plpython3u." msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:528 #, no-c-format msgid "" "" msgstr "" #. Tag: programlisting #: using_raster_dataman.xml:529 #, no-c-format msgid "" "--write out 5 images to the PostgreSQL server in varying sizes\n" "-- note the postgresql daemon account needs to have write access to folder\n" "-- this echos back the file names created;\n" " SELECT write_file(ST_AsPNG(\n" " ST_AsRaster(ST_Buffer(ST_Point(1,5),j*5, 'quad_segs=2'),150*j, " "150*j, '8BUI',100)),\n" " 'C:/temp/slices'|| j || '.png')\n" " FROM generate_series(1,5) As j;\n" "\n" " write_file\n" "---------------------\n" " C:/temp/slices1.png\n" " C:/temp/slices2.png\n" " C:/temp/slices3.png\n" " C:/temp/slices4.png\n" " C:/temp/slices5.png" msgstr "" #. Tag: title #: using_raster_dataman.xml:532 #, no-c-format msgid "Outputting Rasters with PSQL" msgstr "" #. Tag: para #: using_raster_dataman.xml:533 #, no-c-format msgid "" "Sadly PSQL doesn't have easy to use built-in functionality for outputting " "binaries. This is a bit of a hack that piggy backs on PostgreSQL somewhat " "legacy large object support. To use first launch your psql commandline " "connected to your database." msgstr "" #. Tag: para #: using_raster_dataman.xml:535 #, no-c-format msgid "" "Unlike the python approach, this approach creates the file on your local " "computer." msgstr "" #. Tag: screen #: using_raster_dataman.xml:536 #, no-c-format msgid "" "SELECT oid, lowrite(lo_open(oid, 131072), png) As num_bytes\n" " FROM\n" " ( VALUES (lo_create(0),\n" " ST_AsPNG( (SELECT rast FROM aerials.boston WHERE rid=1) )\n" " ) ) As v(oid,png);\n" "-- you'll get an output something like --\n" " oid | num_bytes\n" "---------+-----------\n" " 2630819 | 74860\n" "\n" "-- next note the oid and do this replacing the c:/test.png to file path " "location\n" "-- on your local computer\n" " \\lo_export 2630819 'C:/temp/aerial_samp.png'\n" "\n" "-- this deletes the file from large object storage on db\n" "SELECT lo_unlink(2630819);" msgstr ""