1# SOME DESCRIPTIVE TITLE. 2# 3# Translators: 4# pibinko <pibinko@gmail.com>, 2014 5msgid "" 6msgstr "" 7"Project-Id-Version: PostGIS\n" 8"Report-Msgid-Bugs-To: http://bugs.kde.org\n" 9"POT-Creation-Date: 2020-01-16 16:27+0000\n" 10"PO-Revision-Date: 2015-09-29 12:24+0000\n" 11"Last-Translator: Sandro Santilli <strk@kbt.io>\n" 12"Language-Team: Italian (Italy) (http://www.transifex.com/postgis/postgis/" 13"language/it_IT/)\n" 14"Language: it_IT\n" 15"MIME-Version: 1.0\n" 16"Content-Type: text/plain; charset=UTF-8\n" 17"Content-Transfer-Encoding: 8bit\n" 18"Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 20#. Tag: title 21#: reference_raster.xml:3 22#, no-c-format 23msgid "Raster Reference" 24msgstr "" 25 26#. Tag: para 27#: reference_raster.xml:5 28#, no-c-format 29msgid "" 30"The functions given below are the ones which a user of PostGIS Raster is " 31"likely to need and which are currently available in PostGIS Raster. There " 32"are other functions which are required support functions to the raster " 33"objects which are not of use to a general user." 34msgstr "" 35"Le funzioni riportate sotto sono quelle che un utente di PostGIS Raster si " 36"troverà a utilizzare più frequentemente e che sono disponibili in PostGIS " 37"Raster. Esistono altre funzioni che sono di supporto agli oggetti raster e " 38"che non servono a un utilizzo generale." 39 40#. Tag: para 41#: reference_raster.xml:9 42#, no-c-format 43msgid "" 44"<varname>raster</varname> is a new PostGIS type for storing and analyzing " 45"raster data." 46msgstr "" 47"Il tipo <varname>raster</varname> è un nuovo tipo di dati PostGIS per " 48"archiviare e analizzare dati raster." 49 50#. Tag: para 51#: reference_raster.xml:10 52#, no-c-format 53msgid "" 54"For loading rasters from raster files please refer to <xref linkend=" 55"\"RT_Loading_Rasters\"/>" 56msgstr "" 57 58#. Tag: para 59#: reference_raster.xml:12 60#, no-c-format 61msgid "" 62"For the examples in this reference we will be using a raster table of dummy " 63"rasters - Formed with the following code" 64msgstr "" 65 66#. Tag: programlisting 67#: reference_raster.xml:13 68#, fuzzy, no-c-format 69msgid "" 70"CREATE TABLE dummy_rast(rid integer, rast raster);\n" 71"INSERT INTO dummy_rast(rid, rast)\n" 72"VALUES (1,\n" 73"('01' -- little endian (uint8 ndr)\n" 74"||\n" 75"'0000' -- version (uint16 0)\n" 76"||\n" 77"'0000' -- nBands (uint16 0)\n" 78"||\n" 79"'0000000000000040' -- scaleX (float64 2)\n" 80"||\n" 81"'0000000000000840' -- scaleY (float64 3)\n" 82"||\n" 83"'000000000000E03F' -- ipX (float64 0.5)\n" 84"||\n" 85"'000000000000E03F' -- ipY (float64 0.5)\n" 86"||\n" 87"'0000000000000000' -- skewX (float64 0)\n" 88"||\n" 89"'0000000000000000' -- skewY (float64 0)\n" 90"||\n" 91"'00000000' -- SRID (int32 0)\n" 92"||\n" 93"'0A00' -- width (uint16 10)\n" 94"||\n" 95"'1400' -- height (uint16 20)\n" 96")::raster\n" 97"),\n" 98"-- Raster: 5 x 5 pixels, 3 bands, PT_8BUI pixel type, NODATA = 0\n" 99"(2, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A' ||\n" 100"'41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEF' " 101"||\n" 102"'EFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::" 103"raster);" 104msgstr "" 105"CREATE TABLE dummy_rast(rid integer, rast raster);\n" 106"INSERT INTO dummy_rast(rid, rast)\n" 107"VALUES (1,\n" 108"('01' -- little endian (uint8 ndr)\n" 109"|| \n" 110"'0000' -- version (uint16 0)\n" 111"||\n" 112"'0000' -- nBands (uint16 0)\n" 113"||\n" 114"'0000000000000040' -- scaleX (float64 2)\n" 115"||\n" 116"'0000000000000840' -- scaleY (float64 3)\n" 117"||\n" 118"'000000000000E03F' -- ipX (float64 0.5)\n" 119"||\n" 120"'000000000000E03F' -- ipY (float64 0.5)\n" 121"||\n" 122"'0000000000000000' -- skewX (float64 0)\n" 123"||\n" 124"'0000000000000000' -- skewY (float64 0)\n" 125"||\n" 126"'00000000' -- SRID (int32 0)\n" 127"||\n" 128"'0A00' -- width (uint16 10)\n" 129"||\n" 130"'1400' -- height (uint16 20)\n" 131")::raster\n" 132"),\n" 133"-- Raster: 5 x 5 pixels, 3 bands, PT_8BUI pixel type, NODATA = 0\n" 134"(2, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A' ||\n" 135"'41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEF' " 136"||\n" 137"'EFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::" 138"raster);" 139 140#. Tag: para 141#: reference_raster.xml:17 142#, no-c-format 143msgid "" 144"This section lists the PostgreSQL data types specifically created to support " 145"raster functionality." 146msgstr "" 147 148#. Tag: title 149#: reference_raster.xml:20 150#, no-c-format 151msgid "Raster Support Data types" 152msgstr "" 153 154#. Tag: refname 155#: reference_raster.xml:24 156#, no-c-format 157msgid "geomval" 158msgstr "geomval" 159 160#. Tag: refpurpose 161#: reference_raster.xml:25 162#, no-c-format 163msgid "" 164"A spatial datatype with two fields - geom (holding a geometry object) and " 165"val (holding a double precision pixel value from a raster band)." 166msgstr "" 167 168#. Tag: title 169#: reference_raster.xml:30 reference_raster.xml:49 reference_raster.xml:121 170#: reference_raster.xml:171 reference_raster.xml:216 reference_raster.xml:262 171#: reference_raster.xml:359 reference_raster.xml:540 reference_raster.xml:714 172#: reference_raster.xml:781 reference_raster.xml:850 reference_raster.xml:893 173#: reference_raster.xml:928 reference_raster.xml:965 reference_raster.xml:1008 174#: reference_raster.xml:1069 reference_raster.xml:1114 175#: reference_raster.xml:1229 reference_raster.xml:1438 176#: reference_raster.xml:1525 reference_raster.xml:1611 177#: reference_raster.xml:1668 reference_raster.xml:1735 178#: reference_raster.xml:1800 reference_raster.xml:1842 179#: reference_raster.xml:1892 reference_raster.xml:1931 180#: reference_raster.xml:1965 reference_raster.xml:2002 181#: reference_raster.xml:2045 reference_raster.xml:2080 182#: reference_raster.xml:2114 reference_raster.xml:2164 183#: reference_raster.xml:2218 reference_raster.xml:2255 184#: reference_raster.xml:2295 reference_raster.xml:2350 185#: reference_raster.xml:2405 reference_raster.xml:2451 186#: reference_raster.xml:2486 reference_raster.xml:2522 187#: reference_raster.xml:2558 reference_raster.xml:2593 188#: reference_raster.xml:2632 reference_raster.xml:2666 189#: reference_raster.xml:2700 reference_raster.xml:2744 190#: reference_raster.xml:2806 reference_raster.xml:2861 191#: reference_raster.xml:2907 reference_raster.xml:2969 192#: reference_raster.xml:3011 reference_raster.xml:3062 193#: reference_raster.xml:3097 reference_raster.xml:3133 194#: reference_raster.xml:3167 reference_raster.xml:3242 195#: reference_raster.xml:3285 reference_raster.xml:3331 196#: reference_raster.xml:3393 reference_raster.xml:3436 197#: reference_raster.xml:3491 reference_raster.xml:3534 198#: reference_raster.xml:3610 reference_raster.xml:3697 199#: reference_raster.xml:3784 reference_raster.xml:3872 200#: reference_raster.xml:3957 reference_raster.xml:4083 201#: reference_raster.xml:4180 reference_raster.xml:4232 202#: reference_raster.xml:4280 reference_raster.xml:4323 203#: reference_raster.xml:4370 reference_raster.xml:4414 204#: reference_raster.xml:4452 reference_raster.xml:4527 205#: reference_raster.xml:4596 reference_raster.xml:4664 206#: reference_raster.xml:4741 reference_raster.xml:4813 207#: reference_raster.xml:4892 reference_raster.xml:5000 208#: reference_raster.xml:5035 reference_raster.xml:5082 209#: reference_raster.xml:5135 reference_raster.xml:5210 210#: reference_raster.xml:5275 reference_raster.xml:5388 211#: reference_raster.xml:5509 reference_raster.xml:5575 212#: reference_raster.xml:5654 reference_raster.xml:5800 213#: reference_raster.xml:5842 reference_raster.xml:5885 214#: reference_raster.xml:5939 reference_raster.xml:5992 215#: reference_raster.xml:6044 reference_raster.xml:6139 216#: reference_raster.xml:6230 reference_raster.xml:6318 217#: reference_raster.xml:6429 reference_raster.xml:6622 218#: reference_raster.xml:6861 reference_raster.xml:7004 219#: reference_raster.xml:7153 reference_raster.xml:7483 220#: reference_raster.xml:7689 reference_raster.xml:7813 221#: reference_raster.xml:8139 reference_raster.xml:8257 222#: reference_raster.xml:8370 reference_raster.xml:8512 223#: reference_raster.xml:8598 reference_raster.xml:8670 224#: reference_raster.xml:8734 reference_raster.xml:8805 225#: reference_raster.xml:8880 reference_raster.xml:8963 226#: reference_raster.xml:9034 reference_raster.xml:9090 227#: reference_raster.xml:9165 reference_raster.xml:9236 228#: reference_raster.xml:9320 reference_raster.xml:9412 229#: reference_raster.xml:9494 reference_raster.xml:9548 230#: reference_raster.xml:9622 reference_raster.xml:9670 231#: reference_raster.xml:9722 reference_raster.xml:9764 232#: reference_raster.xml:9812 reference_raster.xml:9863 233#: reference_raster.xml:9911 reference_raster.xml:9953 234#: reference_raster.xml:10027 reference_raster.xml:10072 235#: reference_raster.xml:10116 reference_raster.xml:10161 236#: reference_raster.xml:10230 reference_raster.xml:10277 237#: reference_raster.xml:10350 reference_raster.xml:10418 238#: reference_raster.xml:10507 reference_raster.xml:10592 239#: reference_raster.xml:10673 reference_raster.xml:10754 240#: reference_raster.xml:10883 reference_raster.xml:10967 241#: reference_raster.xml:11047 reference_raster.xml:11166 242#: reference_raster.xml:11213 reference_raster.xml:11285 243#: reference_raster.xml:11382 reference_raster.xml:11475 244#, no-c-format 245msgid "Description" 246msgstr "Descrizione" 247 248#. Tag: para 249#: reference_raster.xml:31 250#, no-c-format 251msgid "" 252"geomval is a compound data type consisting of a geometry object referenced " 253"by the .geom field and val, a double precision value that represents the " 254"pixel value at a particular geometric location in a raster band. It is used " 255"by the ST_DumpAsPolygon and Raster intersection family of functions as an " 256"output type to explode a raster band into geometry polygons." 257msgstr "" 258 259#. Tag: title 260#: reference_raster.xml:37 reference_raster.xml:107 reference_raster.xml:157 261#: reference_raster.xml:205 reference_raster.xml:250 reference_raster.xml:345 262#: reference_raster.xml:394 reference_raster.xml:588 reference_raster.xml:729 263#: reference_raster.xml:807 reference_raster.xml:867 reference_raster.xml:903 264#: reference_raster.xml:940 reference_raster.xml:978 reference_raster.xml:1033 265#: reference_raster.xml:1084 reference_raster.xml:1143 266#: reference_raster.xml:1273 reference_raster.xml:1490 267#: reference_raster.xml:1580 reference_raster.xml:1625 268#: reference_raster.xml:1688 reference_raster.xml:1764 269#: reference_raster.xml:1815 reference_raster.xml:1863 270#: reference_raster.xml:1910 reference_raster.xml:1944 271#: reference_raster.xml:1980 reference_raster.xml:2023 272#: reference_raster.xml:2059 reference_raster.xml:2093 273#: reference_raster.xml:2137 reference_raster.xml:2197 274#: reference_raster.xml:2234 reference_raster.xml:2272 275#: reference_raster.xml:2317 reference_raster.xml:2376 276#: reference_raster.xml:2430 reference_raster.xml:2465 277#: reference_raster.xml:2501 reference_raster.xml:2537 278#: reference_raster.xml:2572 reference_raster.xml:2606 279#: reference_raster.xml:2645 reference_raster.xml:2679 280#: reference_raster.xml:2714 reference_raster.xml:2764 281#: reference_raster.xml:2821 reference_raster.xml:2876 282#: reference_raster.xml:2947 reference_raster.xml:2982 283#: reference_raster.xml:3037 reference_raster.xml:3075 284#: reference_raster.xml:3220 reference_raster.xml:3257 285#: reference_raster.xml:3299 reference_raster.xml:3361 286#: reference_raster.xml:3404 reference_raster.xml:3459 287#: reference_raster.xml:3502 reference_raster.xml:3557 288#: reference_raster.xml:3632 reference_raster.xml:3722 289#: reference_raster.xml:3816 reference_raster.xml:3887 290#: reference_raster.xml:4036 reference_raster.xml:4102 291#: reference_raster.xml:4258 reference_raster.xml:4293 292#: reference_raster.xml:4342 reference_raster.xml:4387 293#: reference_raster.xml:4427 reference_raster.xml:4465 294#: reference_raster.xml:4557 reference_raster.xml:4622 295#: reference_raster.xml:4691 reference_raster.xml:4769 296#: reference_raster.xml:4843 reference_raster.xml:4965 297#: reference_raster.xml:5013 reference_raster.xml:5054 298#: reference_raster.xml:5107 reference_raster.xml:5160 299#: reference_raster.xml:5231 reference_raster.xml:5292 300#: reference_raster.xml:5423 reference_raster.xml:5524 301#: reference_raster.xml:5611 reference_raster.xml:5671 302#: reference_raster.xml:5818 reference_raster.xml:5859 303#: reference_raster.xml:5902 reference_raster.xml:5967 304#: reference_raster.xml:6015 reference_raster.xml:6093 305#: reference_raster.xml:6184 reference_raster.xml:6275 306#: reference_raster.xml:6355 reference_raster.xml:6585 307#: reference_raster.xml:6819 reference_raster.xml:6928 308#: reference_raster.xml:7063 reference_raster.xml:7414 309#: reference_raster.xml:7650 reference_raster.xml:7763 310#: reference_raster.xml:8055 reference_raster.xml:8214 311#: reference_raster.xml:8337 reference_raster.xml:8470 312#: reference_raster.xml:8541 reference_raster.xml:8629 313#: reference_raster.xml:8702 reference_raster.xml:8772 314#: reference_raster.xml:8841 reference_raster.xml:8923 315#: reference_raster.xml:9002 reference_raster.xml:9057 316#: reference_raster.xml:9126 reference_raster.xml:9197 317#: reference_raster.xml:9272 reference_raster.xml:9365 318#: reference_raster.xml:9462 reference_raster.xml:9505 319#: reference_raster.xml:9590 reference_raster.xml:9638 320#: reference_raster.xml:9689 reference_raster.xml:9739 321#: reference_raster.xml:9784 reference_raster.xml:9837 322#: reference_raster.xml:9883 reference_raster.xml:9926 323#: reference_raster.xml:9965 reference_raster.xml:10175 324#: reference_raster.xml:10243 reference_raster.xml:10296 325#: reference_raster.xml:10362 reference_raster.xml:10453 326#: reference_raster.xml:10538 reference_raster.xml:10619 327#: reference_raster.xml:10700 reference_raster.xml:10784 328#: reference_raster.xml:10913 reference_raster.xml:10994 329#: reference_raster.xml:11074 reference_raster.xml:11187 330#: reference_raster.xml:11231 reference_raster.xml:11318 331#: reference_raster.xml:11413 reference_raster.xml:11506 332#, no-c-format 333msgid "See Also" 334msgstr "Si veda anche" 335 336#. Tag: refname 337#: reference_raster.xml:44 338#, no-c-format 339msgid "addbandarg" 340msgstr "addbandarg" 341 342#. Tag: refpurpose 343#: reference_raster.xml:45 344#, no-c-format 345msgid "" 346"<refpurpose>A composite type used as input into the ST_AddBand function " 347"defining the attributes and initial value of the new band.</refpurpose>" 348msgstr "" 349 350#. Tag: para 351#: reference_raster.xml:50 352#, no-c-format 353msgid "" 354"<para>A composite type used as input into the ST_AddBand function defining " 355"the attributes and initial value of the new band.</para>" 356msgstr "" 357 358#. Tag: term 359#: reference_raster.xml:55 360#, no-c-format 361msgid "<parameter>index </parameter> <type>integer</type>" 362msgstr "<parameter>index </parameter> <type>integer</type>" 363 364#. Tag: para 365#: reference_raster.xml:60 366#, no-c-format 367msgid "" 368"1-based value indicating the position where the new band will be added " 369"amongst the raster's bands. If NULL, the new band will be added at the end " 370"of the raster's bands." 371msgstr "" 372 373#. Tag: term 374#: reference_raster.xml:67 375#, no-c-format 376msgid "<parameter>pixeltype </parameter> <type>text</type>" 377msgstr "<parameter>pixeltype </parameter> <type>text</type>" 378 379#. Tag: para 380#: reference_raster.xml:72 381#, no-c-format 382msgid "" 383"Pixel type of the new band. One of defined pixel types as described in <xref " 384"linkend=\"RT_ST_BandPixelType\"/>." 385msgstr "" 386 387#. Tag: term 388#: reference_raster.xml:79 389#, no-c-format 390msgid "<parameter>initialvalue </parameter> <type>double precision</type>" 391msgstr "<parameter>initialvalue </parameter> <type>double precision</type>" 392 393#. Tag: para 394#: reference_raster.xml:84 395#, no-c-format 396msgid "Initial value that all pixels of new band will be set to." 397msgstr "" 398 399#. Tag: term 400#: reference_raster.xml:91 401#, no-c-format 402msgid "<parameter>nodataval </parameter> <type>double precision</type>" 403msgstr "<parameter>nodataval </parameter> <type>double precision</type>" 404 405#. Tag: para 406#: reference_raster.xml:96 407#, no-c-format 408msgid "" 409"NODATA value of the new band. If NULL, the new band will not have a NODATA " 410"value assigned." 411msgstr "" 412 413#. Tag: refname 414#: reference_raster.xml:116 415#, no-c-format 416msgid "rastbandarg" 417msgstr "rastbandarg" 418 419#. Tag: refpurpose 420#: reference_raster.xml:117 421#, no-c-format 422msgid "" 423"<refpurpose>A composite type for use when needing to express a raster and a " 424"band index of that raster.</refpurpose>" 425msgstr "" 426 427#. Tag: para 428#: reference_raster.xml:122 429#, no-c-format 430msgid "" 431"<para>A composite type for use when needing to express a raster and a band " 432"index of that raster.</para>" 433msgstr "" 434 435#. Tag: term 436#: reference_raster.xml:128 437#, no-c-format 438msgid "<parameter>rast </parameter> <type>raster</type>" 439msgstr "<parameter>rast </parameter> <type>raster</type>" 440 441#. Tag: para 442#: reference_raster.xml:133 443#, no-c-format 444msgid "The raster in question/" 445msgstr "" 446 447#. Tag: term 448#: reference_raster.xml:140 reference_raster.xml:365 449#, no-c-format 450msgid "<parameter>nband </parameter> <type>integer</type>" 451msgstr "<parameter>nband </parameter> <type>integer</type>" 452 453#. Tag: para 454#: reference_raster.xml:145 455#, no-c-format 456msgid "1-based value indicating the band of raster" 457msgstr "" 458 459#. Tag: refname 460#: reference_raster.xml:166 461#, no-c-format 462msgid "raster" 463msgstr "raster" 464 465#. Tag: refpurpose 466#: reference_raster.xml:167 467#, no-c-format 468msgid "raster spatial data type." 469msgstr "" 470 471#. Tag: para 472#: reference_raster.xml:172 473#, no-c-format 474msgid "" 475"raster is a spatial data type used to represent raster data such as those " 476"imported from JPEGs, TIFFs, PNGs, digital elevation models. Each raster has " 477"1 or more bands each having a set of pixel values. Rasters can be " 478"georeferenced." 479msgstr "" 480 481#. Tag: para 482#: reference_raster.xml:175 483#, no-c-format 484msgid "" 485"Requires PostGIS Raster support to be enabled in the database. See <xref " 486"linkend=\"create_spatial_db\"/> for more details." 487msgstr "" 488 489#. Tag: para 490#: reference_raster.xml:180 491#, no-c-format 492msgid "" 493"Requires PostGIS be compiled with GDAL support. Currently rasters can be " 494"implicitly converted to geometry type, but the conversion returns the <xref " 495"linkend=\"RT_ST_ConvexHull\"/> of the raster. This auto casting may be " 496"removed in the near future so don't rely on it." 497msgstr "" 498 499#. Tag: title 500#: reference_raster.xml:186 501#, no-c-format 502msgid "Casting Behavior" 503msgstr "" 504 505#. Tag: para 506#: reference_raster.xml:187 507#, no-c-format 508msgid "" 509"This section lists the automatic as well as explicit casts allowed for this " 510"data type" 511msgstr "" 512 513#. Tag: entry 514#: reference_raster.xml:192 515#, no-c-format 516msgid "Cast To" 517msgstr "" 518 519#. Tag: entry 520#: reference_raster.xml:193 521#, no-c-format 522msgid "Behavior" 523msgstr "" 524 525#. Tag: entry 526#: reference_raster.xml:196 527#, no-c-format 528msgid "geometry" 529msgstr "" 530 531#. Tag: entry 532#: reference_raster.xml:197 533#, no-c-format 534msgid "automatic" 535msgstr "" 536 537#. Tag: refname 538#: reference_raster.xml:212 539#, no-c-format 540msgid "reclassarg" 541msgstr "" 542 543#. Tag: refpurpose 544#: reference_raster.xml:213 545#, no-c-format 546msgid "" 547"<refpurpose>A composite type used as input into the ST_Reclass function " 548"defining the behavior of reclassification.</refpurpose>" 549msgstr "" 550 551#. Tag: para 552#: reference_raster.xml:217 553#, no-c-format 554msgid "" 555"<para>A composite type used as input into the ST_Reclass function defining " 556"the behavior of reclassification.</para>" 557msgstr "" 558 559#. Tag: term 560#: reference_raster.xml:220 561#, no-c-format 562msgid "<parameter>nband </parameter><type>integer</type>" 563msgstr "<parameter>nband </parameter><type>integer</type>" 564 565#. Tag: para 566#: reference_raster.xml:221 567#, no-c-format 568msgid "The band number of band to reclassify." 569msgstr "" 570 571#. Tag: term 572#: reference_raster.xml:224 573#, no-c-format 574msgid "<parameter>reclassexpr </parameter><type>text</type>" 575msgstr "<parameter>reclassexpr </parameter><type>text</type>" 576 577#. Tag: para 578#: reference_raster.xml:225 579#, no-c-format 580msgid "" 581"range expression consisting of comma delimited range:map_range mappings. : " 582"to define mapping that defines how to map old band values to new band " 583"values. ( means >, ) means less than, ] < or equal, [ means > or " 584"equal" 585msgstr "" 586 587#. Tag: programlisting 588#: reference_raster.xml:226 589#, no-c-format 590msgid "" 591"1. [a-b] = a <= x <= b\n" 592"\n" 593"2. (a-b] = a < x <= b\n" 594"\n" 595"3. [a-b) = a <= x < b\n" 596"\n" 597"4. (a-b) = a < x < b" 598msgstr "" 599"1. [a-b] = a <= x <= b\n" 600"\n" 601"2. (a-b] = a < x <= b\n" 602"\n" 603"3. [a-b) = a <= x < b\n" 604"\n" 605"4. (a-b) = a < x < b" 606 607#. Tag: para 608#: reference_raster.xml:227 609#, no-c-format 610msgid "( notation is optional so a-b means the same as (a-b)" 611msgstr "" 612 613#. Tag: term 614#: reference_raster.xml:232 615#, no-c-format 616msgid "<parameter>pixeltype </parameter><type>text</type>" 617msgstr "<parameter>pixeltype </parameter><type>text</type>" 618 619#. Tag: para 620#: reference_raster.xml:233 621#, no-c-format 622msgid "" 623"One of defined pixel types as described in <xref linkend=" 624"\"RT_ST_BandPixelType\"/>" 625msgstr "" 626 627#. Tag: term 628#: reference_raster.xml:236 629#, no-c-format 630msgid "<parameter>nodataval </parameter><type>double precision</type>" 631msgstr "<parameter>nodataval </parameter><type>double precision</type>" 632 633#. Tag: para 634#: reference_raster.xml:237 635#, no-c-format 636msgid "" 637"Value to treat as no data. For image outputs that support transparency, " 638"these will be blank." 639msgstr "" 640 641#. Tag: title 642#: reference_raster.xml:242 643#, no-c-format 644msgid "Example: Reclassify band 2 as an 8BUI where 255 is nodata value" 645msgstr "" 646 647#. Tag: programlisting 648#: reference_raster.xml:243 649#, no-c-format 650msgid "" 651"SELECT ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', " 652"255)::reclassarg;" 653msgstr "" 654"SELECT ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', " 655"255)::reclassarg;" 656 657#. Tag: title 658#: reference_raster.xml:246 659#, no-c-format 660msgid "Example: Reclassify band 1 as an 1BB and no nodata value defined" 661msgstr "" 662 663#. Tag: programlisting 664#: reference_raster.xml:247 665#, no-c-format 666msgid "SELECT ROW(1, '0-100]:0, (100-255:1', '1BB', NULL)::reclassarg;" 667msgstr "SELECT ROW(1, '0-100]:0, (100-255:1', '1BB', NULL)::reclassarg;" 668 669#. Tag: refname 670#: reference_raster.xml:257 671#, no-c-format 672msgid "summarystats" 673msgstr "" 674 675#. Tag: refpurpose 676#: reference_raster.xml:258 677#, no-c-format 678msgid "" 679"A composite type returned by the ST_SummaryStats and ST_SummaryStatsAgg " 680"functions." 681msgstr "" 682 683#. Tag: para 684#: reference_raster.xml:263 685#, no-c-format 686msgid "" 687"A composite type returned by the <xref linkend=\"RT_ST_SummaryStats\"/> and " 688"<xref linkend=\"RT_ST_SummaryStatsAgg\"/> functions." 689msgstr "" 690 691#. Tag: term 692#: reference_raster.xml:268 693#, no-c-format 694msgid "<parameter>count </parameter> <type>integer</type>" 695msgstr "" 696 697#. Tag: para 698#: reference_raster.xml:273 699#, no-c-format 700msgid "Number of pixels counted for the summary statistics." 701msgstr "" 702 703#. Tag: term 704#: reference_raster.xml:280 705#, no-c-format 706msgid "<parameter>sum </parameter> <type>double precision</type>" 707msgstr "" 708 709#. Tag: para 710#: reference_raster.xml:285 711#, no-c-format 712msgid "Sum of all counted pixel values." 713msgstr "" 714 715#. Tag: term 716#: reference_raster.xml:292 717#, no-c-format 718msgid "<parameter>mean </parameter> <type>double precision</type>" 719msgstr "" 720 721#. Tag: para 722#: reference_raster.xml:297 723#, no-c-format 724msgid "Arithmetic mean of all counted pixel values." 725msgstr "" 726 727#. Tag: term 728#: reference_raster.xml:304 729#, no-c-format 730msgid "<parameter>stddev </parameter> <type>double precision</type>" 731msgstr "" 732 733#. Tag: para 734#: reference_raster.xml:309 735#, no-c-format 736msgid "Standard deviation of all counted pixel values." 737msgstr "" 738 739#. Tag: term 740#: reference_raster.xml:316 741#, no-c-format 742msgid "<parameter>min </parameter> <type>double precision</type>" 743msgstr "" 744 745#. Tag: para 746#: reference_raster.xml:321 747#, no-c-format 748msgid "Minimum value of counted pixel values." 749msgstr "" 750 751#. Tag: term 752#: reference_raster.xml:328 753#, no-c-format 754msgid "<parameter>max </parameter> <type>double precision</type>" 755msgstr "" 756 757#. Tag: para 758#: reference_raster.xml:333 759#, no-c-format 760msgid "Maximum value of counted pixel values." 761msgstr "" 762 763#. Tag: para 764#: reference_raster.xml:346 765#, no-c-format 766msgid ", <xref linkend=\"RT_ST_SummaryStatsAgg\"/>" 767msgstr "" 768 769#. Tag: refname 770#: reference_raster.xml:354 771#, no-c-format 772msgid "unionarg" 773msgstr "unionarg" 774 775#. Tag: refpurpose 776#: reference_raster.xml:355 777#, no-c-format 778msgid "" 779"<refpurpose>A composite type used as input into the ST_Union function " 780"defining the bands to be processed and behavior of the UNION operation.</" 781"refpurpose>" 782msgstr "" 783 784#. Tag: para 785#: reference_raster.xml:360 786#, no-c-format 787msgid "" 788"<para>A composite type used as input into the ST_Union function defining the " 789"bands to be processed and behavior of the UNION operation.</para>" 790msgstr "" 791 792#. Tag: para 793#: reference_raster.xml:370 794#, no-c-format 795msgid "1-based value indicating the band of each input raster to be processed." 796msgstr "" 797 798#. Tag: term 799#: reference_raster.xml:377 800#, no-c-format 801msgid "<parameter>uniontype </parameter> <type>text</type>" 802msgstr "<parameter>uniontype </parameter> <type>text</type>" 803 804#. Tag: para 805#: reference_raster.xml:382 806#, no-c-format 807msgid "" 808"Type of UNION operation. One of defined types as described in <xref linkend=" 809"\"RT_ST_Union\"/>." 810msgstr "" 811 812#. Tag: title 813#: reference_raster.xml:404 814#, no-c-format 815msgid "Raster Management" 816msgstr "" 817 818#. Tag: refname 819#: reference_raster.xml:407 820#, no-c-format 821msgid "AddRasterConstraints" 822msgstr "AddRasterConstraints" 823 824#. Tag: refpurpose 825#: reference_raster.xml:409 826#, no-c-format 827msgid "" 828"Adds raster constraints to a loaded raster table for a specific column that " 829"constrains spatial ref, scaling, blocksize, alignment, bands, band type and " 830"a flag to denote if raster column is regularly blocked. The table must be " 831"loaded with data for the constraints to be inferred. Returns true if the " 832"constraint setting was accomplished and issues a notice otherwise." 833msgstr "" 834 835#. Tag: funcsynopsis 836#: reference_raster.xml:413 837#, fuzzy, no-c-format 838msgid "" 839"<funcprototype> <funcdef>boolean <function>AddRasterConstraints</function></" 840"funcdef> <paramdef><type>name </type> <parameter>rasttable</parameter></" 841"paramdef> <paramdef><type>name </type> <parameter>rastcolumn</parameter></" 842"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 843"<parameter>srid=true</parameter></paramdef> <paramdef choice=\"opt" 844"\"><type>boolean </type> <parameter>scale_x=true</parameter></paramdef> " 845"<paramdef choice=\"opt\"><type>boolean </type> <parameter>scale_y=true</" 846"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 847"<parameter>blocksize_x=true</parameter></paramdef> <paramdef choice=\"opt" 848"\"><type>boolean </type> <parameter>blocksize_y=true</parameter></paramdef> " 849"<paramdef choice=\"opt\"><type>boolean </type> " 850"<parameter>same_alignment=true</parameter></paramdef> <paramdef choice=\"opt" 851"\"><type>boolean </type> <parameter>regular_blocking=false</parameter></" 852"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 853"<parameter>num_bands=true</parameter> </paramdef> <paramdef choice=\"opt" 854"\"><type>boolean </type> <parameter>pixel_types=true</parameter> </paramdef> " 855"<paramdef choice=\"opt\"><type>boolean </type> " 856"<parameter>nodata_values=true</parameter> </paramdef> <paramdef choice=\"opt" 857"\"><type>boolean </type> <parameter>out_db=true</parameter> </paramdef> " 858"<paramdef choice=\"opt\"><type>boolean </type> <parameter>extent=true</" 859"parameter> </paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 860"<function>AddRasterConstraints</function></funcdef> <paramdef><type>name </" 861"type> <parameter>rasttable</parameter></paramdef> <paramdef><type>name </" 862"type> <parameter>rastcolumn</parameter></paramdef> <paramdef><type>text[] </" 863"type> <parameter>VARIADIC constraints</parameter></paramdef> </" 864"funcprototype> <funcprototype> <funcdef>boolean " 865"<function>AddRasterConstraints</function></funcdef> <paramdef><type>name </" 866"type> <parameter>rastschema</parameter></paramdef> <paramdef><type>name </" 867"type> <parameter>rasttable</parameter></paramdef> <paramdef><type>name </" 868"type> <parameter>rastcolumn</parameter></paramdef> <paramdef><type>text[] </" 869"type> <parameter>VARIADIC constraints</parameter></paramdef> </" 870"funcprototype> <funcprototype> <funcdef>boolean " 871"<function>AddRasterConstraints</function></funcdef> <paramdef><type>name </" 872"type> <parameter>rastschema</parameter></paramdef> <paramdef><type>name </" 873"type> <parameter>rasttable</parameter></paramdef> <paramdef><type>name </" 874"type> <parameter>rastcolumn</parameter></paramdef> <paramdef choice=\"opt" 875"\"><type>boolean </type> <parameter>srid=true</parameter></paramdef> " 876"<paramdef choice=\"opt\"><type>boolean </type> <parameter>scale_x=true</" 877"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 878"<parameter>scale_y=true</parameter></paramdef> <paramdef choice=\"opt" 879"\"><type>boolean </type> <parameter>blocksize_x=true</parameter></paramdef> " 880"<paramdef choice=\"opt\"><type>boolean </type> <parameter>blocksize_y=true</" 881"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 882"<parameter>same_alignment=true</parameter></paramdef> <paramdef choice=\"opt" 883"\"><type>boolean </type> <parameter>regular_blocking=false</parameter></" 884"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 885"<parameter>num_bands=true</parameter></paramdef> <paramdef choice=\"opt" 886"\"><type>boolean </type> <parameter>pixel_types=true</parameter></paramdef> " 887"<paramdef choice=\"opt\"><type>boolean </type> " 888"<parameter>nodata_values=true</parameter> </paramdef> <paramdef choice=\"opt" 889"\"><type>boolean </type> <parameter>out_db=true</parameter> </paramdef> " 890"<paramdef choice=\"opt\"><type>boolean </type> <parameter>extent=true</" 891"parameter> </paramdef> </funcprototype>" 892msgstr "" 893"<funcprototype> <funcdef>SETOF record <function>ST_Histogram</function></" 894"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 895"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 896"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 897"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 898"\"opt\"><type>integer </type> <parameter>bins=autocomputed</parameter></" 899"paramdef> <paramdef choice=\"opt\"><type>double precision[] </type> " 900"<parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 901"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 902"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 903"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 904"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 905"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 906"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 907"type> <parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 908"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 909"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 910"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 911"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 912"parameter></paramdef> <paramdef><type>boolean </type> " 913"<parameter>exclude_nodata_value</parameter></paramdef> " 914"<paramdef><type>integer </type> <parameter>bins</parameter></paramdef> " 915"<paramdef><type>boolean </type> <parameter>right</parameter></paramdef> </" 916"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 917"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 918"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 919"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 920"parameter></paramdef> <paramdef><type>boolean </type> <parameter>right</" 921"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 922"<function>ST_Histogram</function></funcdef> <paramdef><type>text </type> " 923"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 924"<parameter>rastercolumn</parameter></paramdef> <paramdef><type>integer </" 925"type> <parameter>nband</parameter></paramdef> <paramdef><type>integer </" 926"type> <parameter>bins</parameter></paramdef> <paramdef><type>boolean </type> " 927"<parameter>right</parameter></paramdef> </funcprototype> <funcprototype> " 928"<funcdef>SETOF record <function>ST_Histogram</function></funcdef> " 929"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 930"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 931"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 932"<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></" 933"paramdef> <paramdef><type>integer </type> <parameter>bins</parameter></" 934"paramdef> <paramdef><type>boolean </type> <parameter>right</parameter></" 935"paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 936"<function>ST_Histogram</function></funcdef> <paramdef><type>text </type> " 937"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 938"<parameter>rastercolumn</parameter></paramdef> <paramdef choice=\"opt" 939"\"><type>integer </type> <parameter>nband=1</parameter></paramdef> <paramdef " 940"choice=\"opt\"><type>boolean </type> <parameter>exclude_nodata_value=true</" 941"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 942"<parameter>bins=autocomputed</parameter></paramdef> <paramdef choice=\"opt" 943"\"><type>double precision[] </type> <parameter>width=NULL</parameter></" 944"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 945"<parameter>right=false</parameter></paramdef> </funcprototype> " 946"<funcprototype> <funcdef>SETOF record <function>ST_Histogram</function></" 947"funcdef> <paramdef><type>text </type> <parameter>rastertable</parameter></" 948"paramdef> <paramdef><type>text </type> <parameter>rastercolumn</parameter></" 949"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 950"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 951"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 952"type> <parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 953"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 954"funcprototype>" 955 956#. Tag: para 957#: reference_raster.xml:542 958#, no-c-format 959msgid "" 960"Generates constraints on a raster column that are used to display " 961"information in the <varname>raster_columns</varname> raster catalog. The " 962"<varname>rastschema</varname> is the name of the table schema the table " 963"resides in. The <varname>srid</varname> must be an integer value reference " 964"to an entry in the SPATIAL_REF_SYS table." 965msgstr "" 966 967#. Tag: para 968#: reference_raster.xml:547 969#, no-c-format 970msgid "" 971"<varname>raster2pgsql</varname> loader uses this function to register raster " 972"tables" 973msgstr "" 974 975#. Tag: para 976#: reference_raster.xml:548 977#, no-c-format 978msgid "" 979"Valid constraint names to pass in: refer to <xref linkend=\"RT_Raster_Columns" 980"\"/> for more details." 981msgstr "" 982 983#. Tag: para 984#: reference_raster.xml:550 985#, no-c-format 986msgid "<varname>blocksize</varname> sets both X and Y blocksize" 987msgstr "" 988 989#. Tag: para 990#: reference_raster.xml:551 991#, no-c-format 992msgid "" 993"<varname>blocksize_x</varname> sets X tile (width in pixels of each tile)" 994msgstr "" 995 996#. Tag: para 997#: reference_raster.xml:552 998#, no-c-format 999msgid "" 1000"<varname>blocksize_y</varname> sets Y tile (height in pixels of each tile)" 1001msgstr "" 1002 1003#. Tag: para 1004#: reference_raster.xml:553 1005#, no-c-format 1006msgid "" 1007"<varname>extent</varname> computes extent of whole table and applys " 1008"constraint all rasters must be within that extent" 1009msgstr "" 1010 1011#. Tag: para 1012#: reference_raster.xml:555 1013#, no-c-format 1014msgid "<varname>num_bands</varname> number of bands" 1015msgstr "" 1016 1017#. Tag: para 1018#: reference_raster.xml:556 1019#, no-c-format 1020msgid "" 1021"<varname>pixel_types</varname> reads array of pixel types for each band " 1022"ensure all band n have same pixel type" 1023msgstr "" 1024 1025#. Tag: para 1026#: reference_raster.xml:557 1027#, no-c-format 1028msgid "" 1029"<varname>regular_blocking</varname> sets spatially unique (no two rasters " 1030"can be spatially the same) and coverage tile (raster is aligned to a " 1031"coverage) constraints" 1032msgstr "" 1033 1034#. Tag: para 1035#: reference_raster.xml:558 1036#, no-c-format 1037msgid "" 1038"<varname>same_alignment</varname> ensures they all have same alignment " 1039"meaning any two tiles you compare will return true for. Refer to <xref " 1040"linkend=\"RT_ST_SameAlignment\"/>." 1041msgstr "" 1042 1043#. Tag: para 1044#: reference_raster.xml:559 1045#, no-c-format 1046msgid "<varname>srid</varname> ensures all have same srid" 1047msgstr "" 1048 1049#. Tag: para 1050#: reference_raster.xml:560 1051#, no-c-format 1052msgid "More -- any listed as inputs into the above functions" 1053msgstr "" 1054 1055#. Tag: para 1056#: reference_raster.xml:563 1057#, no-c-format 1058msgid "" 1059"This function infers the constraints from the data already present in the " 1060"table. As such for it to work, you must create the raster column first and " 1061"then load it with data." 1062msgstr "" 1063 1064#. Tag: para 1065#: reference_raster.xml:568 1066#, no-c-format 1067msgid "" 1068"If you need to load more data in your tables after you have already applied " 1069"constraints, you may want to run the DropRasterConstraints if the extent of " 1070"your data has changed." 1071msgstr "" 1072 1073#. Tag: para 1074#: reference_raster.xml:572 reference_raster.xml:721 reference_raster.xml:797 1075#: reference_raster.xml:863 reference_raster.xml:1531 reference_raster.xml:1969 1076#: reference_raster.xml:3019 reference_raster.xml:3246 1077#: reference_raster.xml:3289 reference_raster.xml:3350 1078#: reference_raster.xml:5043 reference_raster.xml:5214 1079#: reference_raster.xml:5409 reference_raster.xml:5513 1080#: reference_raster.xml:5583 reference_raster.xml:5805 1081#: reference_raster.xml:6443 reference_raster.xml:7709 1082#: reference_raster.xml:7908 reference_raster.xml:8172 1083#: reference_raster.xml:8291 reference_raster.xml:8420 1084#: reference_raster.xml:8518 reference_raster.xml:8606 1085#: reference_raster.xml:8690 reference_raster.xml:8829 1086#: reference_raster.xml:8904 reference_raster.xml:8991 1087#: reference_raster.xml:9114 reference_raster.xml:9185 1088#: reference_raster.xml:9260 reference_raster.xml:9346 1089#: reference_raster.xml:9442 reference_raster.xml:9570 1090#: reference_raster.xml:10034 reference_raster.xml:10285 1091#: reference_raster.xml:10357 reference_raster.xml:11176 1092#, no-c-format 1093msgid "Availability: 2.0.0" 1094msgstr "Disponibilità: 2.0" 1095 1096#. Tag: title 1097#: reference_raster.xml:576 1098#, no-c-format 1099msgid "Examples: Apply all possible constraints on column based on data" 1100msgstr "" 1101 1102#. Tag: programlisting 1103#: reference_raster.xml:578 1104#, no-c-format 1105msgid "" 1106"CREATE TABLE myrasters(rid SERIAL primary key, rast raster);\n" 1107"INSERT INTO myrasters(rast)\n" 1108"SELECT ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 0.3, -0.3, 2, 2, 0, " 1109"0,4326), 1, '8BSI'::text, -129, NULL);\n" 1110"\n" 1111"SELECT AddRasterConstraints('myrasters'::name, 'rast'::name);\n" 1112"\n" 1113"\n" 1114"-- verify if registered correctly in the raster_columns view --\n" 1115"SELECT srid, scale_x, scale_y, blocksize_x, blocksize_y, num_bands, " 1116"pixel_types, nodata_values\n" 1117" FROM raster_columns\n" 1118" WHERE r_table_name = 'myrasters';\n" 1119"\n" 1120" srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | " 1121"pixel_types| nodata_values\n" 1122"------+---------+---------+-------------+-------------+-----------" 1123"+-------------+---------------\n" 1124" 4326 | 2 | 2 | 1000 | 1000 | 1 | " 1125"{8BSI} | {0}" 1126msgstr "" 1127 1128#. Tag: title 1129#: reference_raster.xml:582 1130#, no-c-format 1131msgid "Examples: Apply single constraint" 1132msgstr "" 1133 1134#. Tag: programlisting 1135#: reference_raster.xml:584 1136#, no-c-format 1137msgid "" 1138"CREATE TABLE public.myrasters2(rid SERIAL primary key, rast raster);\n" 1139"INSERT INTO myrasters2(rast)\n" 1140"SELECT ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 0.3, -0.3, 2, 2, 0, " 1141"0,4326), 1, '8BSI'::text, -129, NULL);\n" 1142"\n" 1143"SELECT AddRasterConstraints('public'::name, 'myrasters2'::name, 'rast'::" 1144"name,'regular_blocking', 'blocksize');\n" 1145"-- get notice--\n" 1146"NOTICE: Adding regular blocking constraint\n" 1147"NOTICE: Adding blocksize-X constraint\n" 1148"NOTICE: Adding blocksize-Y constraint" 1149msgstr "" 1150 1151#. Tag: para 1152#: reference_raster.xml:590 1153#, no-c-format 1154msgid "" 1155", <xref linkend=\"RT_ST_AddBand\"/>, <xref linkend=\"RT_ST_MakeEmptyRaster\"/" 1156">, <xref linkend=\"RT_DropRasterConstraints\"/>, <xref linkend=" 1157"\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_SRID\"/>" 1158msgstr "" 1159", <xref linkend=\"RT_ST_AddBand\"/>, <xref linkend=\"RT_ST_MakeEmptyRaster\"/" 1160">, <xref linkend=\"RT_DropRasterConstraints\"/>, <xref linkend=" 1161"\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_SRID\"/>" 1162 1163#. Tag: refname 1164#: reference_raster.xml:596 1165#, no-c-format 1166msgid "DropRasterConstraints" 1167msgstr "DropRasterConstraints" 1168 1169#. Tag: refpurpose 1170#: reference_raster.xml:598 1171#, no-c-format 1172msgid "" 1173"Drops PostGIS raster constraints that refer to a raster table column. Useful " 1174"if you need to reload data or update your raster column data." 1175msgstr "" 1176 1177#. Tag: funcsynopsis 1178#: reference_raster.xml:602 1179#, no-c-format 1180msgid "" 1181"<funcprototype> <funcdef>boolean <function>DropRasterConstraints</function></" 1182"funcdef> <paramdef><type>name </type> <parameter>rasttable</parameter></" 1183"paramdef> <paramdef><type>name </type> <parameter>rastcolumn</parameter></" 1184"paramdef> <paramdef><type>boolean </type> <parameter>srid</parameter></" 1185"paramdef> <paramdef><type>boolean </type> <parameter>scale_x</parameter></" 1186"paramdef> <paramdef><type>boolean </type> <parameter>scale_y</parameter></" 1187"paramdef> <paramdef><type>boolean </type> <parameter>blocksize_x</" 1188"parameter></paramdef> <paramdef><type>boolean </type> " 1189"<parameter>blocksize_y</parameter></paramdef> <paramdef><type>boolean </" 1190"type> <parameter>same_alignment</parameter></paramdef> " 1191"<paramdef><type>boolean </type> <parameter>regular_blocking</parameter></" 1192"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 1193"<parameter>num_bands=true</parameter></paramdef> <paramdef choice=\"opt" 1194"\"><type>boolean </type> <parameter>pixel_types=true</parameter></paramdef> " 1195"<paramdef choice=\"opt\"><type>boolean </type> " 1196"<parameter>nodata_values=true</parameter></paramdef> <paramdef choice=\"opt" 1197"\"><type>boolean </type> <parameter>out_db=true</parameter> </paramdef> " 1198"<paramdef choice=\"opt\"><type>boolean </type> <parameter>extent=true</" 1199"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 1200"<function>DropRasterConstraints</function></funcdef> <paramdef><type>name </" 1201"type> <parameter>rastschema</parameter></paramdef> <paramdef><type>name </" 1202"type> <parameter>rasttable</parameter></paramdef> <paramdef><type>name </" 1203"type> <parameter>rastcolumn</parameter></paramdef> <paramdef choice=\"opt" 1204"\"><type>boolean </type> <parameter>srid=true</parameter></paramdef> " 1205"<paramdef><type>boolean </type> <parameter>scale_x=true</parameter></" 1206"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 1207"<parameter>scale_y=true</parameter></paramdef> <paramdef choice=\"opt" 1208"\"><type>boolean </type> <parameter>blocksize_x=true</parameter></paramdef> " 1209"<paramdef choice=\"opt\"><type>boolean </type> <parameter>blocksize_y=true</" 1210"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 1211"<parameter>same_alignment=true</parameter></paramdef> <paramdef choice=\"opt" 1212"\"><type>boolean </type> <parameter>regular_blocking=false</parameter></" 1213"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 1214"<parameter>num_bands=true</parameter></paramdef> <paramdef choice=\"opt" 1215"\"><type>boolean </type> <parameter>pixel_types=true</parameter></paramdef> " 1216"<paramdef choice=\"opt\"><type>boolean </type> " 1217"<parameter>nodata_values=true</parameter></paramdef> <paramdef choice=\"opt" 1218"\"><type>boolean </type> <parameter>out_db=true</parameter> </paramdef> " 1219"<paramdef choice=\"opt\"><type>boolean </type> <parameter>extent=true</" 1220"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 1221"<function>DropRasterConstraints</function></funcdef> <paramdef><type>name </" 1222"type> <parameter>rastschema</parameter></paramdef> <paramdef><type>name </" 1223"type> <parameter>rasttable</parameter></paramdef> <paramdef><type>name </" 1224"type> <parameter>rastcolumn</parameter></paramdef> <paramdef><type>text[] </" 1225"type> <parameter>constraints</parameter></paramdef> </funcprototype>" 1226msgstr "" 1227 1228#. Tag: para 1229#: reference_raster.xml:715 1230#, no-c-format 1231msgid "" 1232"Drops PostGIS raster constraints that refer to a raster table column that " 1233"were added by <xref linkend=\"RT_AddRasterConstraints\"/>. Useful if you " 1234"need to load more data or update your raster column data. You do not need to " 1235"do this if you want to get rid of a raster table or a raster column." 1236msgstr "" 1237 1238#. Tag: para 1239#: reference_raster.xml:717 1240#, no-c-format 1241msgid "To drop a raster table use the standard" 1242msgstr "" 1243 1244#. Tag: programlisting 1245#: reference_raster.xml:717 1246#, no-c-format 1247msgid "DROP TABLE mytable" 1248msgstr "DROP TABLE mytable" 1249 1250#. Tag: para 1251#: reference_raster.xml:718 1252#, no-c-format 1253msgid "" 1254"To drop just a raster column and leave the rest of the table, use standard " 1255"SQL" 1256msgstr "" 1257 1258#. Tag: programlisting 1259#: reference_raster.xml:718 1260#, no-c-format 1261msgid "ALTER TABLE mytable DROP COLUMN rast" 1262msgstr "" 1263 1264#. Tag: para 1265#: reference_raster.xml:719 1266#, no-c-format 1267msgid "" 1268"the table will disappear from the <varname>raster_columns</varname> catalog " 1269"if the column or table is dropped. However if only the constraints are " 1270"dropped, the raster column will still be listed in the " 1271"<varname>raster_columns</varname> catalog, but there will be no other " 1272"information about it aside from the column name and table." 1273msgstr "" 1274 1275#. Tag: title 1276#: reference_raster.xml:724 reference_raster.xml:801 reference_raster.xml:898 1277#: reference_raster.xml:934 reference_raster.xml:972 reference_raster.xml:1535 1278#: reference_raster.xml:1681 reference_raster.xml:1755 1279#: reference_raster.xml:1856 reference_raster.xml:1904 1280#: reference_raster.xml:1937 reference_raster.xml:1973 1281#: reference_raster.xml:2016 reference_raster.xml:2052 1282#: reference_raster.xml:2086 reference_raster.xml:2226 1283#: reference_raster.xml:2264 reference_raster.xml:2307 1284#: reference_raster.xml:2366 reference_raster.xml:2420 1285#: reference_raster.xml:2458 reference_raster.xml:2493 1286#: reference_raster.xml:2529 reference_raster.xml:2565 1287#: reference_raster.xml:2601 reference_raster.xml:2638 1288#: reference_raster.xml:2672 reference_raster.xml:2706 1289#: reference_raster.xml:2757 reference_raster.xml:2814 1290#: reference_raster.xml:2869 reference_raster.xml:2975 1291#: reference_raster.xml:3030 reference_raster.xml:3068 1292#: reference_raster.xml:3108 reference_raster.xml:3143 1293#: reference_raster.xml:3213 reference_raster.xml:3250 1294#: reference_raster.xml:3294 reference_raster.xml:3356 1295#: reference_raster.xml:3399 reference_raster.xml:3454 1296#: reference_raster.xml:3497 reference_raster.xml:3552 1297#: reference_raster.xml:3619 reference_raster.xml:3713 1298#: reference_raster.xml:3805 reference_raster.xml:3880 1299#: reference_raster.xml:4093 reference_raster.xml:4189 1300#: reference_raster.xml:4252 reference_raster.xml:4286 1301#: reference_raster.xml:4334 reference_raster.xml:4377 1302#: reference_raster.xml:4458 reference_raster.xml:4551 1303#: reference_raster.xml:4615 reference_raster.xml:4683 1304#: reference_raster.xml:4761 reference_raster.xml:4838 1305#: reference_raster.xml:4917 reference_raster.xml:5006 1306#: reference_raster.xml:5047 reference_raster.xml:5102 1307#: reference_raster.xml:5155 reference_raster.xml:5225 1308#: reference_raster.xml:5287 reference_raster.xml:5517 1309#: reference_raster.xml:5666 reference_raster.xml:5809 1310#: reference_raster.xml:5852 reference_raster.xml:5895 1311#: reference_raster.xml:5960 reference_raster.xml:6008 1312#: reference_raster.xml:6267 reference_raster.xml:6708 1313#: reference_raster.xml:7713 reference_raster.xml:8176 1314#: reference_raster.xml:8424 reference_raster.xml:8695 1315#: reference_raster.xml:8767 reference_raster.xml:8834 1316#: reference_raster.xml:8996 reference_raster.xml:9052 1317#: reference_raster.xml:9119 reference_raster.xml:9190 1318#: reference_raster.xml:9265 reference_raster.xml:9500 1319#: reference_raster.xml:9633 reference_raster.xml:9684 1320#: reference_raster.xml:9733 reference_raster.xml:9776 1321#: reference_raster.xml:9832 reference_raster.xml:9877 1322#: reference_raster.xml:9921 reference_raster.xml:9960 1323#: reference_raster.xml:10038 reference_raster.xml:10082 1324#: reference_raster.xml:10127 reference_raster.xml:10290 1325#: reference_raster.xml:10446 reference_raster.xml:10533 1326#: reference_raster.xml:10614 reference_raster.xml:10695 1327#: reference_raster.xml:10776 reference_raster.xml:10908 1328#: reference_raster.xml:10989 reference_raster.xml:11069 1329#: reference_raster.xml:11226 reference_raster.xml:11313 1330#: reference_raster.xml:11408 reference_raster.xml:11501 1331#, no-c-format 1332msgid "Examples" 1333msgstr "Esempi" 1334 1335#. Tag: programlisting 1336#: reference_raster.xml:726 1337#, no-c-format 1338msgid "" 1339"SELECT DropRasterConstraints ('myrasters','rast');\n" 1340"----RESULT output ---\n" 1341"t\n" 1342"\n" 1343"-- verify change in raster_columns --\n" 1344"SELECT srid, scale_x, scale_y, blocksize_x, blocksize_y, num_bands, " 1345"pixel_types, nodata_values\n" 1346" FROM raster_columns\n" 1347" WHERE r_table_name = 'myrasters';\n" 1348"\n" 1349" srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | " 1350"pixel_types| nodata_values\n" 1351"------+---------+---------+-------------+-------------+-----------" 1352"+-------------+---------------\n" 1353" 0 | | | | | " 1354"| |" 1355msgstr "" 1356 1357#. Tag: refname 1358#: reference_raster.xml:737 1359#, no-c-format 1360msgid "AddOverviewConstraints" 1361msgstr "" 1362 1363#. Tag: refpurpose 1364#: reference_raster.xml:739 1365#, no-c-format 1366msgid "Tag a raster column as being an overview of another." 1367msgstr "" 1368 1369#. Tag: funcsynopsis 1370#: reference_raster.xml:743 1371#, no-c-format 1372msgid "" 1373"<funcprototype> <funcdef>boolean <function>AddOverviewConstraints</" 1374"function></funcdef> <paramdef><type>name </type> <parameter>ovschema</" 1375"parameter></paramdef> <paramdef><type>name </type> <parameter>ovtable</" 1376"parameter></paramdef> <paramdef><type>name </type> <parameter>ovcolumn</" 1377"parameter></paramdef> <paramdef><type>name </type> <parameter>refschema</" 1378"parameter></paramdef> <paramdef><type>name </type> <parameter>reftable</" 1379"parameter></paramdef> <paramdef><type>name </type> <parameter>refcolumn</" 1380"parameter></paramdef> <paramdef><type>int </type> <parameter>ovfactor</" 1381"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 1382"<function>AddOverviewConstraints</function></funcdef> <paramdef><type>name </" 1383"type> <parameter>ovtable</parameter></paramdef> <paramdef><type>name </type> " 1384"<parameter>ovcolumn</parameter></paramdef> <paramdef><type>name </type> " 1385"<parameter>reftable</parameter></paramdef> <paramdef><type>name </type> " 1386"<parameter>refcolumn</parameter></paramdef> <paramdef><type>int </type> " 1387"<parameter>ovfactor</parameter></paramdef> </funcprototype>" 1388msgstr "" 1389 1390#. Tag: para 1391#: reference_raster.xml:783 1392#, no-c-format 1393msgid "" 1394"Adds constraints on a raster column that are used to display information in " 1395"the <varname>raster_overviews</varname> raster catalog." 1396msgstr "" 1397 1398#. Tag: para 1399#: reference_raster.xml:787 1400#, no-c-format 1401msgid "" 1402"The <varname>ovfactor</varname> parameter represents the scale multiplier in " 1403"the overview column: higher overview factors have lower resolution." 1404msgstr "" 1405 1406#. Tag: para 1407#: reference_raster.xml:791 1408#, no-c-format 1409msgid "" 1410"When the <varname>ovschema</varname> and <varname>refschema</varname> " 1411"parameters are omitted, the first table found scanning the " 1412"<varname>search_path</varname> will be used." 1413msgstr "" 1414 1415#. Tag: programlisting 1416#: reference_raster.xml:803 1417#, no-c-format 1418msgid "" 1419"CREATE TABLE res1 AS SELECT\n" 1420"ST_AddBand(\n" 1421" ST_MakeEmptyRaster(1000, 1000, 0, 0, 2),\n" 1422" 1, '8BSI'::text, -129, NULL\n" 1423") r1;\n" 1424"\n" 1425"CREATE TABLE res2 AS SELECT\n" 1426"ST_AddBand(\n" 1427" ST_MakeEmptyRaster(500, 500, 0, 0, 4),\n" 1428" 1, '8BSI'::text, -129, NULL\n" 1429") r2;\n" 1430"\n" 1431"SELECT AddOverviewConstraints('res2', 'r2', 'res1', 'r1', 2);\n" 1432"\n" 1433"-- verify if registered correctly in the raster_overviews view --\n" 1434"SELECT o_table_name ot, o_raster_column oc,\n" 1435" r_table_name rt, r_raster_column rc,\n" 1436" overview_factor f\n" 1437"FROM raster_overviews WHERE o_table_name = 'res2';\n" 1438" ot | oc | rt | rc | f\n" 1439"------+----+------+----+---\n" 1440" res2 | r2 | res1 | r1 | 2\n" 1441"(1 row)" 1442msgstr "" 1443 1444#. Tag: para 1445#: reference_raster.xml:809 1446#, no-c-format 1447msgid "" 1448", <xref linkend=\"RT_DropOverviewConstraints\"/>, <xref linkend=" 1449"\"RT_CreateOverview\"/>, <xref linkend=\"RT_AddRasterConstraints\"/>" 1450msgstr "" 1451 1452#. Tag: refname 1453#: reference_raster.xml:820 1454#, no-c-format 1455msgid "DropOverviewConstraints" 1456msgstr "" 1457 1458#. Tag: refpurpose 1459#: reference_raster.xml:822 1460#, no-c-format 1461msgid "Untag a raster column from being an overview of another." 1462msgstr "" 1463 1464#. Tag: funcsynopsis 1465#: reference_raster.xml:826 1466#, no-c-format 1467msgid "" 1468"<funcprototype> <funcdef>boolean <function>DropOverviewConstraints</" 1469"function></funcdef> <paramdef><type>name </type> <parameter>ovschema</" 1470"parameter></paramdef> <paramdef><type>name </type> <parameter>ovtable</" 1471"parameter></paramdef> <paramdef><type>name </type> <parameter>ovcolumn</" 1472"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 1473"<function>DropOverviewConstraints</function></funcdef> <paramdef><type>name " 1474"</type> <parameter>ovtable</parameter></paramdef> <paramdef><type>name </" 1475"type> <parameter>ovcolumn</parameter></paramdef> </funcprototype>" 1476msgstr "" 1477 1478#. Tag: para 1479#: reference_raster.xml:852 1480#, no-c-format 1481msgid "" 1482"Remove from a raster column the constraints used to show it as being an " 1483"overview of another in the <varname>raster_overviews</varname> raster " 1484"catalog." 1485msgstr "" 1486 1487#. Tag: para 1488#: reference_raster.xml:857 1489#, no-c-format 1490msgid "" 1491"When the <varname>ovschema</varname> parameter is omitted, the first table " 1492"found scanning the <varname>search_path</varname> will be used." 1493msgstr "" 1494 1495#. Tag: para 1496#: reference_raster.xml:869 1497#, no-c-format 1498msgid "" 1499", <xref linkend=\"RT_AddOverviewConstraints\"/>, <xref linkend=" 1500"\"RT_DropRasterConstraints\"/>" 1501msgstr "" 1502 1503#. Tag: refname 1504#: reference_raster.xml:879 1505#, no-c-format 1506msgid "PostGIS_GDAL_Version" 1507msgstr "" 1508 1509#. Tag: refpurpose 1510#: reference_raster.xml:880 1511#, no-c-format 1512msgid "Reports the version of the GDAL library in use by PostGIS." 1513msgstr "" 1514 1515#. Tag: funcprototype 1516#: reference_raster.xml:885 1517#, no-c-format 1518msgid "" 1519"<funcdef>text <function>PostGIS_GDAL_Version</function></funcdef> " 1520"<paramdef></paramdef>" 1521msgstr "" 1522 1523#. Tag: para 1524#: reference_raster.xml:894 1525#, no-c-format 1526msgid "" 1527"Reports the version of the GDAL library in use by PostGIS. Will also check " 1528"and report if GDAL can find its data files." 1529msgstr "" 1530 1531#. Tag: programlisting 1532#: reference_raster.xml:899 1533#, fuzzy, no-c-format 1534msgid "" 1535"SELECT PostGIS_GDAL_Version();\n" 1536" postgis_gdal_version\n" 1537"-----------------------------------\n" 1538" GDAL 1.11dev, released 2013/04/13" 1539msgstr "" 1540"SELECT PostGIS_Raster_Lib_Version();\n" 1541"postgis_raster_lib_version\n" 1542"-----------------------------\n" 1543" 2.0.0" 1544 1545#. Tag: refname 1546#: reference_raster.xml:912 1547#, no-c-format 1548msgid "PostGIS_Raster_Lib_Build_Date" 1549msgstr "PostGIS_Raster_Lib_Build_Date" 1550 1551#. Tag: refpurpose 1552#: reference_raster.xml:914 1553#, no-c-format 1554msgid "Reports full raster library build date." 1555msgstr "" 1556 1557#. Tag: funcprototype 1558#: reference_raster.xml:919 1559#, no-c-format 1560msgid "" 1561"<funcdef>text <function>PostGIS_Raster_Lib_Build_Date</function></funcdef> " 1562"<paramdef></paramdef>" 1563msgstr "" 1564"<funcdef>text <function>PostGIS_Raster_Lib_Build_Date</function></funcdef> " 1565"<paramdef></paramdef>" 1566 1567#. Tag: para 1568#: reference_raster.xml:930 1569#, no-c-format 1570msgid "Reports raster build date" 1571msgstr "" 1572 1573#. Tag: programlisting 1574#: reference_raster.xml:936 1575#, no-c-format 1576msgid "" 1577"SELECT PostGIS_Raster_Lib_Build_Date();\n" 1578"postgis_raster_lib_build_date\n" 1579"-----------------------------\n" 1580"2010-04-28 21:15:10" 1581msgstr "" 1582"SELECT PostGIS_Raster_Lib_Build_Date();\n" 1583"postgis_raster_lib_build_date\n" 1584"-----------------------------\n" 1585"2010-04-28 21:15:10" 1586 1587#. Tag: refname 1588#: reference_raster.xml:948 1589#, no-c-format 1590msgid "PostGIS_Raster_Lib_Version" 1591msgstr "PostGIS_Raster_Lib_Version" 1592 1593#. Tag: refpurpose 1594#: reference_raster.xml:950 1595#, no-c-format 1596msgid "" 1597"<refpurpose>Reports full raster version and build configuration infos.</" 1598"refpurpose>" 1599msgstr "" 1600 1601#. Tag: funcprototype 1602#: reference_raster.xml:956 1603#, no-c-format 1604msgid "" 1605"<funcdef>text <function>PostGIS_Raster_Lib_Version</function></funcdef> " 1606"<paramdef></paramdef>" 1607msgstr "" 1608"<funcdef>text <function>PostGIS_Raster_Lib_Version</function></funcdef> " 1609"<paramdef></paramdef>" 1610 1611#. Tag: para 1612#: reference_raster.xml:967 1613#, no-c-format 1614msgid "<para>Reports full raster version and build configuration infos.</para>" 1615msgstr "" 1616 1617#. Tag: programlisting 1618#: reference_raster.xml:974 1619#, no-c-format 1620msgid "" 1621"SELECT PostGIS_Raster_Lib_Version();\n" 1622"postgis_raster_lib_version\n" 1623"-----------------------------\n" 1624" 2.0.0" 1625msgstr "" 1626"SELECT PostGIS_Raster_Lib_Version();\n" 1627"postgis_raster_lib_version\n" 1628"-----------------------------\n" 1629" 2.0.0" 1630 1631#. Tag: refname 1632#: reference_raster.xml:988 1633#, no-c-format 1634msgid "ST_GDALDrivers" 1635msgstr "ST_GDALDrivers" 1636 1637#. Tag: refpurpose 1638#: reference_raster.xml:990 1639#, no-c-format 1640msgid "" 1641"Returns a list of raster formats supported by PostGIS through GDAL. Only " 1642"those formats with can_write=True can be used by ST_AsGDALRaster" 1643msgstr "" 1644 1645#. Tag: funcprototype 1646#: reference_raster.xml:995 1647#, fuzzy, no-c-format 1648msgid "" 1649"<funcdef>setof record <function>ST_GDALDrivers</function></funcdef> " 1650"<paramdef><type>integer </type> <parameter>OUT idx</parameter></paramdef> " 1651"<paramdef><type>text </type> <parameter>OUT short_name</parameter></" 1652"paramdef> <paramdef><type>text </type> <parameter>OUT long_name</parameter></" 1653"paramdef> <paramdef><type>text </type> <parameter>OUT can_read</parameter></" 1654"paramdef> <paramdef><type>text </type> <parameter>OUT can_write</parameter></" 1655"paramdef> <paramdef><type>text </type> <parameter>OUT create_options</" 1656"parameter></paramdef>" 1657msgstr "" 1658"<funcdef>setof record <function>ST_GDALDrivers</function></funcdef> " 1659"<paramdef><type>integer </type> <parameter>OUT idx</parameter></paramdef> " 1660"<paramdef><type>text </type> <parameter>OUT short_name</parameter></" 1661"paramdef> <paramdef><type>text </type> <parameter>OUT long_name</parameter></" 1662"paramdef> <paramdef><type>text </type> <parameter>OUT create_options</" 1663"parameter></paramdef>" 1664 1665#. Tag: para 1666#: reference_raster.xml:1010 1667#, no-c-format 1668msgid "" 1669"Returns a list of raster formats short_name,long_name and creator options of " 1670"each format supported by GDAL. Use the short_name as input in the " 1671"<varname>format</varname> parameter of <xref linkend=\"RT_ST_AsGDALRaster\"/" 1672">. Options vary depending on what drivers your libgdal was compiled with. " 1673"<varname>create_options</varname> returns an xml formatted set of " 1674"CreationOptionList/Option consisting of name and optional <varname>type</" 1675"varname>, <varname>description</varname> and set of <varname>VALUE</varname> " 1676"for each creator option for the specific driver." 1677msgstr "" 1678 1679#. Tag: para 1680#: reference_raster.xml:1015 1681#, no-c-format 1682msgid "Changed: 2.5.0 - add can_read and can_write columns." 1683msgstr "" 1684 1685#. Tag: para 1686#: reference_raster.xml:1016 1687#, no-c-format 1688msgid "" 1689"Changed: 2.0.6, 2.1.3 - by default no drivers are enabled, unless GUC or " 1690"Environment variable gdal_enabled_drivers is set." 1691msgstr "" 1692 1693#. Tag: para 1694#: reference_raster.xml:1017 reference_raster.xml:1458 1695#: reference_raster.xml:6064 reference_raster.xml:6172 1696#: reference_raster.xml:6263 reference_raster.xml:6343 1697#, no-c-format 1698msgid "Availability: 2.0.0 - requires GDAL >= 1.6.0." 1699msgstr "" 1700 1701#. Tag: title 1702#: reference_raster.xml:1022 1703#, no-c-format 1704msgid "Examples: List of Drivers" 1705msgstr "" 1706 1707#. Tag: programlisting 1708#: reference_raster.xml:1024 1709#, no-c-format 1710msgid "" 1711"SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';\n" 1712"SELECT short_name, long_name, can_write\n" 1713"FROM st_gdaldrivers()\n" 1714"ORDER BY short_name;\n" 1715"\n" 1716" short_name | " 1717"long_name | can_write\n" 1718"-----------------" 1719"+-------------------------------------------------------------+-----------\n" 1720" AAIGrid | Arc/Info ASCII " 1721"Grid | t\n" 1722" ACE2 | " 1723"ACE2 | f\n" 1724" ADRG | ARC Digitized Raster " 1725"Graphics | f\n" 1726" AIG | Arc/Info Binary " 1727"Grid | f\n" 1728" AirSAR | AirSAR Polarimetric " 1729"Image | f\n" 1730" ARG | Azavea Raster Grid " 1731"format | t\n" 1732" BAG | Bathymetry Attributed " 1733"Grid | f\n" 1734" BIGGIF | Graphics Interchange Format (." 1735"gif) | f\n" 1736" BLX | Magellan topo (." 1737"blx) | t\n" 1738" BMP | MS Windows Device Independent " 1739"Bitmap | f\n" 1740" BSB | Maptech BSB Nautical " 1741"Charts | f\n" 1742" PAux | PCI .aux " 1743"Labelled | f\n" 1744" PCIDSK | PCIDSK Database " 1745"File | f\n" 1746" PCRaster | PCRaster Raster " 1747"File | f\n" 1748" PDF | Geospatial " 1749"PDF | f\n" 1750" PDS | NASA Planetary Data " 1751"System | f\n" 1752" PDS4 | NASA Planetary Data System " 1753"4 | t\n" 1754" PLMOSAIC | Planet Labs Mosaics " 1755"API | f\n" 1756" PLSCENES | Planet Labs Scenes " 1757"API | f\n" 1758" PNG | Portable Network " 1759"Graphics | t\n" 1760" PNM | Portable Pixmap Format " 1761"(netpbm) | f\n" 1762" PRF | Racurs PHOTOMOD " 1763"PRF | f\n" 1764" R | R Object Data " 1765"Store | t\n" 1766" Rasterlite | " 1767"Rasterlite | t\n" 1768" RDA | DigitalGlobe Raster Data Access " 1769"driver | f\n" 1770" RIK | Swedish Grid RIK (." 1771"rik) | f\n" 1772" RMF | Raster Matrix " 1773"Format | f\n" 1774" ROI_PAC | ROI_PAC " 1775"raster | f\n" 1776" RPFTOC | Raster Product Format TOC " 1777"format | f\n" 1778" RRASTER | R " 1779"Raster | f\n" 1780" RS2 | RadarSat 2 XML " 1781"Product | f\n" 1782" RST | Idrisi Raster " 1783"A.1 | t\n" 1784" SAFE | Sentinel-1 SAR SAFE " 1785"Product | f\n" 1786" SAGA | SAGA GIS Binary Grid (.sdat, .sg-grd-" 1787"z) | t\n" 1788" SAR_CEOS | CEOS SAR " 1789"Image | f\n" 1790" SDTS | SDTS " 1791"Raster | f\n" 1792" SENTINEL2 | Sentinel " 1793"2 | f\n" 1794" SGI | SGI Image File Format " 1795"1.0 | f\n" 1796" SNODAS | Snow Data Assimilation " 1797"System | f\n" 1798" SRP | Standard Raster Product (ASRP/" 1799"USRP) | f\n" 1800" SRTMHGT | SRTMHGT File " 1801"Format | t\n" 1802" Terragen | Terragen " 1803"heightfield | f\n" 1804" TIL | EarthWatch ." 1805"TIL | f\n" 1806" TSX | TerraSAR-X " 1807"Product | f\n" 1808" USGSDEM | USGS Optional ASCII DEM (and " 1809"CDED) | t\n" 1810" VICAR | MIPL VICAR " 1811"file | f\n" 1812" VRT | Virtual " 1813"Raster | t\n" 1814" WCS | OGC Web Coverage " 1815"Service | f\n" 1816" WMS | OGC Web Map " 1817"Service | t\n" 1818" WMTS | OGC Web Map Tile " 1819"Service | t\n" 1820" XPM | X11 PixMap " 1821"Format | t\n" 1822" XYZ | ASCII Gridded " 1823"XYZ | t\n" 1824" ZMap | ZMap Plus " 1825"Grid | t" 1826msgstr "" 1827 1828#. Tag: title 1829#: reference_raster.xml:1026 1830#, no-c-format 1831msgid "Example: List of options for each driver" 1832msgstr "" 1833 1834#. Tag: programlisting 1835#: reference_raster.xml:1027 1836#, no-c-format 1837msgid "" 1838"-- Output the create options XML column of JPEG as a table --\n" 1839"-- Note you can use these creator options in ST_AsGDALRaster options " 1840"argument\n" 1841"SELECT (xpath('@name', g.opt))[1]::text As oname,\n" 1842" (xpath('@type', g.opt))[1]::text As otype,\n" 1843" (xpath('@description', g.opt))[1]::text As descrip\n" 1844"FROM (SELECT unnest(xpath('/CreationOptionList/Option', create_options::" 1845"xml)) As opt\n" 1846"FROM st_gdaldrivers()\n" 1847"WHERE short_name = 'JPEG') As g;\n" 1848"\n" 1849" oname | otype | descrip\n" 1850"--------------------+---------" 1851"+-------------------------------------------------\n" 1852" PROGRESSIVE | boolean | whether to generate a progressive JPEG\n" 1853" QUALITY | int | good=100, bad=0, default=75\n" 1854" WORLDFILE | boolean | whether to geneate a worldfile\n" 1855" INTERNAL_MASK | boolean | whether to generate a validity mask\n" 1856" COMMENT | string | Comment\n" 1857" SOURCE_ICC_PROFILE | string | ICC profile encoded in Base64\n" 1858" EXIF_THUMBNAIL | boolean | whether to generate an EXIF " 1859"thumbnail(overview).\n" 1860" By default its max dimension will be 128\n" 1861" THUMBNAIL_WIDTH | int | Forced thumbnail width\n" 1862" THUMBNAIL_HEIGHT | int | Forced thumbnail height\n" 1863"(9 rows)" 1864msgstr "" 1865 1866#. Tag: programlisting 1867#: reference_raster.xml:1029 1868#, no-c-format 1869msgid "" 1870"-- raw xml output for creator options for GeoTiff --\n" 1871"SELECT create_options\n" 1872"FROM st_gdaldrivers()\n" 1873"WHERE short_name = 'GTiff';\n" 1874"\n" 1875"<![CDATA[<CreationOptionList>\n" 1876" <Option name=\"COMPRESS\" type=\"string-select\">\n" 1877" <Value>NONE</Value>\n" 1878" <Value>LZW</Value>\n" 1879" <Value>PACKBITS</Value>\n" 1880" <Value>JPEG</Value>\n" 1881" <Value>CCITTRLE</Value>\n" 1882" <Value>CCITTFAX3</Value>\n" 1883" <Value>CCITTFAX4</Value>\n" 1884" <Value>DEFLATE</Value>\n" 1885" </Option>\n" 1886" <Option name=\"PREDICTOR\" type=\"int\" description=\"Predictor Type\"/" 1887">\n" 1888" <Option name=\"JPEG_QUALITY\" type=\"int\" description=\"JPEG quality " 1889"1-100\" default=\"75\"/>\n" 1890" <Option name=\"ZLEVEL\" type=\"int\" description=\"DEFLATE compression " 1891"level 1-9\" default=\"6\"/>\n" 1892" <Option name=\"NBITS\" type=\"int\" description=\"BITS for sub-byte " 1893"files (1-7), sub-uint16 (9-15), sub-uint32 (17-31)\"/>\n" 1894" <Option name=\"INTERLEAVE\" type=\"string-select\" default=\"PIXEL\">\n" 1895" <Value>BAND</Value>\n" 1896" <Value>PIXEL</Value>\n" 1897" </Option>\n" 1898" <Option name=\"TILED\" type=\"boolean\" description=\"Switch to tiled " 1899"format\"/>\n" 1900" <Option name=\"TFW\" type=\"boolean\" description=\"Write out world file" 1901"\"/>\n" 1902" <Option name=\"RPB\" type=\"boolean\" description=\"Write out .RPB (RPC) " 1903"file\"/>\n" 1904" <Option name=\"BLOCKXSIZE\" type=\"int\" description=\"Tile Width\"/>\n" 1905" <Option name=\"BLOCKYSIZE\" type=\"int\" description=\"Tile/Strip Height" 1906"\"/>\n" 1907" <Option name=\"PHOTOMETRIC\" type=\"string-select\">\n" 1908" <Value>MINISBLACK</Value>\n" 1909" <Value>MINISWHITE</Value>\n" 1910" <Value>PALETTE</Value>\n" 1911" <Value>RGB</Value>\n" 1912" <Value>CMYK</Value>\n" 1913" <Value>YCBCR</Value>\n" 1914" <Value>CIELAB</Value>\n" 1915" <Value>ICCLAB</Value>\n" 1916" <Value>ITULAB</Value>\n" 1917" </Option>\n" 1918" <Option name=\"SPARSE_OK\" type=\"boolean\" description=\"Can newly " 1919"created files have missing blocks?\" default=\"FALSE\"/>\n" 1920" <Option name=\"ALPHA\" type=\"boolean\" description=\"Mark first " 1921"extrasample as being alpha\"/>\n" 1922" <Option name=\"PROFILE\" type=\"string-select\" default=\"GDALGeoTIFF" 1923"\">\n" 1924" <Value>GDALGeoTIFF</Value>\n" 1925" <Value>GeoTIFF</Value>\n" 1926" <Value>BASELINE</Value>\n" 1927" </Option>\n" 1928" <Option name=\"PIXELTYPE\" type=\"string-select\">\n" 1929" <Value>DEFAULT</Value>\n" 1930" <Value>SIGNEDBYTE</Value>\n" 1931" </Option>\n" 1932" <Option name=\"BIGTIFF\" type=\"string-select\" description=\"Force " 1933"creation of BigTIFF file\">\n" 1934" <Value>YES</Value>\n" 1935" <Value>NO</Value>\n" 1936" <Value>IF_NEEDED</Value>\n" 1937" <Value>IF_SAFER</Value>\n" 1938" </Option>\n" 1939" <Option name=\"ENDIANNESS\" type=\"string-select\" default=\"NATIVE\" " 1940"description=\"Force endianness of created file. For DEBUG purpose mostly\">\n" 1941" <Value>NATIVE</Value>\n" 1942" <Value>INVERTED</Value>\n" 1943" <Value>LITTLE</Value>\n" 1944" <Value>BIG</Value>\n" 1945" </Option>\n" 1946" <Option name=\"COPY_SRC_OVERVIEWS\" type=\"boolean\" default=\"NO\" " 1947"description=\"Force copy of overviews of source dataset (CreateCopy())\"/>\n" 1948"</CreationOptionList>]]>\n" 1949"\n" 1950"-- Output the create options XML column for GTiff as a table --\n" 1951"SELECT (xpath('@name', g.opt))[1]::text As oname,\n" 1952" (xpath('@type', g.opt))[1]::text As otype,\n" 1953" (xpath('@description', g.opt))[1]::text As descrip,\n" 1954" array_to_string(xpath('Value/text()', g.opt),', ') As vals\n" 1955"FROM (SELECT unnest(xpath('/CreationOptionList/Option', create_options::" 1956"xml)) As opt\n" 1957"FROM st_gdaldrivers()\n" 1958"WHERE short_name = 'GTiff') As g;\n" 1959"\n" 1960" oname | otype | " 1961"descrip | " 1962"vals\n" 1963"--------------------+---------------" 1964"+----------------------------------------------------------------------" 1965"+---------------------------------------------------------------------------\n" 1966" COMPRESS | string-select " 1967"| | " 1968"NONE, LZW, PACKBITS, JPEG, CCITTRLE, CCITTFAX3, CCITTFAX4, DEFLATE\n" 1969" PREDICTOR | int | Predictor " 1970"Type |\n" 1971" JPEG_QUALITY | int | JPEG quality " 1972"1-100 |\n" 1973" ZLEVEL | int | DEFLATE compression level " 1974"1-9 |\n" 1975" NBITS | int | BITS for sub-byte files (1-7), sub-" 1976"uint16 (9-15), sub-uint32 (17-31) |\n" 1977" INTERLEAVE | string-select " 1978"| | " 1979"BAND, PIXEL\n" 1980" TILED | boolean | Switch to tiled " 1981"format |\n" 1982" TFW | boolean | Write out world " 1983"file |\n" 1984" RPB | boolean | Write out .RPB (RPC) " 1985"file |\n" 1986" BLOCKXSIZE | int | Tile " 1987"Width |\n" 1988" BLOCKYSIZE | int | Tile/Strip " 1989"Height |\n" 1990" PHOTOMETRIC | string-select " 1991"| | " 1992"MINISBLACK, MINISWHITE, PALETTE, RGB, CMYK, YCBCR, CIELAB, ICCLAB, ITULAB\n" 1993" SPARSE_OK | boolean | Can newly created files have missing " 1994"blocks? |\n" 1995" ALPHA | boolean | Mark first extrasample as being " 1996"alpha |\n" 1997" PROFILE | string-select " 1998"| | " 1999"GDALGeoTIFF, GeoTIFF, BASELINE\n" 2000" PIXELTYPE | string-select " 2001"| | " 2002"DEFAULT, SIGNEDBYTE\n" 2003" BIGTIFF | string-select | Force creation of BigTIFF " 2004"file | YES, NO, IF_NEEDED, IF_SAFER\n" 2005" ENDIANNESS | string-select | Force endianness of created file. For " 2006"DEBUG purpose mostly | NATIVE, INVERTED, LITTLE, BIG\n" 2007" COPY_SRC_OVERVIEWS | boolean | Force copy of overviews of source " 2008"dataset (CreateCopy()) |\n" 2009"(19 rows)" 2010msgstr "" 2011 2012#. Tag: para 2013#: reference_raster.xml:1035 2014#, no-c-format 2015msgid "" 2016", <xref linkend=\"ST_SRID\"/>, <xref linkend=\"postgis_gdal_enabled_drivers" 2017"\"/>" 2018msgstr "" 2019 2020#. Tag: refname 2021#: reference_raster.xml:1041 2022#, no-c-format 2023msgid "UpdateRasterSRID" 2024msgstr "" 2025 2026#. Tag: refpurpose 2027#: reference_raster.xml:1042 2028#, no-c-format 2029msgid "Change the SRID of all rasters in the user-specified column and table." 2030msgstr "" 2031 2032#. Tag: funcsynopsis 2033#: reference_raster.xml:1048 2034#, no-c-format 2035msgid "" 2036"<funcprototype> <funcdef>raster <function>UpdateRasterSRID</function></" 2037"funcdef> <paramdef><type>name </type> <parameter>schema_name</parameter></" 2038"paramdef> <paramdef><type>name </type> <parameter>table_name</parameter></" 2039"paramdef> <paramdef><type>name </type> <parameter>column_name</parameter></" 2040"paramdef> <paramdef><type>integer </type> <parameter>new_srid</parameter></" 2041"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2042"<function>UpdateRasterSRID</function></funcdef> <paramdef><type>name </type> " 2043"<parameter>table_name</parameter></paramdef> <paramdef><type>name </type> " 2044"<parameter>column_name</parameter></paramdef> <paramdef><type>integer </" 2045"type> <parameter>new_srid</parameter></paramdef> </funcprototype>" 2046msgstr "" 2047 2048#. Tag: para 2049#: reference_raster.xml:1071 2050#, no-c-format 2051msgid "" 2052"Change the SRID of all rasters in the user-specified column and table. The " 2053"function will drop all appropriate column constraints (extent, alignment and " 2054"SRID) before changing the SRID of the specified column's rasters." 2055msgstr "" 2056 2057#. Tag: para 2058#: reference_raster.xml:1076 2059#, no-c-format 2060msgid "" 2061"The data (band pixel values) of the rasters are not touched by this " 2062"function. Only the raster's metadata is changed." 2063msgstr "" 2064 2065#. Tag: para 2066#: reference_raster.xml:1081 reference_raster.xml:1751 2067#: reference_raster.xml:1852 reference_raster.xml:2302 2068#: reference_raster.xml:2597 reference_raster.xml:2752 2069#: reference_raster.xml:3395 reference_raster.xml:3449 2070#: reference_raster.xml:3493 reference_raster.xml:3547 2071#: reference_raster.xml:3704 reference_raster.xml:3801 2072#: reference_raster.xml:3986 reference_raster.xml:4089 2073#: reference_raster.xml:4186 reference_raster.xml:6704 2074#: reference_raster.xml:7298 reference_raster.xml:7489 2075#: reference_raster.xml:8763 reference_raster.xml:9048 2076#: reference_raster.xml:9496 reference_raster.xml:9629 2077#: reference_raster.xml:9680 reference_raster.xml:9917 2078#: reference_raster.xml:10170 reference_raster.xml:10442 2079#: reference_raster.xml:10529 reference_raster.xml:10610 2080#: reference_raster.xml:10691 reference_raster.xml:10772 2081#: reference_raster.xml:10985 reference_raster.xml:11065 2082#: reference_raster.xml:11222 reference_raster.xml:11309 2083#: reference_raster.xml:11404 reference_raster.xml:11497 2084#, no-c-format 2085msgid "Availability: 2.1.0" 2086msgstr "" 2087 2088#. Tag: refname 2089#: reference_raster.xml:1093 2090#, no-c-format 2091msgid "ST_CreateOverview" 2092msgstr "" 2093 2094#. Tag: refpurpose 2095#: reference_raster.xml:1094 2096#, no-c-format 2097msgid "Create an reduced resolution version of a given raster coverage." 2098msgstr "" 2099 2100#. Tag: funcprototype 2101#: reference_raster.xml:1102 2102#, no-c-format 2103msgid "" 2104"<funcdef>regclass <function>ST_CreateOverview</function></funcdef> " 2105"<paramdef><type>regclass </type> <parameter>tab</parameter></paramdef> " 2106"<paramdef><type>name </type> <parameter>col</parameter></paramdef> " 2107"<paramdef><type>int </type> <parameter>factor</parameter></paramdef> " 2108"<paramdef choice=\"opt\"><type>text </type> " 2109"<parameter>algo='NearestNeighbor'</parameter></paramdef>" 2110msgstr "" 2111 2112#. Tag: para 2113#: reference_raster.xml:1116 2114#, no-c-format 2115msgid "" 2116"Create an overview table with resampled tiles from the source table. Output " 2117"tiles will have the same size of input tiles and cover the same spatial " 2118"extent with a lower resolution (pixel size will be 1/<varname>factor</" 2119"varname> of the original in both directions)." 2120msgstr "" 2121 2122#. Tag: para 2123#: reference_raster.xml:1123 2124#, no-c-format 2125msgid "" 2126"The overview table will be made available in the <varname>raster_overviews</" 2127"varname> catalog and will have raster constraints enforced." 2128msgstr "" 2129 2130#. Tag: para 2131#: reference_raster.xml:1129 reference_raster.xml:1810 2132#: reference_raster.xml:4896 2133#, no-c-format 2134msgid "" 2135"Algorithm options are: 'NearestNeighbor', 'Bilinear', 'Cubic', " 2136"'CubicSpline', and 'Lanczos'. Refer to: <ulink url=\"http://www.gdal.org/" 2137"gdalwarp.html\">GDAL Warp resampling methods</ulink> for more details." 2138msgstr "" 2139 2140#. Tag: para 2141#: reference_raster.xml:1131 reference_raster.xml:1812 2142#: reference_raster.xml:2011 reference_raster.xml:5283 2143#: reference_raster.xml:5662 2144#, no-c-format 2145msgid "Availability: 2.2.0" 2146msgstr "" 2147 2148#. Tag: title 2149#: reference_raster.xml:1134 2150#, fuzzy, no-c-format 2151msgid "Example" 2152msgstr "Esempi" 2153 2154#. Tag: para 2155#: reference_raster.xml:1135 2156#, no-c-format 2157msgid "Output to generally better quality but slower to product format" 2158msgstr "" 2159 2160#. Tag: programlisting 2161#: reference_raster.xml:1136 2162#, no-c-format 2163msgid "" 2164"SELECT ST_CreateOverview('mydata.mytable'::regclass, 'rast', 2, 'Lanczos');" 2165msgstr "" 2166 2167#. Tag: para 2168#: reference_raster.xml:1138 2169#, no-c-format 2170msgid "Output to faster to process default nearest neighbor" 2171msgstr "" 2172 2173#. Tag: programlisting 2174#: reference_raster.xml:1139 2175#, no-c-format 2176msgid "SELECT ST_CreateOverview('mydata.mytable'::regclass, 'rast', 2);" 2177msgstr "" 2178 2179#. Tag: para 2180#: reference_raster.xml:1144 2181#, no-c-format 2182msgid "" 2183", <xref linkend=\"RT_AddOverviewConstraints\"/>, <xref linkend=" 2184"\"RT_AddRasterConstraints\"/>, <xref linkend=\"RT_Raster_Overviews\"/>" 2185msgstr "" 2186 2187#. Tag: title 2188#: reference_raster.xml:1155 2189#, no-c-format 2190msgid "Raster Constructors" 2191msgstr "" 2192 2193#. Tag: refname 2194#: reference_raster.xml:1159 2195#, no-c-format 2196msgid "ST_AddBand" 2197msgstr "ST_AddBand" 2198 2199#. Tag: refpurpose 2200#: reference_raster.xml:1160 2201#, no-c-format 2202msgid "" 2203"Returns a raster with the new band(s) of given type added with given initial " 2204"value in the given index location. If no index is specified, the band is " 2205"added to the end." 2206msgstr "" 2207 2208#. Tag: funcsynopsis 2209#: reference_raster.xml:1166 2210#, no-c-format 2211msgid "" 2212"<funcprototype> <funcdef>(1) raster <function>ST_AddBand</function></" 2213"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 2214"paramdef> <paramdef><type>addbandarg[] </type> <parameter>addbandargset</" 2215"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>(2) raster " 2216"<function>ST_AddBand</function></funcdef> <paramdef><type>raster </type> " 2217"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 2218"<parameter>index</parameter></paramdef> <paramdef><type>text </type> " 2219"<parameter>pixeltype</parameter></paramdef> <paramdef choice=\"opt" 2220"\"><type>double precision </type> <parameter>initialvalue=0</parameter></" 2221"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2222"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 2223"<funcprototype> <funcdef>(3) raster <function>ST_AddBand</function></" 2224"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 2225"paramdef> <paramdef><type>text </type> <parameter>pixeltype</parameter></" 2226"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2227"<parameter>initialvalue=0</parameter></paramdef> <paramdef choice=\"opt" 2228"\"><type>double precision </type> <parameter>nodataval=NULL</parameter></" 2229"paramdef> </funcprototype> <funcprototype> <funcdef>(4) raster " 2230"<function>ST_AddBand</function></funcdef> <paramdef><type>raster </type> " 2231"<parameter>torast</parameter></paramdef> <paramdef><type>raster </type> " 2232"<parameter>fromrast</parameter></paramdef> <paramdef choice=\"opt" 2233"\"><type>integer </type> <parameter>fromband=1</parameter></paramdef> " 2234"<paramdef choice=\"opt\"><type>integer </type> " 2235"<parameter>torastindex=at_end</parameter></paramdef> </funcprototype> " 2236"<funcprototype> <funcdef>(5) raster <function>ST_AddBand</function></" 2237"funcdef> <paramdef><type>raster </type> <parameter>torast</parameter></" 2238"paramdef> <paramdef><type>raster[] </type> <parameter>fromrasts</parameter></" 2239"paramdef> <paramdef choice=\"opt\"><type>integer </type> " 2240"<parameter>fromband=1</parameter></paramdef> <paramdef choice=\"opt" 2241"\"><type>integer </type> <parameter>torastindex=at_end</parameter></" 2242"paramdef> </funcprototype> <funcprototype> <funcdef>(6) raster " 2243"<function>ST_AddBand</function></funcdef> <paramdef><type>raster </type> " 2244"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 2245"<parameter>index</parameter></paramdef> <paramdef><type>text </type> " 2246"<parameter>outdbfile</parameter></paramdef> <paramdef><type>integer[] </" 2247"type> <parameter>outdbindex</parameter></paramdef> <paramdef choice=\"opt" 2248"\"><type>double precision </type> <parameter>nodataval=NULL</parameter></" 2249"paramdef> </funcprototype> <funcprototype> <funcdef>(7) raster " 2250"<function>ST_AddBand</function></funcdef> <paramdef><type>raster </type> " 2251"<parameter>rast</parameter></paramdef> <paramdef><type>text </type> " 2252"<parameter>outdbfile</parameter></paramdef> <paramdef><type>integer[] </" 2253"type> <parameter>outdbindex</parameter></paramdef> <paramdef choice=\"opt" 2254"\"><type>integer </type> <parameter>index=at_end</parameter></paramdef> " 2255"<paramdef choice=\"opt\"><type>double precision </type> " 2256"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype>" 2257msgstr "" 2258 2259#. Tag: para 2260#: reference_raster.xml:1231 2261#, no-c-format 2262msgid "" 2263"Returns a raster with a new band added in given position (index), of given " 2264"type, of given initial value, and of given nodata value. If no index is " 2265"specified, the band is added to the end. If no <varname>fromband</varname> " 2266"is specified, band 1 is assumed. Pixel type is a string representation of " 2267"one of the pixel types specified in <xref linkend=\"RT_ST_BandPixelType\"/>. " 2268"If an existing index is specified all subsequent bands >= that index are " 2269"incremented by 1. If an initial value greater than the max of the pixel type " 2270"is specified, then the initial value is set to the highest value allowed by " 2271"the pixel type." 2272msgstr "" 2273 2274#. Tag: para 2275#: reference_raster.xml:1235 2276#, no-c-format 2277msgid "" 2278"For the variant that takes an array of <xref linkend=\"addbandarg\"/> " 2279"(Variant 1), a specific addbandarg's index value is relative to the raster " 2280"at the time when the band described by that addbandarg is being added to the " 2281"raster. See the Multiple New Bands example below." 2282msgstr "" 2283 2284#. Tag: para 2285#: reference_raster.xml:1239 2286#, no-c-format 2287msgid "" 2288"For the variant that takes an array of rasters (Variant 5), if " 2289"<varname>torast</varname> is NULL then the <varname>fromband</varname> band " 2290"of each raster in the array is accumulated into a new raster." 2291msgstr "" 2292 2293#. Tag: para 2294#: reference_raster.xml:1243 2295#, no-c-format 2296msgid "" 2297"For the variants that take <varname>outdbfile</varname> (Variants 6 and 7), " 2298"the value must include the full path to the raster file. The file must also " 2299"be accessible to the postgres server process." 2300msgstr "" 2301 2302#. Tag: para 2303#: reference_raster.xml:1247 2304#, no-c-format 2305msgid "Enhanced: 2.1.0 support for addbandarg added." 2306msgstr "" 2307 2308#. Tag: para 2309#: reference_raster.xml:1248 2310#, no-c-format 2311msgid "Enhanced: 2.1.0 support for new out-db bands added." 2312msgstr "" 2313 2314#. Tag: title 2315#: reference_raster.xml:1252 2316#, no-c-format 2317msgid "Examples: Single New Band" 2318msgstr "" 2319 2320#. Tag: programlisting 2321#: reference_raster.xml:1254 2322#, no-c-format 2323msgid "" 2324"-- Add another band of type 8 bit unsigned integer with pixels initialized " 2325"to 200\n" 2326"UPDATE dummy_rast\n" 2327" SET rast = ST_AddBand(rast,'8BUI'::text,200)\n" 2328"WHERE rid = 1;" 2329msgstr "" 2330 2331#. Tag: programlisting 2332#: reference_raster.xml:1256 2333#, no-c-format 2334msgid "" 2335"-- Create an empty raster 100x100 units, with upper left right at 0, add 2 " 2336"bands (band 1 is 0/1 boolean bit switch, band2 allows values 0-15)\n" 2337"-- uses addbandargs\n" 2338"INSERT INTO dummy_rast(rid,rast)\n" 2339" VALUES(10, ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 1, -1, 0, 0, " 2340"0),\n" 2341" ARRAY[\n" 2342" ROW(1, '1BB'::text, 0, NULL),\n" 2343" ROW(2, '4BUI'::text, 0, NULL)\n" 2344" ]::addbandarg[]\n" 2345" )\n" 2346" );\n" 2347"\n" 2348"-- output meta data of raster bands to verify all is right --\n" 2349"SELECT (bmd).*\n" 2350"FROM (SELECT ST_BandMetaData(rast,generate_series(1,2)) As bmd\n" 2351" FROM dummy_rast WHERE rid = 10) AS foo;\n" 2352" --result --\n" 2353" pixeltype | nodatavalue | isoutdb | path\n" 2354"-----------+----------------+-------------+---------+------\n" 2355" 1BB | | f |\n" 2356" 4BUI | | f |\n" 2357"\n" 2358"\n" 2359"-- output meta data of raster -\n" 2360"SELECT (rmd).width, (rmd).height, (rmd).numbands\n" 2361"FROM (SELECT ST_MetaData(rast) As rmd\n" 2362" FROM dummy_rast WHERE rid = 10) AS foo;\n" 2363"-- result --\n" 2364" upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy " 2365"| srid | numbands\n" 2366"------------+------------+-------+--------+------------+------------+-------" 2367"+-------+------+----------\n" 2368" 0 | 0 | 100 | 100 | 1 | -1 | 0 | 0 " 2369"| 0 | 2" 2370msgstr "" 2371 2372#. Tag: title 2373#: reference_raster.xml:1260 2374#, no-c-format 2375msgid "Examples: Multiple New Bands" 2376msgstr "" 2377 2378#. Tag: programlisting 2379#: reference_raster.xml:1262 2380#, fuzzy, no-c-format 2381msgid "" 2382"SELECT\n" 2383" *\n" 2384"FROM ST_BandMetadata(\n" 2385" ST_AddBand(\n" 2386" ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, 0, 0),\n" 2387" ARRAY[\n" 2388" ROW(NULL, '8BUI', 255, 0),\n" 2389" ROW(NULL, '16BUI', 1, 2),\n" 2390" ROW(2, '32BUI', 100, 12),\n" 2391" ROW(2, '32BF', 3.14, -1)\n" 2392" ]::addbandarg[]\n" 2393" ),\n" 2394" ARRAY[]::integer[]\n" 2395");\n" 2396"\n" 2397" bandnum | pixeltype | nodatavalue | isoutdb | path\n" 2398"---------+-----------+-------------+---------+------\n" 2399" 1 | 8BUI | 0 | f |\n" 2400" 2 | 32BF | -1 | f |\n" 2401" 3 | 32BUI | 12 | f |\n" 2402" 4 | 16BUI | 2 | f |" 2403msgstr "" 2404"SELECT\n" 2405" *\n" 2406"FROM ST_BandMetadata(\n" 2407" ST_AddBand(\n" 2408" ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, 0, 0),\n" 2409" ARRAY[\n" 2410" ROW(NULL, '8BUI', 255, 0),\n" 2411" ROW(NULL, '16BUI', 1, 2),\n" 2412" ROW(2, '32BUI', 100, 12),\n" 2413" ROW(2, '32BF', 3.14, -1)\n" 2414" ]::addbandarg[]\n" 2415" ),\n" 2416" ARRAY[]::integer[]\n" 2417");\n" 2418"\n" 2419" bandnum | pixeltype | nodatavalue | isoutdb | path \n" 2420"---------+-----------+-------------+---------+------\n" 2421" 1 | 8BUI | 0 | f | \n" 2422" 2 | 32BF | -1 | f | \n" 2423" 3 | 32BUI | 12 | f | \n" 2424" 4 | 16BUI | 2 | f |" 2425 2426#. Tag: programlisting 2427#: reference_raster.xml:1264 2428#, no-c-format 2429msgid "" 2430"-- Aggregate the 1st band of a table of like rasters into a single raster\n" 2431"-- with as many bands as there are test_types and as many rows (new rasters) " 2432"as there are mice\n" 2433"-- NOTE: The ORDER BY test_type is only supported in PostgreSQL 9.0+\n" 2434"-- for 8.4 and below it usually works to order your data in a subselect (but " 2435"not guaranteed)\n" 2436"-- The resulting raster will have a band for each test_type alphabetical by " 2437"test_type\n" 2438"-- For mouse lovers: No mice were harmed in this exercise\n" 2439"SELECT\n" 2440" mouse,\n" 2441" ST_AddBand(NULL, array_agg(rast ORDER BY test_type), 1) As rast\n" 2442"FROM mice_studies\n" 2443"GROUP BY mouse;" 2444msgstr "" 2445 2446#. Tag: title 2447#: reference_raster.xml:1268 2448#, no-c-format 2449msgid "Examples: New Out-db band" 2450msgstr "" 2451 2452#. Tag: programlisting 2453#: reference_raster.xml:1269 2454#, fuzzy, no-c-format 2455msgid "" 2456"SELECT\n" 2457" *\n" 2458"FROM ST_BandMetadata(\n" 2459" ST_AddBand(\n" 2460" ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, 0, 0),\n" 2461" '/home/raster/mytestraster.tif'::text, NULL::int[]\n" 2462" ),\n" 2463" ARRAY[]::integer[]\n" 2464");\n" 2465"\n" 2466" bandnum | pixeltype | nodatavalue | isoutdb | path\n" 2467"---------+-----------+-------------+---------+------\n" 2468" 1 | 8BUI | | t | /home/raster/mytestraster." 2469"tif\n" 2470" 2 | 8BUI | | t | /home/raster/mytestraster." 2471"tif\n" 2472" 3 | 8BUI | | t | /home/raster/mytestraster.tif" 2473msgstr "" 2474"SELECT\n" 2475" *\n" 2476"FROM ST_BandMetadata(\n" 2477" ST_AddBand(\n" 2478" ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, 0, 0),\n" 2479" ARRAY[\n" 2480" ROW(NULL, '8BUI', 255, 0),\n" 2481" ROW(NULL, '16BUI', 1, 2),\n" 2482" ROW(2, '32BUI', 100, 12),\n" 2483" ROW(2, '32BF', 3.14, -1)\n" 2484" ]::addbandarg[]\n" 2485" ),\n" 2486" ARRAY[]::integer[]\n" 2487");\n" 2488"\n" 2489" bandnum | pixeltype | nodatavalue | isoutdb | path \n" 2490"---------+-----------+-------------+---------+------\n" 2491" 1 | 8BUI | 0 | f | \n" 2492" 2 | 32BF | -1 | f | \n" 2493" 3 | 32BUI | 12 | f | \n" 2494" 4 | 16BUI | 2 | f |" 2495 2496#. Tag: para 2497#: reference_raster.xml:1274 2498#, no-c-format 2499msgid "" 2500", <xref linkend=\"RT_ST_BandPixelType\"/>, <xref linkend=" 2501"\"RT_ST_MakeEmptyRaster\"/>, <xref linkend=\"RT_ST_MetaData\"/>, <xref " 2502"linkend=\"RT_ST_NumBands\"/>, <xref linkend=\"RT_ST_Reclass\"/>" 2503msgstr "" 2504", <xref linkend=\"RT_ST_BandPixelType\"/>, <xref linkend=" 2505"\"RT_ST_MakeEmptyRaster\"/>, <xref linkend=\"RT_ST_MetaData\"/>, <xref " 2506"linkend=\"RT_ST_NumBands\"/>, <xref linkend=\"RT_ST_Reclass\"/>" 2507 2508#. Tag: refname 2509#: reference_raster.xml:1287 2510#, no-c-format 2511msgid "ST_AsRaster" 2512msgstr "ST_AsRaster" 2513 2514#. Tag: refpurpose 2515#: reference_raster.xml:1288 2516#, no-c-format 2517msgid "Converts a PostGIS geometry to a PostGIS raster." 2518msgstr "" 2519 2520#. Tag: funcsynopsis 2521#: reference_raster.xml:1292 2522#, no-c-format 2523msgid "" 2524"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2525"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2526"<paramdef><type>raster </type> <parameter>ref</parameter></paramdef> " 2527"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 2528"<paramdef choice=\"opt\"><type>double precision </type> <parameter>value=1</" 2529"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2530"type> <parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2531"\"><type>boolean </type> <parameter>touched=false</parameter></paramdef> </" 2532"funcprototype> <funcprototype> <funcdef>raster <function>ST_AsRaster</" 2533"function></funcdef> <paramdef><type>geometry </type> <parameter>geom</" 2534"parameter></paramdef> <paramdef><type>raster </type> <parameter>ref</" 2535"parameter></paramdef> <paramdef choice=\"opt\"><type>text[] </type> " 2536"<parameter>pixeltype=ARRAY['8BUI']</parameter></paramdef> <paramdef choice=" 2537"\"opt\"><type>double precision[] </type> <parameter>value=ARRAY[1]</" 2538"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 2539"type> <parameter>nodataval=ARRAY[0]</parameter></paramdef> <paramdef choice=" 2540"\"opt\"><type>boolean </type> <parameter>touched=false</parameter></" 2541"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2542"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2543"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 2544"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 2545"precision </type> <parameter>scaley</parameter></paramdef> " 2546"<paramdef><type>double precision </type> <parameter>gridx</parameter></" 2547"paramdef> <paramdef><type>double precision </type> <parameter>gridy</" 2548"parameter></paramdef> <paramdef><type>text </type> <parameter>pixeltype</" 2549"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2550"type> <parameter>value=1</parameter></paramdef> <paramdef choice=\"opt" 2551"\"><type>double precision </type> <parameter>nodataval=0</parameter></" 2552"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2553"<parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2554"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2555"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2556"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2557"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2558"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 2559"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 2560"precision </type> <parameter>scaley</parameter></paramdef> <paramdef choice=" 2561"\"opt\"><type>double precision </type> <parameter>gridx=NULL</parameter></" 2562"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2563"<parameter>gridy=NULL</parameter></paramdef> <paramdef choice=\"opt" 2564"\"><type>text[] </type> <parameter>pixeltype=ARRAY['8BUI']</parameter></" 2565"paramdef> <paramdef choice=\"opt\"><type>double precision[] </type> " 2566"<parameter>value=ARRAY[1]</parameter></paramdef> <paramdef choice=\"opt" 2567"\"><type>double precision[] </type> <parameter>nodataval=ARRAY[0]</" 2568"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2569"type> <parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2570"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2571"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2572"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2573"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2574"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 2575"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 2576"precision </type> <parameter>scaley</parameter></paramdef> " 2577"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 2578"<paramdef choice=\"opt\"><type>double precision </type> <parameter>value=1</" 2579"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2580"type> <parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2581"\"><type>double precision </type> <parameter>upperleftx=NULL</parameter></" 2582"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2583"<parameter>upperlefty=NULL</parameter></paramdef> <paramdef choice=\"opt" 2584"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2585"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2586"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2587"<parameter>touched=false</parameter></paramdef> </funcprototype> " 2588"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2589"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2590"<paramdef><type>double precision </type> <parameter>scalex</parameter></" 2591"paramdef> <paramdef><type>double precision </type> <parameter>scaley</" 2592"parameter></paramdef> <paramdef><type>text[] </type> <parameter>pixeltype</" 2593"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 2594"type> <parameter>value=ARRAY[1]</parameter></paramdef> <paramdef choice=\"opt" 2595"\"><type>double precision[] </type> <parameter>nodataval=ARRAY[0]</" 2596"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2597"type> <parameter>upperleftx=NULL</parameter></paramdef> <paramdef choice=" 2598"\"opt\"><type>double precision </type> <parameter>upperlefty=NULL</" 2599"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2600"type> <parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2601"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2602"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2603"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2604"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2605"<parameter>geom</parameter></paramdef> <paramdef><type>integer </type> " 2606"<parameter>width</parameter></paramdef> <paramdef><type>integer </type> " 2607"<parameter>height</parameter></paramdef> <paramdef><type>double precision </" 2608"type> <parameter>gridx</parameter></paramdef> <paramdef><type>double " 2609"precision </type> <parameter>gridy</parameter></paramdef> " 2610"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 2611"<paramdef choice=\"opt\"><type>double precision </type> <parameter>value=1</" 2612"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2613"type> <parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2614"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2615"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2616"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2617"<parameter>touched=false</parameter></paramdef> </funcprototype> " 2618"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2619"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2620"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 2621"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 2622"<paramdef choice=\"opt\"><type>double precision </type> " 2623"<parameter>gridx=NULL</parameter></paramdef> <paramdef choice=\"opt" 2624"\"><type>double precision </type> <parameter>gridy=NULL</parameter></" 2625"paramdef> <paramdef><type>text[] </type> <parameter>pixeltype=ARRAY['8BUI']</" 2626"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 2627"type> <parameter>value=ARRAY[1]</parameter></paramdef> <paramdef choice=\"opt" 2628"\"><type>double precision[] </type> <parameter>nodataval=ARRAY[0]</" 2629"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2630"type> <parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2631"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2632"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2633"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2634"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2635"<parameter>geom</parameter></paramdef> <paramdef><type>integer </type> " 2636"<parameter>width</parameter></paramdef> <paramdef><type>integer </type> " 2637"<parameter>height</parameter></paramdef> <paramdef><type>text </type> " 2638"<parameter>pixeltype</parameter></paramdef> <paramdef choice=\"opt" 2639"\"><type>double precision </type> <parameter>value=1</parameter></paramdef> " 2640"<paramdef choice=\"opt\"><type>double precision </type> " 2641"<parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2642"\"><type>double precision </type> <parameter>upperleftx=NULL</parameter></" 2643"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2644"<parameter>upperlefty=NULL</parameter></paramdef> <paramdef choice=\"opt" 2645"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2646"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2647"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2648"<parameter>touched=false</parameter></paramdef> </funcprototype> " 2649"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2650"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2651"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 2652"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 2653"<paramdef><type>text[] </type> <parameter>pixeltype</parameter></paramdef> " 2654"<paramdef><type>double precision[] </type> <parameter>value=ARRAY[1]</" 2655"parameter></paramdef> <paramdef><type>double precision[] </type> " 2656"<parameter>nodataval=ARRAY[0]</parameter></paramdef> <paramdef choice=\"opt" 2657"\"><type>double precision </type> <parameter>upperleftx=NULL</parameter></" 2658"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2659"<parameter>upperlefty=NULL</parameter></paramdef> <paramdef choice=\"opt" 2660"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2661"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2662"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2663"<parameter>touched=false</parameter></paramdef> </funcprototype>" 2664msgstr "" 2665"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2666"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2667"<paramdef><type>raster </type> <parameter>ref</parameter></paramdef> " 2668"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 2669"<paramdef choice=\"opt\"><type>double precision </type> <parameter>value=1</" 2670"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2671"type> <parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2672"\"><type>boolean </type> <parameter>touched=false</parameter></paramdef> </" 2673"funcprototype> <funcprototype> <funcdef>raster <function>ST_AsRaster</" 2674"function></funcdef> <paramdef><type>geometry </type> <parameter>geom</" 2675"parameter></paramdef> <paramdef><type>raster </type> <parameter>ref</" 2676"parameter></paramdef> <paramdef choice=\"opt\"><type>text[] </type> " 2677"<parameter>pixeltype=ARRAY['8BUI']</parameter></paramdef> <paramdef choice=" 2678"\"opt\"><type>double precision[] </type> <parameter>value=ARRAY[1]</" 2679"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 2680"type> <parameter>nodataval=ARRAY[0]</parameter></paramdef> <paramdef choice=" 2681"\"opt\"><type>boolean </type> <parameter>touched=false</parameter></" 2682"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2683"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2684"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 2685"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 2686"precision </type> <parameter>scaley</parameter></paramdef> " 2687"<paramdef><type>double precision </type> <parameter>gridx</parameter></" 2688"paramdef> <paramdef><type>double precision </type> <parameter>gridy</" 2689"parameter></paramdef> <paramdef><type>text </type> <parameter>pixeltype</" 2690"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2691"type> <parameter>value=1</parameter></paramdef> <paramdef choice=\"opt" 2692"\"><type>double precision </type> <parameter>nodataval=0</parameter></" 2693"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2694"<parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2695"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2696"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2697"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2698"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2699"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 2700"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 2701"precision </type> <parameter>scaley</parameter></paramdef> <paramdef choice=" 2702"\"opt\"><type>double precision </type> <parameter>gridx=NULL</parameter></" 2703"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2704"<parameter>gridy=NULL</parameter></paramdef> <paramdef choice=\"opt" 2705"\"><type>text[] </type> <parameter>pixeltype=ARRAY['8BUI']</parameter></" 2706"paramdef> <paramdef choice=\"opt\"><type>double precision[] </type> " 2707"<parameter>value=ARRAY[1]</parameter></paramdef> <paramdef choice=\"opt" 2708"\"><type>double precision[] </type> <parameter>nodataval=ARRAY[0]</" 2709"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2710"type> <parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2711"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2712"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2713"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2714"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2715"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 2716"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 2717"precision </type> <parameter>scaley</parameter></paramdef> " 2718"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 2719"<paramdef choice=\"opt\"><type>double precision </type> <parameter>value=1</" 2720"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2721"type> <parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2722"\"><type>double precision </type> <parameter>upperleftx=NULL</parameter></" 2723"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2724"<parameter>upperlefty=NULL</parameter></paramdef> <paramdef choice=\"opt" 2725"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2726"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2727"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2728"<parameter>touched=false</parameter></paramdef> </funcprototype> " 2729"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2730"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2731"<paramdef><type>double precision </type> <parameter>scalex</parameter></" 2732"paramdef> <paramdef><type>double precision </type> <parameter>scaley</" 2733"parameter></paramdef> <paramdef><type>text[] </type> <parameter>pixeltype</" 2734"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 2735"type> <parameter>value=ARRAY[1]</parameter></paramdef> <paramdef choice=\"opt" 2736"\"><type>double precision[] </type> <parameter>nodataval=ARRAY[0]</" 2737"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2738"type> <parameter>upperleftx=NULL</parameter></paramdef> <paramdef choice=" 2739"\"opt\"><type>double precision </type> <parameter>upperlefty=NULL</" 2740"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2741"type> <parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2742"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2743"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2744"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2745"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2746"<parameter>geom</parameter></paramdef> <paramdef><type>integer </type> " 2747"<parameter>width</parameter></paramdef> <paramdef><type>integer </type> " 2748"<parameter>height</parameter></paramdef> <paramdef><type>double precision </" 2749"type> <parameter>gridx</parameter></paramdef> <paramdef><type>double " 2750"precision </type> <parameter>gridy</parameter></paramdef> " 2751"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 2752"<paramdef choice=\"opt\"><type>double precision </type> <parameter>value=1</" 2753"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2754"type> <parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2755"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2756"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2757"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2758"<parameter>touched=false</parameter></paramdef> </funcprototype> " 2759"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2760"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2761"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 2762"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 2763"<paramdef choice=\"opt\"><type>double precision </type> " 2764"<parameter>gridx=NULL</parameter></paramdef> <paramdef choice=\"opt" 2765"\"><type>double precision </type> <parameter>gridy=NULL</parameter></" 2766"paramdef> <paramdef><type>text[] </type> <parameter>pixeltype=ARRAY['8BUI']</" 2767"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 2768"type> <parameter>value=ARRAY[1]</parameter></paramdef> <paramdef choice=\"opt" 2769"\"><type>double precision[] </type> <parameter>nodataval=ARRAY[0]</" 2770"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 2771"type> <parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 2772"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 2773"<paramdef choice=\"opt\"><type>boolean </type> <parameter>touched=false</" 2774"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 2775"<function>ST_AsRaster</function></funcdef> <paramdef><type>geometry </type> " 2776"<parameter>geom</parameter></paramdef> <paramdef><type>integer </type> " 2777"<parameter>width</parameter></paramdef> <paramdef><type>integer </type> " 2778"<parameter>height</parameter></paramdef> <paramdef><type>text </type> " 2779"<parameter>pixeltype</parameter></paramdef> <paramdef choice=\"opt" 2780"\"><type>double precision </type> <parameter>value=1</parameter></paramdef> " 2781"<paramdef choice=\"opt\"><type>double precision </type> " 2782"<parameter>nodataval=0</parameter></paramdef> <paramdef choice=\"opt" 2783"\"><type>double precision </type> <parameter>upperleftx=NULL</parameter></" 2784"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2785"<parameter>upperlefty=NULL</parameter></paramdef> <paramdef choice=\"opt" 2786"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2787"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2788"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2789"<parameter>touched=false</parameter></paramdef> </funcprototype> " 2790"<funcprototype> <funcdef>raster <function>ST_AsRaster</function></funcdef> " 2791"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 2792"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 2793"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 2794"<paramdef><type>text[] </type> <parameter>pixeltype</parameter></paramdef> " 2795"<paramdef><type>double precision[] </type> <parameter>value=ARRAY[1]</" 2796"parameter></paramdef> <paramdef><type>double precision[] </type> " 2797"<parameter>nodataval=ARRAY[0]</parameter></paramdef> <paramdef choice=\"opt" 2798"\"><type>double precision </type> <parameter>upperleftx=NULL</parameter></" 2799"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 2800"<parameter>upperlefty=NULL</parameter></paramdef> <paramdef choice=\"opt" 2801"\"><type>double precision </type> <parameter>skewx=0</parameter></paramdef> " 2802"<paramdef choice=\"opt\"><type>double precision </type> <parameter>skewy=0</" 2803"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 2804"<parameter>touched=false</parameter></paramdef> </funcprototype>" 2805 2806#. Tag: para 2807#: reference_raster.xml:1440 2808#, no-c-format 2809msgid "" 2810"Converts a PostGIS geometry to a PostGIS raster. The many variants offers " 2811"three groups of possibilities for setting the alignment and pixelsize of the " 2812"resulting raster." 2813msgstr "" 2814 2815#. Tag: para 2816#: reference_raster.xml:1442 2817#, no-c-format 2818msgid "" 2819"The first group, composed of the two first variants, produce a raster having " 2820"the same alignment (<varname>scalex</varname>, <varname>scaley</varname>, " 2821"<varname>gridx</varname> and <varname>gridy</varname>), pixel type and " 2822"nodata value as the provided reference raster. You generally pass this " 2823"reference raster by joining the table containing the geometry with the table " 2824"containing the reference raster." 2825msgstr "" 2826 2827#. Tag: para 2828#: reference_raster.xml:1444 2829#, no-c-format 2830msgid "" 2831"The second group, composed of four variants, let you set the dimensions of " 2832"the raster by providing the parameters of a pixel size (<varname>scalex</" 2833"varname> & <varname>scaley</varname> and <varname>skewx</varname> & " 2834"<varname>skewy</varname>). The <varname>width</varname> & " 2835"<varname>height</varname> of the resulting raster will be adjusted to fit " 2836"the extent of the geometry. In most cases, you must cast integer " 2837"<varname>scalex</varname> & <varname>scaley</varname> arguments to " 2838"double precision so that PostgreSQL choose the right variant." 2839msgstr "" 2840 2841#. Tag: para 2842#: reference_raster.xml:1446 2843#, no-c-format 2844msgid "" 2845"The third group, composed of four variants, let you fix the dimensions of " 2846"the raster by providing the dimensions of the raster (<varname>width</" 2847"varname> & <varname>height</varname>). The parameters of the pixel size " 2848"(<varname>scalex</varname> & <varname>scaley</varname> and " 2849"<varname>skewx</varname> & <varname>skewy</varname>) of the resulting " 2850"raster will be adjusted to fit the extent of the geometry." 2851msgstr "" 2852 2853#. Tag: para 2854#: reference_raster.xml:1448 2855#, no-c-format 2856msgid "" 2857"The two first variants of each of those two last groups let you specify the " 2858"alignment with an arbitrary corner of the alignment grid (<varname>gridx</" 2859"varname> & <varname>gridy</varname>) and the two last variants takes the " 2860"upper left corner (<varname>upperleftx</varname> & <varname>upperlefty</" 2861"varname>)." 2862msgstr "" 2863 2864#. Tag: para 2865#: reference_raster.xml:1450 2866#, no-c-format 2867msgid "" 2868"Each group of variant allows producing a one band raster or a multiple bands " 2869"raster. To produce a multiple bands raster, you must provide an array of " 2870"pixel types (<varname>pixeltype[]</varname>), an array of initial values " 2871"(<varname>value</varname>) and an array of nodata values " 2872"(<varname>nodataval</varname>). If not provided pixeltyped defaults to 8BUI, " 2873"values to 1 and nodataval to 0." 2874msgstr "" 2875 2876#. Tag: para 2877#: reference_raster.xml:1452 2878#, no-c-format 2879msgid "" 2880"The output raster will be in the same spatial reference as the source " 2881"geometry. The only exception is for variants with a reference raster. In " 2882"this case the resulting raster will get the same SRID as the reference " 2883"raster." 2884msgstr "" 2885 2886#. Tag: para 2887#: reference_raster.xml:1454 2888#, no-c-format 2889msgid "" 2890"The optional <varname>touched</varname> parameter defaults to false and maps " 2891"to the GDAL ALL_TOUCHED rasterization option, which determines if pixels " 2892"touched by lines or polygons will be burned. Not just those on the line " 2893"render path, or whose center point is within the polygon." 2894msgstr "" 2895 2896#. Tag: para 2897#: reference_raster.xml:1456 2898#, no-c-format 2899msgid "" 2900"This is particularly useful for rendering jpegs and pngs of geometries " 2901"directly from the database when using in combination with <xref linkend=" 2902"\"RT_ST_AsPNG\"/> and other <xref linkend=\"RT_ST_AsGDALRaster\"/> family of " 2903"functions." 2904msgstr "" 2905 2906#. Tag: para 2907#: reference_raster.xml:1460 2908#, no-c-format 2909msgid "" 2910"Not yet capable of rendering complex geometry types such as curves, TINS, " 2911"and PolyhedralSurfaces, but should be able too once GDAL can." 2912msgstr "" 2913 2914#. Tag: title 2915#: reference_raster.xml:1465 2916#, no-c-format 2917msgid "Examples: Output geometries as PNG files" 2918msgstr "" 2919 2920#. Tag: para 2921#: reference_raster.xml:1471 2922#, no-c-format 2923msgid "black circle" 2924msgstr "" 2925 2926#. Tag: programlisting 2927#: reference_raster.xml:1474 2928#, no-c-format 2929msgid "" 2930"-- this will output a black circle taking up 150 x 150 pixels --\n" 2931"SELECT ST_AsPNG(ST_AsRaster(ST_Buffer(ST_Point(1,5),10),150, 150));" 2932msgstr "" 2933 2934#. Tag: para 2935#: reference_raster.xml:1481 2936#, no-c-format 2937msgid "example from buffer rendered with just PostGIS" 2938msgstr "" 2939 2940#. Tag: programlisting 2941#: reference_raster.xml:1485 2942#, no-c-format 2943msgid "" 2944"-- the bands map to RGB bands - the value (118,154,118) - teal --\n" 2945"SELECT ST_AsPNG(\n" 2946" ST_AsRaster(\n" 2947" ST_Buffer(\n" 2948" ST_GeomFromText('LINESTRING(50 50,150 150,150 50)'), " 2949"10,'join=bevel'),\n" 2950" 200,200,ARRAY['8BUI', '8BUI', '8BUI'], " 2951"ARRAY[118,154,118], ARRAY[0,0,0]));" 2952msgstr "" 2953 2954#. Tag: para 2955#: reference_raster.xml:1491 2956#, no-c-format 2957msgid "" 2958", <xref linkend=\"ST_Buffer\"/>, <xref linkend=\"RT_ST_GDALDrivers\"/>, " 2959"<xref linkend=\"RT_ST_AsGDALRaster\"/>, <xref linkend=\"RT_ST_AsPNG\"/>, " 2960"<xref linkend=\"RT_ST_AsJPEG\"/>, <xref linkend=\"RT_ST_SRID\"/>" 2961msgstr "" 2962", <xref linkend=\"ST_Buffer\"/>, <xref linkend=\"RT_ST_GDALDrivers\"/>, " 2963"<xref linkend=\"RT_ST_AsGDALRaster\"/>, <xref linkend=\"RT_ST_AsPNG\"/>, " 2964"<xref linkend=\"RT_ST_AsJPEG\"/>, <xref linkend=\"RT_ST_SRID\"/>" 2965 2966#. Tag: refname 2967#: reference_raster.xml:1497 2968#, no-c-format 2969msgid "ST_Band" 2970msgstr "ST_Band" 2971 2972#. Tag: refpurpose 2973#: reference_raster.xml:1498 2974#, no-c-format 2975msgid "" 2976"Returns one or more bands of an existing raster as a new raster. Useful for " 2977"building new rasters from existing rasters." 2978msgstr "" 2979 2980#. Tag: funcsynopsis 2981#: reference_raster.xml:1502 2982#, no-c-format 2983msgid "" 2984"<funcprototype> <funcdef>raster <function>ST_Band</function></funcdef> " 2985"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 2986"<paramdef choice=\"opt\"><type>integer[] </type> <parameter>nbands = " 2987"ARRAY[1]</parameter></paramdef> </funcprototype> <funcprototype> " 2988"<funcdef>raster <function>ST_Band</function></funcdef> " 2989"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 2990"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> </" 2991"funcprototype> <funcprototype> <funcdef>raster <function>ST_Band</function></" 2992"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 2993"paramdef> <paramdef><type>text </type> <parameter>nbands</parameter></" 2994"paramdef> <paramdef choice=\"opt\"><type>character </type> " 2995"<parameter>delimiter=,</parameter></paramdef> </funcprototype>" 2996msgstr "" 2997 2998#. Tag: para 2999#: reference_raster.xml:1527 3000#, no-c-format 3001msgid "" 3002"Returns one or more bands of an existing raster as a new raster. Useful for " 3003"building new rasters from existing rasters or export of only selected bands " 3004"of a raster or rearranging the order of bands in a raster. If no band is " 3005"specified or any of specified bands does not exist in the raster, then all " 3006"bands are returned. Used as a helper function in various functions such as " 3007"for deleting a band." 3008msgstr "" 3009 3010#. Tag: para 3011#: reference_raster.xml:1529 3012#, no-c-format 3013msgid "" 3014"For the <code>nbands</code> as text variant of function, the default " 3015"delimiter is <code>,</code> which means you can ask for <code>'1,2,3'</code> " 3016"and if you wanted to use a different delimeter you would do " 3017"<code>ST_Band(rast, '1@2@3', '@')</code>. For asking for multiple bands, we " 3018"strongly suggest you use the array form of this function e.g. " 3019"<code>ST_Band(rast, '{1,2,3}'::int[]);</code> since the <code>text</code> " 3020"list of bands form may be removed in future versions of PostGIS." 3021msgstr "" 3022 3023#. Tag: programlisting 3024#: reference_raster.xml:1537 3025#, no-c-format 3026msgid "" 3027"-- Make 2 new rasters: 1 containing band 1 of dummy, second containing band " 3028"2 of dummy and then reclassified as a 2BUI\n" 3029"SELECT ST_NumBands(rast1) As numb1, ST_BandPixelType(rast1) As pix1,\n" 3030" ST_NumBands(rast2) As numb2, ST_BandPixelType(rast2) As pix2\n" 3031"FROM (\n" 3032" SELECT ST_Band(rast) As rast1, ST_Reclass(ST_Band(rast,3), '100-200):1, " 3033"[200-254:2', '2BUI') As rast2\n" 3034" FROM dummy_rast\n" 3035" WHERE rid = 2) As foo;\n" 3036"\n" 3037" numb1 | pix1 | numb2 | pix2\n" 3038"-------+------+-------+------\n" 3039" 1 | 8BUI | 1 | 2BUI" 3040msgstr "" 3041 3042#. Tag: programlisting 3043#: reference_raster.xml:1539 3044#, no-c-format 3045msgid "" 3046"-- Return bands 2 and 3. Using array cast syntax\n" 3047"SELECT ST_NumBands(ST_Band(rast, '{2,3}'::int[])) As num_bands\n" 3048" FROM dummy_rast WHERE rid=2;\n" 3049"\n" 3050"num_bands\n" 3051"----------\n" 3052"2\n" 3053"\n" 3054"-- Return bands 2 and 3. Use array to define bands\n" 3055"SELECT ST_NumBands(ST_Band(rast, ARRAY[2,3])) As num_bands\n" 3056" FROM dummy_rast\n" 3057"WHERE rid=2;" 3058msgstr "" 3059 3060#. Tag: para 3061#: reference_raster.xml:1549 3062#, no-c-format 3063msgid "original (column rast)" 3064msgstr "original (column rast)" 3065 3066#. Tag: para 3067#: reference_raster.xml:1558 3068#, no-c-format 3069msgid "dupe_band" 3070msgstr "dupe_band" 3071 3072#. Tag: para 3073#: reference_raster.xml:1567 3074#, no-c-format 3075msgid "sing_band" 3076msgstr "sing_band" 3077 3078#. Tag: programlisting 3079#: reference_raster.xml:1575 3080#, no-c-format 3081msgid "" 3082"--Make a new raster with 2nd band of original and 1st band repeated twice,\n" 3083"and another with just the third band\n" 3084"SELECT rast, ST_Band(rast, ARRAY[2,1,1]) As dupe_band,\n" 3085" ST_Band(rast, 3) As sing_band\n" 3086"FROM samples.than_chunked\n" 3087"WHERE rid=35;" 3088msgstr "" 3089 3090#. Tag: para 3091#: reference_raster.xml:1581 3092#, no-c-format 3093msgid "" 3094", <xref linkend=\"RT_ST_NumBands\"/>, <xref linkend=\"RT_ST_Reclass\"/>, " 3095"<xref linkend=\"RT_reference\"/>" 3096msgstr "" 3097 3098#. Tag: refname 3099#: reference_raster.xml:1587 3100#, fuzzy, no-c-format 3101msgid "ST_MakeEmptyCoverage" 3102msgstr "ST_MakeEmptyRaster" 3103 3104#. Tag: refpurpose 3105#: reference_raster.xml:1588 3106#, no-c-format 3107msgid "Cover georeferenced area with a grid of empty raster tiles." 3108msgstr "" 3109 3110#. Tag: funcprototype 3111#: reference_raster.xml:1593 3112#, fuzzy, no-c-format 3113msgid "" 3114"<funcdef>raster <function>ST_MakeEmptyCoverage</function></funcdef> " 3115"<paramdef><type>integer </type> <parameter>tilewidth</parameter></paramdef> " 3116"<paramdef><type>integer </type> <parameter>tileheight</parameter></paramdef> " 3117"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 3118"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 3119"<paramdef><type>double precision </type> <parameter>upperleftx</parameter></" 3120"paramdef> <paramdef><type>double precision </type> <parameter>upperlefty</" 3121"parameter></paramdef> <paramdef><type>double precision </type> " 3122"<parameter>scalex</parameter></paramdef> <paramdef><type>double precision </" 3123"type> <parameter>scaley</parameter></paramdef> <paramdef><type>double " 3124"precision </type> <parameter>skewx</parameter></paramdef> " 3125"<paramdef><type>double precision </type> <parameter>skewy</parameter></" 3126"paramdef> <paramdef choice=\"opt\"><type>integer </type> " 3127"<parameter>srid=unknown</parameter></paramdef>" 3128msgstr "" 3129"<funcprototype> <funcdef>raster <function>ST_Rescale</function></funcdef> " 3130"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 3131"<paramdef><type>double precision </type> <parameter>scalexy</parameter></" 3132"paramdef> <paramdef choice=\"opt\"><type>text </type> " 3133"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 3134"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 3135"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 3136"<function>ST_Rescale</function></funcdef> <paramdef><type>raster </type> " 3137"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 3138"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 3139"precision </type> <parameter>scaley</parameter></paramdef> <paramdef choice=" 3140"\"opt\"><type>text </type> <parameter>algorithm=NearestNeighbour</" 3141"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 3142"type> <parameter>maxerr=0.125</parameter></paramdef> </funcprototype>" 3143 3144#. Tag: para 3145#: reference_raster.xml:1613 3146#, no-c-format 3147msgid "" 3148"Create a set of raster tiles with <xref linkend=\"RT_ST_MakeEmptyRaster\"/>. " 3149"Grid dimension is <varname>width</varname> & <varname>height</varname>. " 3150"Tile dimension is <varname>tilewidth</varname> & <varname>tileheight</" 3151"varname>. The covered georeferenced area is from upper left corner " 3152"(<varname>upperleftx</varname>, <varname>upperlefty</varname>) to lower " 3153"right corner (<varname>upperleftx</varname> + <varname>width</varname> * " 3154"<varname>scalex</varname>, <varname>upperlefty</varname> + <varname>height</" 3155"varname> * <varname>scaley</varname>)." 3156msgstr "" 3157 3158#. Tag: para 3159#: reference_raster.xml:1614 3160#, no-c-format 3161msgid "" 3162"Note that scaley is generally negative for rasters and scalex is generally " 3163"positive. So lower right corner will have a lower y value and higher x value " 3164"than the upper left corner." 3165msgstr "" 3166 3167#. Tag: para 3168#: reference_raster.xml:1615 3169#, fuzzy, no-c-format 3170msgid "Availability: 2.4.0" 3171msgstr "Disponibilità: 2.0" 3172 3173#. Tag: title 3174#: reference_raster.xml:1619 reference_raster.xml:8522 3175#, no-c-format 3176msgid "Examples Basic" 3177msgstr "" 3178 3179#. Tag: para 3180#: reference_raster.xml:1620 3181#, no-c-format 3182msgid "" 3183"Create 16 tiles in a 4x4 grid to cover the WGS84 area from upper left corner " 3184"(22, 77) to lower right corner (55, 33)." 3185msgstr "" 3186 3187#. Tag: programlisting 3188#: reference_raster.xml:1621 3189#, no-c-format 3190msgid "" 3191"<![CDATA[SELECT (ST_MetaData(tile)).* FROM ST_MakeEmptyCoverage(1, 1, 4, 4, " 3192"22, 33, (55 - 22)/(4)::float, (33 - 77)/(4)::float, 0., 0., 4326) tile;\n" 3193"\n" 3194" upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy " 3195"| srid | numbands\n" 3196"-------------------------------------------------------------------------------------\n" 3197" 22 | 33 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3198"| 4326 | 0\n" 3199" 30.25 | 33 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3200"| 4326 | 0\n" 3201" 38.5 | 33 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3202"| 4326 | 0\n" 3203" 46.75 | 33 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3204"| 4326 | 0\n" 3205" 22 | 22 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3206"| 4326 | 0\n" 3207" 30.25 | 22 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3208"| 4326 | 0\n" 3209" 38.5 | 22 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3210"| 4326 | 0\n" 3211" 46.75 | 22 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3212"| 4326 | 0\n" 3213" 22 | 11 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3214"| 4326 | 0\n" 3215" 30.25 | 11 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3216"| 4326 | 0\n" 3217" 38.5 | 11 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3218"| 4326 | 0\n" 3219" 46.75 | 11 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3220"| 4326 | 0\n" 3221" 22 | 0 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3222"| 4326 | 0\n" 3223" 30.25 | 0 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3224"| 4326 | 0\n" 3225" 38.5 | 0 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3226"| 4326 | 0\n" 3227" 46.75 | 0 | 1 | 1 | 8.25 | -11 | 0 | 0 " 3228"| 4326 | 0]]>" 3229msgstr "" 3230 3231#. Tag: refname 3232#: reference_raster.xml:1634 3233#, no-c-format 3234msgid "ST_MakeEmptyRaster" 3235msgstr "ST_MakeEmptyRaster" 3236 3237#. Tag: refpurpose 3238#: reference_raster.xml:1635 3239#, no-c-format 3240msgid "" 3241"Returns an empty raster (having no bands) of given dimensions (width & " 3242"height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx " 3243"& skewy) and reference system (srid). If a raster is passed in, returns " 3244"a new raster with the same size, alignment and SRID. If srid is left out, " 3245"the spatial ref is set to unknown (0)." 3246msgstr "" 3247 3248#. Tag: funcsynopsis 3249#: reference_raster.xml:1639 3250#, no-c-format 3251msgid "" 3252"<funcprototype> <funcdef>raster <function>ST_MakeEmptyRaster</function></" 3253"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 3254"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 3255"<function>ST_MakeEmptyRaster</function></funcdef> <paramdef><type>integer </" 3256"type> <parameter>width</parameter></paramdef> <paramdef><type>integer </" 3257"type> <parameter>height</parameter></paramdef> <paramdef><type>float8 </" 3258"type> <parameter>upperleftx</parameter></paramdef> <paramdef><type>float8 </" 3259"type> <parameter>upperlefty</parameter></paramdef> <paramdef><type>float8 </" 3260"type> <parameter>scalex</parameter></paramdef> <paramdef><type>float8 </" 3261"type> <parameter>scaley</parameter></paramdef> <paramdef><type>float8 </" 3262"type> <parameter>skewx</parameter></paramdef> <paramdef><type>float8 </type> " 3263"<parameter>skewy</parameter></paramdef> <paramdef choice=\"opt" 3264"\"><type>integer </type> <parameter>srid=unknown</parameter></paramdef> </" 3265"funcprototype> <funcprototype> <funcdef>raster <function>ST_MakeEmptyRaster</" 3266"function></funcdef> <paramdef><type>integer </type> <parameter>width</" 3267"parameter></paramdef> <paramdef><type>integer </type> <parameter>height</" 3268"parameter></paramdef> <paramdef><type>float8 </type> <parameter>upperleftx</" 3269"parameter></paramdef> <paramdef><type>float8 </type> <parameter>upperlefty</" 3270"parameter></paramdef> <paramdef><type>float8 </type> <parameter>pixelsize</" 3271"parameter></paramdef> </funcprototype>" 3272msgstr "" 3273"<funcprototype> <funcdef>raster <function>ST_MakeEmptyRaster</function></" 3274"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 3275"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 3276"<function>ST_MakeEmptyRaster</function></funcdef> <paramdef><type>integer </" 3277"type> <parameter>width</parameter></paramdef> <paramdef><type>integer </" 3278"type> <parameter>height</parameter></paramdef> <paramdef><type>float8 </" 3279"type> <parameter>upperleftx</parameter></paramdef> <paramdef><type>float8 </" 3280"type> <parameter>upperlefty</parameter></paramdef> <paramdef><type>float8 </" 3281"type> <parameter>scalex</parameter></paramdef> <paramdef><type>float8 </" 3282"type> <parameter>scaley</parameter></paramdef> <paramdef><type>float8 </" 3283"type> <parameter>skewx</parameter></paramdef> <paramdef><type>float8 </type> " 3284"<parameter>skewy</parameter></paramdef> <paramdef choice=\"opt" 3285"\"><type>integer </type> <parameter>srid=unknown</parameter></paramdef> </" 3286"funcprototype> <funcprototype> <funcdef>raster <function>ST_MakeEmptyRaster</" 3287"function></funcdef> <paramdef><type>integer </type> <parameter>width</" 3288"parameter></paramdef> <paramdef><type>integer </type> <parameter>height</" 3289"parameter></paramdef> <paramdef><type>float8 </type> <parameter>upperleftx</" 3290"parameter></paramdef> <paramdef><type>float8 </type> <parameter>upperlefty</" 3291"parameter></paramdef> <paramdef><type>float8 </type> <parameter>pixelsize</" 3292"parameter></paramdef> </funcprototype>" 3293 3294#. Tag: para 3295#: reference_raster.xml:1669 3296#, no-c-format 3297msgid "" 3298"Returns an empty raster (having no band) of given dimensions (width & " 3299"height) and georeferenced in spatial (or world) coordinates with upper left " 3300"X (upperleftx), upper left Y (upperlefty), pixel size and rotation (scalex, " 3301"scaley, skewx & skewy) and reference system (srid)." 3302msgstr "" 3303 3304#. Tag: para 3305#: reference_raster.xml:1672 3306#, no-c-format 3307msgid "" 3308"The last version use a single parameter to specify the pixel size " 3309"(pixelsize). scalex is set to this argument and scaley is set to the " 3310"negative value of this argument. skewx and skewy are set to 0." 3311msgstr "" 3312 3313#. Tag: para 3314#: reference_raster.xml:1674 3315#, no-c-format 3316msgid "" 3317"If an existing raster is passed in, it returns a new raster with the same " 3318"meta data settings (without the bands)." 3319msgstr "" 3320 3321#. Tag: para 3322#: reference_raster.xml:1676 3323#, no-c-format 3324msgid "" 3325"If no srid is specified it defaults to 0. After you create an empty raster " 3326"you probably want to add bands to it and maybe edit it. Refer to <xref " 3327"linkend=\"RT_ST_AddBand\"/> to define bands and <xref linkend=" 3328"\"RT_ST_SetValue\"/> to set initial pixel values." 3329msgstr "" 3330 3331#. Tag: programlisting 3332#: reference_raster.xml:1683 3333#, fuzzy, no-c-format 3334msgid "" 3335"INSERT INTO dummy_rast(rid,rast)\n" 3336"VALUES(3, ST_MakeEmptyRaster( 100, 100, 0.0005, 0.0005, 1, 1, 0, 0, " 3337"4326) );\n" 3338"\n" 3339"--use an existing raster as template for new raster\n" 3340"INSERT INTO dummy_rast(rid,rast)\n" 3341"SELECT 4, ST_MakeEmptyRaster(rast)\n" 3342"FROM dummy_rast WHERE rid = 3;\n" 3343"\n" 3344"-- output meta data of rasters we just added\n" 3345"SELECT rid, (md).*\n" 3346"FROM (SELECT rid, ST_MetaData(rast) As md\n" 3347" FROM dummy_rast\n" 3348" WHERE rid IN(3,4)) As foo;\n" 3349"\n" 3350"-- output --\n" 3351" rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | " 3352"skewy | srid | numbands\n" 3353"-----+------------+------------+-------+--------+------------+------------" 3354"+-------+-------+------+----------\n" 3355" 3 | 0.0005 | 0.0005 | 100 | 100 | 1 | 1 " 3356"| 0 | 0 | 4326 | 0\n" 3357" 4 | 0.0005 | 0.0005 | 100 | 100 | 1 | 1 " 3358"| 0 | 0 | 4326 | 0" 3359msgstr "" 3360"SELECT rid, (foo.md).* \n" 3361" FROM (SELECT rid, ST_MetaData(rast) As md\n" 3362"FROM dummy_rast) As foo;\n" 3363"\n" 3364" rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | " 3365"skewy | srid | numbands\n" 3366" ----+------------+------------+-------+--------+--------+-----------+-------" 3367"+-------+------+-------\n" 3368" 1 | 0.5 | 0.5 | 10 | 20 | 2 | 3 " 3369"| 0 | 0 | 0 | 0\n" 3370" 2 | 3427927.75 | 5793244 | 5 | 5 | 0.05 | -0.05 " 3371"| 0 | 0 | 0 | 3" 3372 3373#. Tag: para 3374#: reference_raster.xml:1689 3375#, no-c-format 3376msgid "" 3377", <xref linkend=\"RT_ST_MetaData\"/>, <xref linkend=\"RT_ST_ScaleX\"/>, " 3378"<xref linkend=\"RT_ST_ScaleY\"/>, <xref linkend=\"RT_ST_SetValue\"/>, <xref " 3379"linkend=\"RT_ST_SkewX\"/>, , <xref linkend=\"RT_ST_SkewY\"/>" 3380msgstr "" 3381", <xref linkend=\"RT_ST_MetaData\"/>, <xref linkend=\"RT_ST_ScaleX\"/>, " 3382"<xref linkend=\"RT_ST_ScaleY\"/>, <xref linkend=\"RT_ST_SetValue\"/>, <xref " 3383"linkend=\"RT_ST_SkewX\"/>, , <xref linkend=\"RT_ST_SkewY\"/>" 3384 3385#. Tag: refname 3386#: reference_raster.xml:1696 3387#, no-c-format 3388msgid "ST_Tile" 3389msgstr "" 3390 3391#. Tag: refpurpose 3392#: reference_raster.xml:1697 3393#, no-c-format 3394msgid "" 3395"<refpurpose>Returns a set of rasters resulting from the split of the input " 3396"raster based upon the desired dimensions of the output rasters.</refpurpose>" 3397msgstr "" 3398 3399#. Tag: funcsynopsis 3400#: reference_raster.xml:1701 3401#, no-c-format 3402msgid "" 3403"<funcprototype> <funcdef>setof raster <function>ST_Tile</function></funcdef> " 3404"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 3405"<paramdef><type>int[] </type> <parameter>nband</parameter></paramdef> " 3406"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 3407"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 3408"<paramdef choice=\"opt\"><type>boolean </type> " 3409"<parameter>padwithnodata=FALSE</parameter></paramdef> <paramdef choice=\"opt" 3410"\"><type>double precision </type> <parameter>nodataval=NULL</parameter></" 3411"paramdef> </funcprototype> <funcprototype> <funcdef>setof raster " 3412"<function>ST_Tile</function></funcdef> <paramdef><type>raster </type> " 3413"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 3414"<parameter>nband</parameter></paramdef> <paramdef><type>integer </type> " 3415"<parameter>width</parameter></paramdef> <paramdef><type>integer </type> " 3416"<parameter>height</parameter></paramdef> <paramdef choice=\"opt" 3417"\"><type>boolean </type> <parameter>padwithnodata=FALSE</parameter></" 3418"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 3419"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 3420"<funcprototype> <funcdef>setof raster <function>ST_Tile</function></funcdef> " 3421"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 3422"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 3423"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 3424"<paramdef choice=\"opt\"><type>boolean </type> " 3425"<parameter>padwithnodata=FALSE</parameter></paramdef> <paramdef choice=\"opt" 3426"\"><type>double precision </type> <parameter>nodataval=NULL</parameter></" 3427"paramdef> </funcprototype>" 3428msgstr "" 3429 3430#. Tag: para 3431#: reference_raster.xml:1737 3432#, no-c-format 3433msgid "" 3434"<para>Returns a set of rasters resulting from the split of the input raster " 3435"based upon the desired dimensions of the output rasters.</para>" 3436msgstr "" 3437 3438#. Tag: para 3439#: reference_raster.xml:1741 3440#, no-c-format 3441msgid "" 3442"If <varname>padwithnodata</varname> = FALSE, edge tiles on the right and " 3443"bottom sides of the raster may have different dimensions than the rest of " 3444"the tiles. If <varname>padwithnodata</varname> = TRUE, all tiles will have " 3445"the same dimensions with the possibility that edge tiles being padded with " 3446"NODATA values. If raster band(s) do not have NODATA value(s) specified, one " 3447"can be specified by setting <varname>nodataval</varname>." 3448msgstr "" 3449 3450#. Tag: para 3451#: reference_raster.xml:1746 3452#, no-c-format 3453msgid "" 3454"If a specified band of the input raster is out-of-db, the corresponding band " 3455"in the output rasters will also be out-of-db." 3456msgstr "" 3457 3458#. Tag: programlisting 3459#: reference_raster.xml:1757 3460#, no-c-format 3461msgid "" 3462"WITH foo AS (\n" 3463" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, " 3464"0, 0, 0), 1, '8BUI', 1, 0), 2, '8BUI', 10, 0) AS rast UNION ALL\n" 3465" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, 0, 1, -1, " 3466"0, 0, 0), 1, '8BUI', 2, 0), 2, '8BUI', 20, 0) AS rast UNION ALL\n" 3467" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 6, 0, 1, -1, " 3468"0, 0, 0), 1, '8BUI', 3, 0), 2, '8BUI', 30, 0) AS rast UNION ALL\n" 3469"\n" 3470" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, -3, 1, -1, " 3471"0, 0, 0), 1, '8BUI', 4, 0), 2, '8BUI', 40, 0) AS rast UNION ALL\n" 3472" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, -3, 1, -1, " 3473"0, 0, 0), 1, '8BUI', 5, 0), 2, '8BUI', 50, 0) AS rast UNION ALL\n" 3474" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 6, -3, 1, -1, " 3475"0, 0, 0), 1, '8BUI', 6, 0), 2, '8BUI', 60, 0) AS rast UNION ALL\n" 3476"\n" 3477" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, -6, 1, -1, " 3478"0, 0, 0), 1, '8BUI', 7, 0), 2, '8BUI', 70, 0) AS rast UNION ALL\n" 3479" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, -6, 1, -1, " 3480"0, 0, 0), 1, '8BUI', 8, 0), 2, '8BUI', 80, 0) AS rast UNION ALL\n" 3481" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 6, -6, 1, -1, " 3482"0, 0, 0), 1, '8BUI', 9, 0), 2, '8BUI', 90, 0) AS rast\n" 3483"), bar AS (\n" 3484" SELECT ST_Union(rast) AS rast FROM foo\n" 3485"), baz AS (\n" 3486" SELECT ST_Tile(rast, 3, 3, TRUE) AS rast FROM bar\n" 3487")\n" 3488"SELECT\n" 3489" ST_DumpValues(rast)\n" 3490"FROM baz;\n" 3491"\n" 3492" st_dumpvalues\n" 3493"------------------------------------------\n" 3494" (1,\"{{1,1,1},{1,1,1},{1,1,1}}\")\n" 3495" (2,\"{{10,10,10},{10,10,10},{10,10,10}}\")\n" 3496" (1,\"{{2,2,2},{2,2,2},{2,2,2}}\")\n" 3497" (2,\"{{20,20,20},{20,20,20},{20,20,20}}\")\n" 3498" (1,\"{{3,3,3},{3,3,3},{3,3,3}}\")\n" 3499" (2,\"{{30,30,30},{30,30,30},{30,30,30}}\")\n" 3500" (1,\"{{4,4,4},{4,4,4},{4,4,4}}\")\n" 3501" (2,\"{{40,40,40},{40,40,40},{40,40,40}}\")\n" 3502" (1,\"{{5,5,5},{5,5,5},{5,5,5}}\")\n" 3503" (2,\"{{50,50,50},{50,50,50},{50,50,50}}\")\n" 3504" (1,\"{{6,6,6},{6,6,6},{6,6,6}}\")\n" 3505" (2,\"{{60,60,60},{60,60,60},{60,60,60}}\")\n" 3506" (1,\"{{7,7,7},{7,7,7},{7,7,7}}\")\n" 3507" (2,\"{{70,70,70},{70,70,70},{70,70,70}}\")\n" 3508" (1,\"{{8,8,8},{8,8,8},{8,8,8}}\")\n" 3509" (2,\"{{80,80,80},{80,80,80},{80,80,80}}\")\n" 3510" (1,\"{{9,9,9},{9,9,9},{9,9,9}}\")\n" 3511" (2,\"{{90,90,90},{90,90,90},{90,90,90}}\")\n" 3512"(18 rows)" 3513msgstr "" 3514 3515#. Tag: programlisting 3516#: reference_raster.xml:1759 3517#, no-c-format 3518msgid "" 3519"WITH foo AS (\n" 3520" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, " 3521"0, 0, 0), 1, '8BUI', 1, 0), 2, '8BUI', 10, 0) AS rast UNION ALL\n" 3522" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, 0, 1, -1, " 3523"0, 0, 0), 1, '8BUI', 2, 0), 2, '8BUI', 20, 0) AS rast UNION ALL\n" 3524" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 6, 0, 1, -1, " 3525"0, 0, 0), 1, '8BUI', 3, 0), 2, '8BUI', 30, 0) AS rast UNION ALL\n" 3526"\n" 3527" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, -3, 1, -1, " 3528"0, 0, 0), 1, '8BUI', 4, 0), 2, '8BUI', 40, 0) AS rast UNION ALL\n" 3529" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, -3, 1, -1, " 3530"0, 0, 0), 1, '8BUI', 5, 0), 2, '8BUI', 50, 0) AS rast UNION ALL\n" 3531" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 6, -3, 1, -1, " 3532"0, 0, 0), 1, '8BUI', 6, 0), 2, '8BUI', 60, 0) AS rast UNION ALL\n" 3533"\n" 3534" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, -6, 1, -1, " 3535"0, 0, 0), 1, '8BUI', 7, 0), 2, '8BUI', 70, 0) AS rast UNION ALL\n" 3536" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 3, -6, 1, -1, " 3537"0, 0, 0), 1, '8BUI', 8, 0), 2, '8BUI', 80, 0) AS rast UNION ALL\n" 3538" SELECT ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 6, -6, 1, -1, " 3539"0, 0, 0), 1, '8BUI', 9, 0), 2, '8BUI', 90, 0) AS rast\n" 3540"), bar AS (\n" 3541" SELECT ST_Union(rast) AS rast FROM foo\n" 3542"), baz AS (\n" 3543" SELECT ST_Tile(rast, 3, 3, 2) AS rast FROM bar\n" 3544")\n" 3545"SELECT\n" 3546" ST_DumpValues(rast)\n" 3547"FROM baz;\n" 3548"\n" 3549" st_dumpvalues\n" 3550"------------------------------------------\n" 3551" (1,\"{{10,10,10},{10,10,10},{10,10,10}}\")\n" 3552" (1,\"{{20,20,20},{20,20,20},{20,20,20}}\")\n" 3553" (1,\"{{30,30,30},{30,30,30},{30,30,30}}\")\n" 3554" (1,\"{{40,40,40},{40,40,40},{40,40,40}}\")\n" 3555" (1,\"{{50,50,50},{50,50,50},{50,50,50}}\")\n" 3556" (1,\"{{60,60,60},{60,60,60},{60,60,60}}\")\n" 3557" (1,\"{{70,70,70},{70,70,70},{70,70,70}}\")\n" 3558" (1,\"{{80,80,80},{80,80,80},{80,80,80}}\")\n" 3559" (1,\"{{90,90,90},{90,90,90},{90,90,90}}\")\n" 3560"(9 rows)" 3561msgstr "" 3562 3563#. Tag: para 3564#: reference_raster.xml:1765 3565#, no-c-format 3566msgid ", <xref linkend=\"RT_Retile\"/>" 3567msgstr "" 3568 3569#. Tag: refname 3570#: reference_raster.xml:1775 3571#, no-c-format 3572msgid "ST_Retile" 3573msgstr "" 3574 3575#. Tag: refpurpose 3576#: reference_raster.xml:1776 3577#, no-c-format 3578msgid "" 3579"Return a set of configured tiles from an arbitrarily tiled raster coverage." 3580msgstr "" 3581 3582#. Tag: funcprototype 3583#: reference_raster.xml:1784 3584#, no-c-format 3585msgid "" 3586"<funcdef>SETOF raster <function>ST_Retile</function></funcdef> " 3587"<paramdef><type>regclass </type> <parameter>tab</parameter></paramdef> " 3588"<paramdef><type>name </type> <parameter>col</parameter></paramdef> " 3589"<paramdef><type>geometry </type> <parameter>ext</parameter></paramdef> " 3590"<paramdef><type>float8 </type> <parameter>sfx</parameter></paramdef> " 3591"<paramdef><type>float8 </type> <parameter>sfy</parameter></paramdef> " 3592"<paramdef><type>int </type> <parameter>tw</parameter></paramdef> " 3593"<paramdef><type>int </type> <parameter>th</parameter></paramdef> <paramdef " 3594"choice=\"opt\"><type>text </type> <parameter>algo='NearestNeighbor'</" 3595"parameter></paramdef>" 3596msgstr "" 3597 3598#. Tag: para 3599#: reference_raster.xml:1802 3600#, no-c-format 3601msgid "" 3602"Return a set of tiles having the specified scale (<varname>sfx</varname>, " 3603"<varname>sfy</varname>) and max size (<varname>tw</varname>, <varname>th</" 3604"varname>) and covering the specified extent (<varname>ext</varname>) with " 3605"data coming from the specified raster coverage (<varname>tab</varname>, " 3606"<varname>col</varname>)." 3607msgstr "" 3608 3609#. Tag: refname 3610#: reference_raster.xml:1826 3611#, no-c-format 3612msgid "ST_FromGDALRaster" 3613msgstr "" 3614 3615#. Tag: refpurpose 3616#: reference_raster.xml:1827 3617#, no-c-format 3618msgid "Returns a raster from a supported GDAL raster file." 3619msgstr "" 3620 3621#. Tag: funcprototype 3622#: reference_raster.xml:1832 3623#, no-c-format 3624msgid "" 3625"<funcdef>raster <function>ST_FromGDALRaster</function></funcdef> " 3626"<paramdef><type>bytea </type> <parameter>gdaldata</parameter></paramdef> " 3627"<paramdef choice=\"opt\"><type>integer </type> <parameter>srid=NULL</" 3628"parameter></paramdef>" 3629msgstr "" 3630 3631#. Tag: para 3632#: reference_raster.xml:1844 3633#, no-c-format 3634msgid "" 3635"Returns a raster from a supported GDAL raster file. <varname>gdaldata</" 3636"varname> is of type bytea and should be the contents of the GDAL raster file." 3637msgstr "" 3638 3639#. Tag: para 3640#: reference_raster.xml:1848 3641#, no-c-format 3642msgid "" 3643"If <varname>srid</varname> is NULL, the function will try to automatically " 3644"assign the SRID from the GDAL raster. If <varname>srid</varname> is " 3645"provided, the value provided will override any automatically assigned SRID." 3646msgstr "" 3647 3648#. Tag: programlisting 3649#: reference_raster.xml:1858 3650#, no-c-format 3651msgid "" 3652"WITH foo AS (\n" 3653" SELECT " 3654"ST_AsPNG(ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, " 3655"0.1, -0.1, 0, 0, 4326), 1, '8BUI', 1, 0), 2, '8BUI', 2, 0), 3, '8BUI', 3, " 3656"0)) AS png\n" 3657"),\n" 3658"bar AS (\n" 3659" SELECT 1 AS rid, ST_FromGDALRaster(png) AS rast FROM foo\n" 3660" UNION ALL\n" 3661" SELECT 2 AS rid, ST_FromGDALRaster(png, 3310) AS rast FROM foo\n" 3662")\n" 3663"SELECT\n" 3664" rid,\n" 3665" ST_Metadata(rast) AS metadata,\n" 3666" ST_SummaryStats(rast, 1) AS stats1,\n" 3667" ST_SummaryStats(rast, 2) AS stats2,\n" 3668" ST_SummaryStats(rast, 3) AS stats3\n" 3669"FROM bar\n" 3670"ORDER BY rid;\n" 3671"\n" 3672" rid | metadata | stats1 | stats2 | " 3673"stats3\n" 3674"-----+---------------------------+---------------+---------------" 3675"+----------------\n" 3676" 1 | (0,0,2,2,1,-1,0,0,0,3) | (4,4,1,0,1,1) | (4,8,2,0,2,2) | " 3677"(4,12,3,0,3,3)\n" 3678" 2 | (0,0,2,2,1,-1,0,0,3310,3) | (4,4,1,0,1,1) | (4,8,2,0,2,2) | " 3679"(4,12,3,0,3,3)\n" 3680"(2 rows)" 3681msgstr "" 3682 3683#. Tag: title 3684#: reference_raster.xml:1873 3685#, no-c-format 3686msgid "Raster Accessors" 3687msgstr "" 3688 3689#. Tag: refname 3690#: reference_raster.xml:1877 3691#, no-c-format 3692msgid "ST_GeoReference" 3693msgstr "ST_GeoReference" 3694 3695#. Tag: refpurpose 3696#: reference_raster.xml:1878 3697#, no-c-format 3698msgid "" 3699"Returns the georeference meta data in GDAL or ESRI format as commonly seen " 3700"in a world file. Default is GDAL." 3701msgstr "" 3702 3703#. Tag: funcprototype 3704#: reference_raster.xml:1883 3705#, no-c-format 3706msgid "" 3707"<funcdef>text <function>ST_GeoReference</function></funcdef> " 3708"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 3709"<paramdef choice=\"opt\"><type>text </type> <parameter>format=GDAL</" 3710"parameter></paramdef>" 3711msgstr "" 3712"<funcdef>text <function>ST_GeoReference</function></funcdef> " 3713"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 3714"<paramdef choice=\"opt\"><type>text </type> <parameter>format=GDAL</" 3715"parameter></paramdef>" 3716 3717#. Tag: para 3718#: reference_raster.xml:1894 3719#, no-c-format 3720msgid "" 3721"Returns the georeference meta data including carriage return in GDAL or ESRI " 3722"format as commonly seen in a <ulink url=\"http://en.wikipedia.org/wiki/" 3723"World_file\">world file</ulink>. Default is GDAL if no type specified. type " 3724"is string 'GDAL' or 'ESRI'." 3725msgstr "" 3726 3727#. Tag: para 3728#: reference_raster.xml:1896 reference_raster.xml:4235 3729#, no-c-format 3730msgid "Difference between format representations is as follows:" 3731msgstr "" 3732 3733#. Tag: para 3734#: reference_raster.xml:1897 reference_raster.xml:4236 3735#, no-c-format 3736msgid "<varname>GDAL</varname>:" 3737msgstr "<varname>GDAL</varname>:" 3738 3739#. Tag: programlisting 3740#: reference_raster.xml:1898 3741#, fuzzy, no-c-format 3742msgid "" 3743"scalex\n" 3744"skewy\n" 3745"skewx\n" 3746"scaley\n" 3747"upperleftx\n" 3748"upperlefty" 3749msgstr "" 3750"scalex \n" 3751"skewy \n" 3752"skewx\n" 3753"scaley\n" 3754"upperleftx\n" 3755"upperlefty" 3756 3757#. Tag: para 3758#: reference_raster.xml:1899 reference_raster.xml:4238 3759#, no-c-format 3760msgid "<varname>ESRI</varname>:" 3761msgstr "<varname>ESRI</varname>:" 3762 3763#. Tag: programlisting 3764#: reference_raster.xml:1900 3765#, fuzzy, no-c-format 3766msgid "" 3767"scalex\n" 3768"skewy\n" 3769"skewx\n" 3770"scaley\n" 3771"upperleftx + scalex*0.5\n" 3772"upperlefty + scaley*0.5" 3773msgstr "" 3774"scalex \n" 3775"skewy \n" 3776"skewx\n" 3777"scaley\n" 3778"upperleftx + scalex*0.5\n" 3779"upperlefty + scaley*0.5" 3780 3781#. Tag: programlisting 3782#: reference_raster.xml:1906 3783#, no-c-format 3784msgid "" 3785"SELECT ST_GeoReference(rast, 'ESRI') As esri_ref, ST_GeoReference(rast, " 3786"'GDAL') As gdal_ref\n" 3787" FROM dummy_rast WHERE rid=1;\n" 3788"\n" 3789" esri_ref | gdal_ref\n" 3790"--------------+--------------\n" 3791" 2.0000000000 | 2.0000000000\n" 3792" 0.0000000000 : 0.0000000000\n" 3793" 0.0000000000 : 0.0000000000\n" 3794" 3.0000000000 : 3.0000000000\n" 3795" 1.5000000000 : 0.5000000000\n" 3796" 2.0000000000 : 0.5000000000" 3797msgstr "" 3798"SELECT ST_GeoReference(rast, 'ESRI') As esri_ref, ST_GeoReference(rast, " 3799"'GDAL') As gdal_ref\n" 3800" FROM dummy_rast WHERE rid=1;\n" 3801"\n" 3802" esri_ref | gdal_ref\n" 3803"--------------+--------------\n" 3804" 2.0000000000 | 2.0000000000\n" 3805" 0.0000000000 : 0.0000000000\n" 3806" 0.0000000000 : 0.0000000000\n" 3807" 3.0000000000 : 3.0000000000\n" 3808" 1.5000000000 : 0.5000000000\n" 3809" 2.0000000000 : 0.5000000000" 3810 3811#. Tag: para 3812#: reference_raster.xml:1911 3813#, no-c-format 3814msgid ", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>" 3815msgstr ", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>" 3816 3817#. Tag: refname 3818#: reference_raster.xml:1917 3819#, no-c-format 3820msgid "ST_Height" 3821msgstr "ST_Height" 3822 3823#. Tag: refpurpose 3824#: reference_raster.xml:1918 3825#, no-c-format 3826msgid "Returns the height of the raster in pixels." 3827msgstr "" 3828 3829#. Tag: funcprototype 3830#: reference_raster.xml:1923 3831#, no-c-format 3832msgid "" 3833"<funcdef>integer <function>ST_Height</function></funcdef> " 3834"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 3835msgstr "" 3836"<funcdef>integer <function>ST_Height</function></funcdef> " 3837"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 3838 3839#. Tag: para 3840#: reference_raster.xml:1933 3841#, no-c-format 3842msgid "Returns the height of the raster." 3843msgstr "" 3844 3845#. Tag: programlisting 3846#: reference_raster.xml:1939 3847#, no-c-format 3848msgid "" 3849"SELECT rid, ST_Height(rast) As rastheight\n" 3850"FROM dummy_rast;\n" 3851"\n" 3852" rid | rastheight\n" 3853"-----+------------\n" 3854" 1 | 20\n" 3855" 2 | 5" 3856msgstr "" 3857"SELECT rid, ST_Height(rast) As rastheight\n" 3858"FROM dummy_rast;\n" 3859"\n" 3860" rid | rastheight\n" 3861"-----+------------\n" 3862" 1 | 20\n" 3863" 2 | 5" 3864 3865#. Tag: refname 3866#: reference_raster.xml:1951 3867#, no-c-format 3868msgid "ST_IsEmpty" 3869msgstr "ST_IsEmpty" 3870 3871#. Tag: refpurpose 3872#: reference_raster.xml:1952 3873#, no-c-format 3874msgid "" 3875"<refpurpose>Returns true if the raster is empty (width = 0 and height = 0). " 3876"Otherwise, returns false.</refpurpose>" 3877msgstr "" 3878 3879#. Tag: funcprototype 3880#: reference_raster.xml:1957 3881#, no-c-format 3882msgid "" 3883"<funcdef>boolean <function>ST_IsEmpty</function></funcdef> " 3884"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 3885msgstr "" 3886"<funcdef>boolean <function>ST_IsEmpty</function></funcdef> " 3887"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 3888 3889#. Tag: para 3890#: reference_raster.xml:1967 3891#, no-c-format 3892msgid "" 3893"<para>Returns true if the raster is empty (width = 0 and height = 0). " 3894"Otherwise, returns false.</para>" 3895msgstr "" 3896 3897#. Tag: programlisting 3898#: reference_raster.xml:1975 3899#, fuzzy, no-c-format 3900msgid "" 3901"SELECT ST_IsEmpty(ST_MakeEmptyRaster(100, 100, 0, 0, 0, 0, 0, 0))\n" 3902"st_isempty |\n" 3903"-----------+\n" 3904"f |\n" 3905"\n" 3906"\n" 3907"SELECT ST_IsEmpty(ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0))\n" 3908"st_isempty |\n" 3909"-----------+\n" 3910"t |" 3911msgstr "" 3912"SELECT ST_IsEmpty(ST_MakeEmptyRaster(100, 100, 0, 0, 0, 0, 0, 0))\n" 3913"st_isempty |\n" 3914"-----------+\n" 3915"f |\n" 3916" \n" 3917" \n" 3918"SELECT ST_IsEmpty(ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0))\n" 3919"st_isempty |\n" 3920"-----------+\n" 3921"t |" 3922 3923#. Tag: refname 3924#: reference_raster.xml:1987 3925#, no-c-format 3926msgid "ST_MemSize" 3927msgstr "" 3928 3929#. Tag: refpurpose 3930#: reference_raster.xml:1989 3931#, no-c-format 3932msgid "" 3933"<refpurpose>Returns the amount of space (in bytes) the raster takes.</" 3934"refpurpose>" 3935msgstr "" 3936 3937#. Tag: funcprototype 3938#: reference_raster.xml:1994 3939#, no-c-format 3940msgid "" 3941"<funcdef>integer <function>ST_MemSize</function></funcdef> " 3942"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 3943msgstr "" 3944 3945#. Tag: para 3946#: reference_raster.xml:2004 3947#, no-c-format 3948msgid "<para>Returns the amount of space (in bytes) the raster takes.</para>" 3949msgstr "" 3950 3951#. Tag: para 3952#: reference_raster.xml:2005 3953#, no-c-format 3954msgid "" 3955"This is a nice compliment to PostgreSQL built in functions pg_column_size, " 3956"pg_size_pretty, pg_relation_size, pg_total_relation_size." 3957msgstr "" 3958 3959#. Tag: para 3960#: reference_raster.xml:2006 3961#, no-c-format 3962msgid "" 3963"pg_relation_size which gives the byte size of a table may return byte size " 3964"lower than ST_MemSize. This is because pg_relation_size does not add toasted " 3965"table contribution and large geometries are stored in TOAST tables. " 3966"pg_column_size might return lower because it returns the compressed size." 3967msgstr "" 3968 3969#. Tag: para 3970#: reference_raster.xml:2008 3971#, no-c-format 3972msgid "" 3973"pg_total_relation_size - includes, the table, the toasted tables, and the " 3974"indexes." 3975msgstr "" 3976 3977#. Tag: programlisting 3978#: reference_raster.xml:2018 3979#, no-c-format 3980msgid "" 3981"SELECT ST_MemSize(ST_AsRaster(ST_Buffer(ST_Point(1,5),10,1000),150, 150, " 3982"'8BUI')) As rast_mem;\n" 3983"\n" 3984" rast_mem\n" 3985" --------\n" 3986" 22568" 3987msgstr "" 3988 3989#. Tag: refname 3990#: reference_raster.xml:2031 3991#, no-c-format 3992msgid "ST_MetaData" 3993msgstr "ST_MetaData" 3994 3995#. Tag: refpurpose 3996#: reference_raster.xml:2032 3997#, no-c-format 3998msgid "" 3999"Returns basic meta data about a raster object such as pixel size, rotation " 4000"(skew), upper, lower left, etc." 4001msgstr "" 4002 4003#. Tag: funcprototype 4004#: reference_raster.xml:2037 4005#, no-c-format 4006msgid "" 4007"<funcdef>record <function>ST_MetaData</function></funcdef> " 4008"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4009msgstr "" 4010"<funcdef>record <function>ST_MetaData</function></funcdef> " 4011"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4012 4013#. Tag: para 4014#: reference_raster.xml:2047 4015#, no-c-format 4016msgid "" 4017"Returns basic meta data about a raster object such as pixel size, rotation " 4018"(skew), upper, lower left, etc. Columns returned: upperleftx | upperlefty | " 4019"width | height | scalex | scaley | skewx | skewy | srid | numbands" 4020msgstr "" 4021 4022#. Tag: programlisting 4023#: reference_raster.xml:2054 4024#, fuzzy, no-c-format 4025msgid "" 4026"SELECT rid, (foo.md).*\n" 4027" FROM (SELECT rid, ST_MetaData(rast) As md\n" 4028"FROM dummy_rast) As foo;\n" 4029"\n" 4030" rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | " 4031"skewy | srid | numbands\n" 4032" ----+------------+------------+-------+--------+--------+-----------+-------" 4033"+-------+------+-------\n" 4034" 1 | 0.5 | 0.5 | 10 | 20 | 2 | 3 " 4035"| 0 | 0 | 0 | 0\n" 4036" 2 | 3427927.75 | 5793244 | 5 | 5 | 0.05 | -0.05 " 4037"| 0 | 0 | 0 | 3" 4038msgstr "" 4039"SELECT rid, (foo.md).* \n" 4040" FROM (SELECT rid, ST_MetaData(rast) As md\n" 4041"FROM dummy_rast) As foo;\n" 4042"\n" 4043" rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | " 4044"skewy | srid | numbands\n" 4045" ----+------------+------------+-------+--------+--------+-----------+-------" 4046"+-------+------+-------\n" 4047" 1 | 0.5 | 0.5 | 10 | 20 | 2 | 3 " 4048"| 0 | 0 | 0 | 0\n" 4049" 2 | 3427927.75 | 5793244 | 5 | 5 | 0.05 | -0.05 " 4050"| 0 | 0 | 0 | 3" 4051 4052#. Tag: para 4053#: reference_raster.xml:2060 reference_raster.xml:5014 4054#, no-c-format 4055msgid ", <xref linkend=\"RT_ST_NumBands\"/>" 4056msgstr ", <xref linkend=\"RT_ST_NumBands\"/>" 4057 4058#. Tag: refname 4059#: reference_raster.xml:2066 4060#, no-c-format 4061msgid "ST_NumBands" 4062msgstr "ST_NumBands" 4063 4064#. Tag: refpurpose 4065#: reference_raster.xml:2067 4066#, no-c-format 4067msgid "" 4068"<refpurpose>Returns the number of bands in the raster object.</refpurpose>" 4069msgstr "" 4070 4071#. Tag: funcprototype 4072#: reference_raster.xml:2072 4073#, no-c-format 4074msgid "" 4075"<funcdef>integer <function>ST_NumBands</function></funcdef> " 4076"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4077msgstr "" 4078 4079#. Tag: para 4080#: reference_raster.xml:2082 4081#, no-c-format 4082msgid "<para>Returns the number of bands in the raster object.</para>" 4083msgstr "" 4084 4085#. Tag: programlisting 4086#: reference_raster.xml:2088 4087#, no-c-format 4088msgid "" 4089"SELECT rid, ST_NumBands(rast) As numbands\n" 4090"FROM dummy_rast;\n" 4091"\n" 4092"rid | numbands\n" 4093"----+----------\n" 4094" 1 | 0\n" 4095" 2 | 3" 4096msgstr "" 4097"SELECT rid, ST_NumBands(rast) As numbands\n" 4098"FROM dummy_rast;\n" 4099"\n" 4100"rid | numbands\n" 4101"----+----------\n" 4102" 1 | 0\n" 4103" 2 | 3" 4104 4105#. Tag: refname 4106#: reference_raster.xml:2100 4107#, no-c-format 4108msgid "ST_PixelHeight" 4109msgstr "ST_PixelHeight" 4110 4111#. Tag: refpurpose 4112#: reference_raster.xml:2101 4113#, no-c-format 4114msgid "" 4115"Returns the pixel height in geometric units of the spatial reference system." 4116msgstr "" 4117 4118#. Tag: funcprototype 4119#: reference_raster.xml:2106 4120#, no-c-format 4121msgid "" 4122"<funcdef>double precision <function>ST_PixelHeight</function></funcdef> " 4123"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4124msgstr "" 4125"<funcdef>double precision <function>ST_PixelHeight</function></funcdef> " 4126"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4127 4128#. Tag: para 4129#: reference_raster.xml:2116 4130#, no-c-format 4131msgid "" 4132"Returns the height of a pixel in geometric units of the spatial reference " 4133"system. In the common case where there is no skew, the pixel height is just " 4134"the scale ratio between geometric coordinates and raster pixels." 4135msgstr "" 4136 4137#. Tag: para 4138#: reference_raster.xml:2118 4139#, no-c-format 4140msgid "" 4141"Refer to <xref linkend=\"RT_ST_PixelWidth\"/> for a diagrammatic " 4142"visualization of the relationship." 4143msgstr "" 4144 4145#. Tag: title 4146#: reference_raster.xml:2122 reference_raster.xml:2182 4147#, no-c-format 4148msgid "Examples: Rasters with no skew" 4149msgstr "" 4150 4151#. Tag: programlisting 4152#: reference_raster.xml:2124 4153#, no-c-format 4154msgid "" 4155"SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight,\n" 4156" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As " 4157"skewx,\n" 4158" ST_SkewY(rast) As skewy\n" 4159"FROM dummy_rast;\n" 4160"\n" 4161" rastheight | pixheight | scalex | scaley | skewx | skewy\n" 4162"------------+-----------+--------+--------+-------+----------\n" 4163" 20 | 3 | 2 | 3 | 0 | 0\n" 4164" 5 | 0.05 | 0.05 | -0.05 | 0 | 0" 4165msgstr "" 4166"SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight,\n" 4167" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As " 4168"skewx,\n" 4169" ST_SkewY(rast) As skewy\n" 4170"FROM dummy_rast;\n" 4171"\n" 4172" rastheight | pixheight | scalex | scaley | skewx | skewy\n" 4173"------------+-----------+--------+--------+-------+----------\n" 4174" 20 | 3 | 2 | 3 | 0 | 0\n" 4175" 5 | 0.05 | 0.05 | -0.05 | 0 | 0" 4176 4177#. Tag: title 4178#: reference_raster.xml:2129 reference_raster.xml:2189 4179#, no-c-format 4180msgid "Examples: Rasters with skew different than 0" 4181msgstr "" 4182 4183#. Tag: programlisting 4184#: reference_raster.xml:2131 4185#, no-c-format 4186msgid "" 4187"SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight,\n" 4188" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As " 4189"skewx,\n" 4190" ST_SkewY(rast) As skewy\n" 4191"FROM (SELECT ST_SetSKew(rast,0.5,0.5) As rast\n" 4192" FROM dummy_rast) As skewed;\n" 4193"\n" 4194"rastheight | pixheight | scalex | scaley | skewx | skewy\n" 4195"-----------+-------------------+--------+--------+-------+----------\n" 4196" 20 | 3.04138126514911 | 2 | 3 | 0.5 | 0.5\n" 4197" 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5" 4198msgstr "" 4199"SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight,\n" 4200" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As " 4201"skewx,\n" 4202" ST_SkewY(rast) As skewy\n" 4203"FROM (SELECT ST_SetSKew(rast,0.5,0.5) As rast\n" 4204" FROM dummy_rast) As skewed;\n" 4205"\n" 4206"rastheight | pixheight | scalex | scaley | skewx | skewy\n" 4207"-----------+-------------------+--------+--------+-------+----------\n" 4208" 20 | 3.04138126514911 | 2 | 3 | 0.5 | 0.5\n" 4209" 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5" 4210 4211#. Tag: para 4212#: reference_raster.xml:2138 reference_raster.xml:2198 4213#: reference_raster.xml:4294 4214#, no-c-format 4215msgid "" 4216", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>, <xref " 4217"linkend=\"RT_ST_SkewX\"/>, <xref linkend=\"RT_ST_SkewY\"/>" 4218msgstr "" 4219", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>, <xref " 4220"linkend=\"RT_ST_SkewX\"/>, <xref linkend=\"RT_ST_SkewY\"/>" 4221 4222#. Tag: refname 4223#: reference_raster.xml:2150 4224#, no-c-format 4225msgid "ST_PixelWidth" 4226msgstr "ST_PixelWidth" 4227 4228#. Tag: refpurpose 4229#: reference_raster.xml:2151 4230#, no-c-format 4231msgid "" 4232"Returns the pixel width in geometric units of the spatial reference system." 4233msgstr "" 4234 4235#. Tag: funcprototype 4236#: reference_raster.xml:2156 4237#, no-c-format 4238msgid "" 4239"<funcdef>double precision <function>ST_PixelWidth</function></funcdef> " 4240"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4241msgstr "" 4242"<funcdef>double precision <function>ST_PixelWidth</function></funcdef> " 4243"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4244 4245#. Tag: para 4246#: reference_raster.xml:2166 4247#, no-c-format 4248msgid "" 4249"Returns the width of a pixel in geometric units of the spatial reference " 4250"system. In the common case where there is no skew, the pixel width is just " 4251"the scale ratio between geometric coordinates and raster pixels." 4252msgstr "" 4253 4254#. Tag: para 4255#: reference_raster.xml:2168 4256#, no-c-format 4257msgid "The following diagram demonstrates the relationship:" 4258msgstr "" 4259 4260#. Tag: para 4261#: reference_raster.xml:2175 4262#, no-c-format 4263msgid "Pixel Width: Pixel size in the i direction" 4264msgstr "" 4265 4266#. Tag: para 4267#: reference_raster.xml:2175 4268#, no-c-format 4269msgid "Pixel Height: Pixel size in the j direction" 4270msgstr "" 4271 4272#. Tag: programlisting 4273#: reference_raster.xml:2184 4274#, fuzzy, no-c-format 4275msgid "" 4276"SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth,\n" 4277" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) " 4278"As skewx,\n" 4279" ST_SkewY(rast) As skewy\n" 4280" FROM dummy_rast;\n" 4281"\n" 4282" rastwidth | pixwidth | scalex | scaley | skewx | skewy\n" 4283" -----------+----------+--------+--------+-------+----------\n" 4284" 10 | 2 | 2 | 3 | 0 | 0\n" 4285" 5 | 0.05 | 0.05 | -0.05 | 0 | 0" 4286msgstr "" 4287"SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth,\n" 4288" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) " 4289"As skewx,\n" 4290" ST_SkewY(rast) As skewy\n" 4291" FROM dummy_rast;\n" 4292" \n" 4293" rastwidth | pixwidth | scalex | scaley | skewx | skewy\n" 4294" -----------+----------+--------+--------+-------+----------\n" 4295" 10 | 2 | 2 | 3 | 0 | 0\n" 4296" 5 | 0.05 | 0.05 | -0.05 | 0 | 0" 4297 4298#. Tag: programlisting 4299#: reference_raster.xml:2191 4300#, fuzzy, no-c-format 4301msgid "" 4302"SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth,\n" 4303" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) " 4304"As skewx,\n" 4305" ST_SkewY(rast) As skewy\n" 4306" FROM (SELECT ST_SetSkew(rast,0.5,0.5) As rast\n" 4307" FROM dummy_rast) As skewed;\n" 4308"\n" 4309" rastwidth | pixwidth | scalex | scaley | skewx | skewy\n" 4310" -----------+-------------------+--------+--------+-------" 4311"+----------\n" 4312" 10 | 2.06155281280883 | 2 | 3 | 0.5 | 0.5\n" 4313" 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5" 4314msgstr "" 4315"SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth,\n" 4316" ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) " 4317"As skewx,\n" 4318" ST_SkewY(rast) As skewy\n" 4319" FROM (SELECT ST_SetSkew(rast,0.5,0.5) As rast\n" 4320" FROM dummy_rast) As skewed;\n" 4321" \n" 4322" rastwidth | pixwidth | scalex | scaley | skewx | skewy\n" 4323" -----------+-------------------+--------+--------+-------" 4324"+----------\n" 4325" 10 | 2.06155281280883 | 2 | 3 | 0.5 | 0.5\n" 4326" 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5" 4327 4328#. Tag: refname 4329#: reference_raster.xml:2204 4330#, no-c-format 4331msgid "ST_ScaleX" 4332msgstr "ST_ScaleX" 4333 4334#. Tag: refpurpose 4335#: reference_raster.xml:2205 4336#, no-c-format 4337msgid "" 4338"Returns the X component of the pixel width in units of coordinate reference " 4339"system." 4340msgstr "" 4341 4342#. Tag: funcprototype 4343#: reference_raster.xml:2210 4344#, no-c-format 4345msgid "" 4346"<funcdef>float8 <function>ST_ScaleX</function></funcdef> " 4347"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4348msgstr "" 4349"<funcdef>float8 <function>ST_ScaleX</function></funcdef> " 4350"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4351 4352#. Tag: para 4353#: reference_raster.xml:2220 4354#, no-c-format 4355msgid "" 4356"Returns the X component of the pixel width in units of coordinate reference " 4357"system. Refer to <ulink url=\"http://en.wikipedia.org/wiki/World_file" 4358"\">World File</ulink> for more details." 4359msgstr "" 4360 4361#. Tag: para 4362#: reference_raster.xml:2222 4363#, no-c-format 4364msgid "Changed: 2.0.0. In WKTRaster versions this was called ST_PixelSizeX." 4365msgstr "" 4366 4367#. Tag: programlisting 4368#: reference_raster.xml:2228 4369#, no-c-format 4370msgid "" 4371"SELECT rid, ST_ScaleX(rast) As rastpixwidth\n" 4372"FROM dummy_rast;\n" 4373"\n" 4374" rid | rastpixwidth\n" 4375"-----+--------------\n" 4376" 1 | 2\n" 4377" 2 | 0.05" 4378msgstr "" 4379"SELECT rid, ST_ScaleX(rast) As rastpixwidth\n" 4380"FROM dummy_rast;\n" 4381"\n" 4382" rid | rastpixwidth\n" 4383"-----+--------------\n" 4384" 1 | 2\n" 4385" 2 | 0.05" 4386 4387#. Tag: refname 4388#: reference_raster.xml:2241 4389#, no-c-format 4390msgid "ST_ScaleY" 4391msgstr "ST_ScaleY" 4392 4393#. Tag: refpurpose 4394#: reference_raster.xml:2242 4395#, no-c-format 4396msgid "" 4397"Returns the Y component of the pixel height in units of coordinate reference " 4398"system." 4399msgstr "" 4400 4401#. Tag: funcprototype 4402#: reference_raster.xml:2247 4403#, no-c-format 4404msgid "" 4405"<funcdef>float8 <function>ST_ScaleY</function></funcdef> " 4406"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4407msgstr "" 4408"<funcdef>float8 <function>ST_ScaleY</function></funcdef> " 4409"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4410 4411#. Tag: para 4412#: reference_raster.xml:2257 4413#, no-c-format 4414msgid "" 4415"Returns the Y component of the pixel height in units of coordinate reference " 4416"system. May be negative. Refer to <ulink url=\"http://en.wikipedia.org/wiki/" 4417"World_file\">World File</ulink> for more details." 4418msgstr "" 4419 4420#. Tag: para 4421#: reference_raster.xml:2260 4422#, no-c-format 4423msgid "Changed: 2.0.0. In WKTRaster versions this was called ST_PixelSizeY." 4424msgstr "" 4425 4426#. Tag: programlisting 4427#: reference_raster.xml:2266 4428#, no-c-format 4429msgid "" 4430"SELECT rid, ST_ScaleY(rast) As rastpixheight\n" 4431"FROM dummy_rast;\n" 4432"\n" 4433" rid | rastpixheight\n" 4434"-----+---------------\n" 4435" 1 | 3\n" 4436" 2 | -0.05" 4437msgstr "" 4438"SELECT rid, ST_ScaleY(rast) As rastpixheight\n" 4439"FROM dummy_rast;\n" 4440"\n" 4441" rid | rastpixheight\n" 4442"-----+---------------\n" 4443" 1 | 3\n" 4444" 2 | -0.05" 4445 4446#. Tag: refname 4447#: reference_raster.xml:2279 4448#, no-c-format 4449msgid "ST_RasterToWorldCoord" 4450msgstr "" 4451 4452#. Tag: refpurpose 4453#: reference_raster.xml:2280 4454#, no-c-format 4455msgid "" 4456"Returns the raster's upper left corner as geometric X and Y (longitude and " 4457"latitude) given a column and row. Column and row starts at 1." 4458msgstr "" 4459 4460#. Tag: funcprototype 4461#: reference_raster.xml:2285 4462#, no-c-format 4463msgid "" 4464"<funcdef>record <function>ST_RasterToWorldCoord</function></funcdef> " 4465"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 4466"<paramdef><type>integer </type> <parameter>xcolumn</parameter></paramdef> " 4467"<paramdef><type>integer </type> <parameter>yrow</parameter></paramdef>" 4468msgstr "" 4469 4470#. Tag: para 4471#: reference_raster.xml:2297 4472#, no-c-format 4473msgid "" 4474"Returns the upper left corner as geometric X and Y (longitude and latitude) " 4475"given a column and row. Returned X and Y are in geometric units of the " 4476"georeferenced raster. Numbering of column and row starts at 1 but if either " 4477"parameter is passed a zero, a negative number or a number greater than the " 4478"respective dimension of the raster, it will return coordinates outside of " 4479"the raster assuming the raster's grid is applicable outside the raster's " 4480"bounds." 4481msgstr "" 4482 4483#. Tag: programlisting 4484#: reference_raster.xml:2309 4485#, no-c-format 4486msgid "" 4487"-- non-skewed raster\n" 4488"SELECT\n" 4489" rid,\n" 4490" (ST_RasterToWorldCoord(rast,1, 1)).*,\n" 4491" (ST_RasterToWorldCoord(rast,2, 2)).*\n" 4492"FROM dummy_rast\n" 4493"\n" 4494" rid | longitude | latitude | longitude | latitude\n" 4495"-----+------------+----------+-----------+------------\n" 4496" 1 | 0.5 | 0.5 | 2.5 | 3.5\n" 4497" 2 | 3427927.75 | 5793244 | 3427927.8 | 5793243.95" 4498msgstr "" 4499 4500#. Tag: programlisting 4501#: reference_raster.xml:2311 4502#, no-c-format 4503msgid "" 4504"-- skewed raster\n" 4505"SELECT\n" 4506" rid,\n" 4507" (ST_RasterToWorldCoord(rast, 1, 1)).*,\n" 4508" (ST_RasterToWorldCoord(rast, 2, 3)).*\n" 4509"FROM (\n" 4510" SELECT\n" 4511" rid,\n" 4512" ST_SetSkew(rast, 100.5, 0) As rast\n" 4513" FROM dummy_rast\n" 4514") As foo\n" 4515"\n" 4516" rid | longitude | latitude | longitude | latitude\n" 4517"-----+------------+----------+-----------+-----------\n" 4518" 1 | 0.5 | 0.5 | 203.5 | 6.5\n" 4519" 2 | 3427927.75 | 5793244 | 3428128.8 | 5793243.9" 4520msgstr "" 4521 4522#. Tag: para 4523#: reference_raster.xml:2318 4524#, no-c-format 4525msgid "" 4526", <xref linkend=\"RT_ST_RasterToWorldCoordY\"/>, <xref linkend=" 4527"\"RT_ST_SetSkew\"/>" 4528msgstr "" 4529 4530#. Tag: refname 4531#: reference_raster.xml:2328 4532#, no-c-format 4533msgid "ST_RasterToWorldCoordX" 4534msgstr "" 4535 4536#. Tag: refpurpose 4537#: reference_raster.xml:2329 4538#, no-c-format 4539msgid "" 4540"Returns the geometric X coordinate upper left of a raster, column and row. " 4541"Numbering of columns and rows starts at 1." 4542msgstr "" 4543 4544#. Tag: funcsynopsis 4545#: reference_raster.xml:2334 4546#, no-c-format 4547msgid "" 4548"<funcprototype> <funcdef>float8 <function>ST_RasterToWorldCoordX</function></" 4549"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 4550"paramdef> <paramdef><type>integer </type> <parameter>xcolumn</parameter></" 4551"paramdef> </funcprototype> <funcprototype> <funcdef>float8 " 4552"<function>ST_RasterToWorldCoordX</function></funcdef> <paramdef><type>raster " 4553"</type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </" 4554"type> <parameter>xcolumn</parameter></paramdef> <paramdef><type>integer </" 4555"type> <parameter>yrow</parameter></paramdef> </funcprototype>" 4556msgstr "" 4557 4558#. Tag: para 4559#: reference_raster.xml:2352 4560#, no-c-format 4561msgid "" 4562"Returns the upper left X coordinate of a raster column row in geometric " 4563"units of the georeferenced raster. Numbering of columns and rows starts at 1 " 4564"but if you pass in a negative number or number higher than number of columns " 4565"in raster, it will give you coordinates outside of the raster file to left " 4566"or right with the assumption that the skew and pixel sizes are same as " 4567"selected raster." 4568msgstr "" 4569 4570#. Tag: para 4571#: reference_raster.xml:2357 4572#, no-c-format 4573msgid "" 4574"For non-skewed rasters, providing the X column is sufficient. For skewed " 4575"rasters, the georeferenced coordinate is a function of the ST_ScaleX and " 4576"ST_SkewX and row and column. An error will be raised if you give just the X " 4577"column for a skewed raster." 4578msgstr "" 4579 4580#. Tag: para 4581#: reference_raster.xml:2361 4582#, no-c-format 4583msgid "Changed: 2.1.0 In prior versions, this was called ST_Raster2WorldCoordX" 4584msgstr "" 4585 4586#. Tag: programlisting 4587#: reference_raster.xml:2368 4588#, no-c-format 4589msgid "" 4590"-- non-skewed raster providing column is sufficient\n" 4591"SELECT rid, ST_RasterToWorldCoordX(rast,1) As x1coord,\n" 4592" ST_RasterToWorldCoordX(rast,2) As x2coord,\n" 4593" ST_ScaleX(rast) As pixelx\n" 4594"FROM dummy_rast;\n" 4595"\n" 4596" rid | x1coord | x2coord | pixelx\n" 4597"-----+------------+-----------+--------\n" 4598" 1 | 0.5 | 2.5 | 2\n" 4599" 2 | 3427927.75 | 3427927.8 | 0.05" 4600msgstr "" 4601 4602#. Tag: programlisting 4603#: reference_raster.xml:2370 4604#, no-c-format 4605msgid "" 4606"-- for fun lets skew it\n" 4607"SELECT rid, ST_RasterToWorldCoordX(rast, 1, 1) As x1coord,\n" 4608" ST_RasterToWorldCoordX(rast, 2, 3) As x2coord,\n" 4609" ST_ScaleX(rast) As pixelx\n" 4610"FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As " 4611"foo;\n" 4612"\n" 4613" rid | x1coord | x2coord | pixelx\n" 4614"-----+------------+-----------+--------\n" 4615" 1 | 0.5 | 203.5 | 2\n" 4616" 2 | 3427927.75 | 3428128.8 | 0.05" 4617msgstr "" 4618 4619#. Tag: para 4620#: reference_raster.xml:2377 4621#, no-c-format 4622msgid "" 4623", <xref linkend=\"RT_ST_RasterToWorldCoordY\"/>, <xref linkend=" 4624"\"RT_ST_SetSkew\"/>, <xref linkend=\"RT_ST_SkewX\"/>" 4625msgstr "" 4626 4627#. Tag: refname 4628#: reference_raster.xml:2383 4629#, no-c-format 4630msgid "ST_RasterToWorldCoordY" 4631msgstr "" 4632 4633#. Tag: refpurpose 4634#: reference_raster.xml:2384 4635#, no-c-format 4636msgid "" 4637"Returns the geometric Y coordinate upper left corner of a raster, column and " 4638"row. Numbering of columns and rows starts at 1." 4639msgstr "" 4640 4641#. Tag: funcsynopsis 4642#: reference_raster.xml:2389 4643#, no-c-format 4644msgid "" 4645"<funcprototype> <funcdef>float8 <function>ST_RasterToWorldCoordY</function></" 4646"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 4647"paramdef> <paramdef><type>integer </type> <parameter>yrow</parameter></" 4648"paramdef> </funcprototype> <funcprototype> <funcdef>float8 " 4649"<function>ST_RasterToWorldCoordY</function></funcdef> <paramdef><type>raster " 4650"</type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </" 4651"type> <parameter>xcolumn</parameter></paramdef> <paramdef><type>integer </" 4652"type> <parameter>yrow</parameter></paramdef> </funcprototype>" 4653msgstr "" 4654 4655#. Tag: para 4656#: reference_raster.xml:2407 4657#, no-c-format 4658msgid "" 4659"Returns the upper left Y coordinate of a raster column row in geometric " 4660"units of the georeferenced raster. Numbering of columns and rows starts at 1 " 4661"but if you pass in a negative number or number higher than number of columns/" 4662"rows in raster, it will give you coordinates outside of the raster file to " 4663"left or right with the assumption that the skew and pixel sizes are same as " 4664"selected raster tile." 4665msgstr "" 4666 4667#. Tag: para 4668#: reference_raster.xml:2412 4669#, no-c-format 4670msgid "" 4671"For non-skewed rasters, providing the Y column is sufficient. For skewed " 4672"rasters, the georeferenced coordinate is a function of the ST_ScaleY and " 4673"ST_SkewY and row and column. An error will be raised if you give just the Y " 4674"row for a skewed raster." 4675msgstr "" 4676 4677#. Tag: para 4678#: reference_raster.xml:2416 4679#, no-c-format 4680msgid "Changed: 2.1.0 In prior versions, this was called ST_Raster2WorldCoordY" 4681msgstr "" 4682 4683#. Tag: programlisting 4684#: reference_raster.xml:2422 4685#, no-c-format 4686msgid "" 4687"-- non-skewed raster providing row is sufficient\n" 4688"SELECT rid, ST_RasterToWorldCoordY(rast,1) As y1coord,\n" 4689" ST_RasterToWorldCoordY(rast,3) As y2coord,\n" 4690" ST_ScaleY(rast) As pixely\n" 4691"FROM dummy_rast;\n" 4692"\n" 4693" rid | y1coord | y2coord | pixely\n" 4694"-----+---------+-----------+--------\n" 4695" 1 | 0.5 | 6.5 | 3\n" 4696" 2 | 5793244 | 5793243.9 | -0.05" 4697msgstr "" 4698 4699#. Tag: programlisting 4700#: reference_raster.xml:2424 4701#, no-c-format 4702msgid "" 4703"-- for fun lets skew it\n" 4704"SELECT rid, ST_RasterToWorldCoordY(rast,1,1) As y1coord,\n" 4705" ST_RasterToWorldCoordY(rast,2,3) As y2coord,\n" 4706" ST_ScaleY(rast) As pixely\n" 4707"FROM (SELECT rid, ST_SetSkew(rast,0,100.5) As rast FROM dummy_rast) As foo;\n" 4708"\n" 4709" rid | y1coord | y2coord | pixely\n" 4710"-----+---------+-----------+--------\n" 4711" 1 | 0.5 | 107 | 3\n" 4712" 2 | 5793244 | 5793344.4 | -0.05" 4713msgstr "" 4714 4715#. Tag: para 4716#: reference_raster.xml:2431 4717#, no-c-format 4718msgid "" 4719", <xref linkend=\"RT_ST_RasterToWorldCoordX\"/>, <xref linkend=" 4720"\"RT_ST_SetSkew\"/>, <xref linkend=\"RT_ST_SkewY\"/>" 4721msgstr "" 4722 4723#. Tag: refname 4724#: reference_raster.xml:2437 4725#, no-c-format 4726msgid "ST_Rotation" 4727msgstr "ST_Rotation" 4728 4729#. Tag: refpurpose 4730#: reference_raster.xml:2438 4731#, no-c-format 4732msgid "Returns the rotation of the raster in radian." 4733msgstr "" 4734 4735#. Tag: funcprototype 4736#: reference_raster.xml:2443 4737#, no-c-format 4738msgid "" 4739"<funcdef>float8 <function>ST_Rotation</function></funcdef> " 4740"<paramdef><type>raster</type> <parameter>rast</parameter></paramdef>" 4741msgstr "" 4742"<funcdef>float8 <function>ST_Rotation</function></funcdef> " 4743"<paramdef><type>raster</type> <parameter>rast</parameter></paramdef>" 4744 4745#. Tag: para 4746#: reference_raster.xml:2453 4747#, no-c-format 4748msgid "" 4749"Returns the uniform rotation of the raster in radian. If a raster does not " 4750"have uniform rotation, NaN is returned. Refer to <ulink url=\"http://en." 4751"wikipedia.org/wiki/World_file\">World File</ulink> for more details." 4752msgstr "" 4753 4754#. Tag: programlisting 4755#: reference_raster.xml:2460 4756#, fuzzy, no-c-format 4757msgid "" 4758"SELECT rid, ST_Rotation(ST_SetScale(ST_SetSkew(rast, sqrt(2)), sqrt(2))) as " 4759"rot FROM dummy_rast;\n" 4760"\n" 4761" rid | rot\n" 4762"-----+-------------------\n" 4763" 1 | 0.785398163397448\n" 4764" 2 | 0.785398163397448" 4765msgstr "" 4766"SELECT rid, ST_Rotation(ST_SetScale(ST_SetSkew(rast, sqrt(2)), sqrt(2))) as " 4767"rot FROM dummy_rast;\n" 4768"\n" 4769" rid | rot \n" 4770"-----+-------------------\n" 4771" 1 | 0.785398163397448\n" 4772" 2 | 0.785398163397448" 4773 4774#. Tag: para 4775#: reference_raster.xml:2466 4776#, no-c-format 4777msgid ", <xref linkend=\"RT_ST_SetScale\"/>, <xref linkend=\"RT_ST_SetSkew\"/>" 4778msgstr "" 4779", <xref linkend=\"RT_ST_SetScale\"/>, <xref linkend=\"RT_ST_SetSkew\"/>" 4780 4781#. Tag: refname 4782#: reference_raster.xml:2472 4783#, no-c-format 4784msgid "ST_SkewX" 4785msgstr "ST_SkewX" 4786 4787#. Tag: refpurpose 4788#: reference_raster.xml:2473 4789#, no-c-format 4790msgid "Returns the georeference X skew (or rotation parameter)." 4791msgstr "" 4792 4793#. Tag: funcprototype 4794#: reference_raster.xml:2478 4795#, no-c-format 4796msgid "" 4797"<funcdef>float8 <function>ST_SkewX</function></funcdef> " 4798"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4799msgstr "" 4800"<funcdef>float8 <function>ST_SkewX</function></funcdef> " 4801"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4802 4803#. Tag: para 4804#: reference_raster.xml:2488 4805#, no-c-format 4806msgid "" 4807"Returns the georeference X skew (or rotation parameter). Refer to <ulink url=" 4808"\"http://en.wikipedia.org/wiki/World_file\">World File</ulink> for more " 4809"details." 4810msgstr "" 4811 4812#. Tag: programlisting 4813#: reference_raster.xml:2495 reference_raster.xml:2531 4814#, fuzzy, no-c-format 4815msgid "" 4816"SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy,\n" 4817" ST_GeoReference(rast) as georef\n" 4818"FROM dummy_rast;\n" 4819"\n" 4820" rid | skewx | skewy | georef\n" 4821"-----+-------+-------+--------------------\n" 4822" 1 | 0 | 0 | 2.0000000000\n" 4823" : 0.0000000000\n" 4824" : 0.0000000000\n" 4825" : 3.0000000000\n" 4826" : 0.5000000000\n" 4827" : 0.5000000000\n" 4828" :\n" 4829" 2 | 0 | 0 | 0.0500000000\n" 4830" : 0.0000000000\n" 4831" : 0.0000000000\n" 4832" : -0.0500000000\n" 4833" : 3427927.7500000000\n" 4834" : 5793244.0000000000" 4835msgstr "" 4836"SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, \n" 4837" ST_GeoReference(rast) as georef\n" 4838"FROM dummy_rast;\n" 4839"\n" 4840" rid | skewx | skewy | georef\n" 4841"-----+-------+-------+--------------------\n" 4842" 1 | 0 | 0 | 2.0000000000\n" 4843" : 0.0000000000\n" 4844" : 0.0000000000\n" 4845" : 3.0000000000\n" 4846" : 0.5000000000\n" 4847" : 0.5000000000\n" 4848" :\n" 4849" 2 | 0 | 0 | 0.0500000000\n" 4850" : 0.0000000000\n" 4851" : 0.0000000000\n" 4852" : -0.0500000000\n" 4853" : 3427927.7500000000\n" 4854" : 5793244.0000000000" 4855 4856#. Tag: para 4857#: reference_raster.xml:2502 4858#, no-c-format 4859msgid ", <xref linkend=\"RT_ST_SkewY\"/>, <xref linkend=\"RT_ST_SetSkew\"/>" 4860msgstr ", <xref linkend=\"RT_ST_SkewY\"/>, <xref linkend=\"RT_ST_SetSkew\"/>" 4861 4862#. Tag: refname 4863#: reference_raster.xml:2508 4864#, no-c-format 4865msgid "ST_SkewY" 4866msgstr "ST_SkewY" 4867 4868#. Tag: refpurpose 4869#: reference_raster.xml:2509 4870#, no-c-format 4871msgid "Returns the georeference Y skew (or rotation parameter)." 4872msgstr "" 4873 4874#. Tag: funcprototype 4875#: reference_raster.xml:2514 4876#, no-c-format 4877msgid "" 4878"<funcdef>float8 <function>ST_SkewY</function></funcdef> " 4879"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4880msgstr "" 4881"<funcdef>float8 <function>ST_SkewY</function></funcdef> " 4882"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4883 4884#. Tag: para 4885#: reference_raster.xml:2524 4886#, no-c-format 4887msgid "" 4888"Returns the georeference Y skew (or rotation parameter). Refer to <ulink url=" 4889"\"http://en.wikipedia.org/wiki/World_file\">World File</ulink> for more " 4890"details." 4891msgstr "" 4892 4893#. Tag: para 4894#: reference_raster.xml:2538 4895#, no-c-format 4896msgid ", <xref linkend=\"RT_ST_SkewX\"/>, <xref linkend=\"RT_ST_SetSkew\"/>" 4897msgstr "" 4898 4899#. Tag: refname 4900#: reference_raster.xml:2544 4901#, no-c-format 4902msgid "ST_SRID" 4903msgstr "ST_SRID" 4904 4905#. Tag: refpurpose 4906#: reference_raster.xml:2545 4907#, no-c-format 4908msgid "" 4909"Returns the spatial reference identifier of the raster as defined in " 4910"spatial_ref_sys table." 4911msgstr "" 4912 4913#. Tag: funcprototype 4914#: reference_raster.xml:2550 4915#, no-c-format 4916msgid "" 4917"<funcdef>integer <function>ST_SRID</function></funcdef> " 4918"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4919msgstr "" 4920"<funcdef>integer <function>ST_SRID</function></funcdef> " 4921"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4922 4923#. Tag: para 4924#: reference_raster.xml:2560 4925#, no-c-format 4926msgid "" 4927"Returns the spatial reference identifier of the raster object as defined in " 4928"the spatial_ref_sys table." 4929msgstr "" 4930 4931#. Tag: para 4932#: reference_raster.xml:2561 4933#, no-c-format 4934msgid "" 4935"From PostGIS 2.0+ the srid of a non-georeferenced raster/geometry is 0 " 4936"instead of the prior -1." 4937msgstr "" 4938 4939#. Tag: programlisting 4940#: reference_raster.xml:2567 4941#, no-c-format 4942msgid "" 4943"SELECT ST_SRID(rast) As srid\n" 4944"FROM dummy_rast WHERE rid=1;\n" 4945"\n" 4946"srid\n" 4947"----------------\n" 4948"0" 4949msgstr "" 4950"SELECT ST_SRID(rast) As srid\n" 4951"FROM dummy_rast WHERE rid=1;\n" 4952"\n" 4953"srid\n" 4954"----------------\n" 4955"0" 4956 4957#. Tag: para 4958#: reference_raster.xml:2573 4959#, no-c-format 4960msgid ", <xref linkend=\"ST_SRID\"/>" 4961msgstr ", <xref linkend=\"ST_SRID\"/>" 4962 4963#. Tag: refname 4964#: reference_raster.xml:2579 4965#, no-c-format 4966msgid "ST_Summary" 4967msgstr "" 4968 4969#. Tag: refpurpose 4970#: reference_raster.xml:2580 4971#, no-c-format 4972msgid "" 4973"<refpurpose>Returns a text summary of the contents of the raster.</" 4974"refpurpose>" 4975msgstr "" 4976 4977#. Tag: funcprototype 4978#: reference_raster.xml:2585 4979#, no-c-format 4980msgid "" 4981"<funcdef>text <function>ST_Summary</function></funcdef> " 4982"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 4983msgstr "" 4984 4985#. Tag: para 4986#: reference_raster.xml:2595 4987#, no-c-format 4988msgid "<para>Returns a text summary of the contents of the raster.</para>" 4989msgstr "" 4990 4991#. Tag: programlisting 4992#: reference_raster.xml:2602 4993#, no-c-format 4994msgid "" 4995"SELECT ST_Summary(\n" 4996" ST_AddBand(\n" 4997" ST_AddBand(\n" 4998" ST_AddBand(\n" 4999" ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0, " 5000"0, 0)\n" 5001" , 1, '8BUI', 1, 0\n" 5002" )\n" 5003" , 2, '32BF', 0, -9999\n" 5004" )\n" 5005" , 3, '16BSI', 0, NULL\n" 5006" )\n" 5007");\n" 5008"\n" 5009" st_summary\n" 5010"------------------------------------------------------------------\n" 5011" Raster of 10x10 pixels has 3 bands and extent of BOX(0 -10,10 0)+\n" 5012" band 1 of pixtype 8BUI is in-db with NODATA value of 0 +\n" 5013" band 2 of pixtype 32BF is in-db with NODATA value of -9999 +\n" 5014" band 3 of pixtype 16BSI is in-db with no NODATA value\n" 5015"(1 row)" 5016msgstr "" 5017 5018#. Tag: para 5019#: reference_raster.xml:2607 5020#, no-c-format 5021msgid "" 5022", <xref linkend=\"RT_ST_BandMetaData\"/>, <xref linkend=\"ST_Summary\"/> " 5023"<xref linkend=\"ST_Extent\"/>" 5024msgstr "" 5025 5026#. Tag: refname 5027#: reference_raster.xml:2618 5028#, no-c-format 5029msgid "ST_UpperLeftX" 5030msgstr "ST_UpperLeftX" 5031 5032#. Tag: refpurpose 5033#: reference_raster.xml:2619 5034#, no-c-format 5035msgid "" 5036"<refpurpose>Returns the upper left X coordinate of raster in projected " 5037"spatial ref.</refpurpose>" 5038msgstr "" 5039 5040#. Tag: funcprototype 5041#: reference_raster.xml:2624 5042#, no-c-format 5043msgid "" 5044"<funcdef>float8 <function>ST_UpperLeftX</function></funcdef> " 5045"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 5046msgstr "" 5047"<funcdef>float8 <function>ST_UpperLeftX</function></funcdef> " 5048"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 5049 5050#. Tag: para 5051#: reference_raster.xml:2634 5052#, no-c-format 5053msgid "" 5054"<para>Returns the upper left X coordinate of raster in projected spatial ref." 5055"</para>" 5056msgstr "" 5057 5058#. Tag: programlisting 5059#: reference_raster.xml:2640 5060#, no-c-format 5061msgid "" 5062"SELECt rid, ST_UpperLeftX(rast) As ulx\n" 5063"FROM dummy_rast;\n" 5064"\n" 5065" rid | ulx\n" 5066"-----+------------\n" 5067" 1 | 0.5\n" 5068" 2 | 3427927.75" 5069msgstr "" 5070"SELECt rid, ST_UpperLeftX(rast) As ulx\n" 5071"FROM dummy_rast;\n" 5072"\n" 5073" rid | ulx\n" 5074"-----+------------\n" 5075" 1 | 0.5\n" 5076" 2 | 3427927.75" 5077 5078#. Tag: para 5079#: reference_raster.xml:2646 reference_raster.xml:2680 5080#, no-c-format 5081msgid ", <xref linkend=\"RT_ST_GeoReference\"/>, <xref linkend=\"RT_Box3D\"/>" 5082msgstr ", <xref linkend=\"RT_ST_GeoReference\"/>, <xref linkend=\"RT_Box3D\"/>" 5083 5084#. Tag: refname 5085#: reference_raster.xml:2652 5086#, no-c-format 5087msgid "ST_UpperLeftY" 5088msgstr "ST_UpperLeftY" 5089 5090#. Tag: refpurpose 5091#: reference_raster.xml:2653 5092#, no-c-format 5093msgid "" 5094"<refpurpose>Returns the upper left Y coordinate of raster in projected " 5095"spatial ref.</refpurpose>" 5096msgstr "" 5097 5098#. Tag: funcprototype 5099#: reference_raster.xml:2658 5100#, no-c-format 5101msgid "" 5102"<funcdef>float8 <function>ST_UpperLeftY</function></funcdef> " 5103"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 5104msgstr "" 5105"<funcdef>float8 <function>ST_UpperLeftY</function></funcdef> " 5106"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 5107 5108#. Tag: para 5109#: reference_raster.xml:2668 5110#, no-c-format 5111msgid "" 5112"<para>Returns the upper left Y coordinate of raster in projected spatial ref." 5113"</para>" 5114msgstr "" 5115 5116#. Tag: programlisting 5117#: reference_raster.xml:2674 5118#, no-c-format 5119msgid "" 5120"SELECT rid, ST_UpperLeftY(rast) As uly\n" 5121"FROM dummy_rast;\n" 5122"\n" 5123" rid | uly\n" 5124"-----+---------\n" 5125" 1 | 0.5\n" 5126" 2 | 5793244" 5127msgstr "" 5128"SELECT rid, ST_UpperLeftY(rast) As uly\n" 5129"FROM dummy_rast;\n" 5130"\n" 5131" rid | uly\n" 5132"-----+---------\n" 5133" 1 | 0.5\n" 5134" 2 | 5793244" 5135 5136#. Tag: refname 5137#: reference_raster.xml:2686 5138#, no-c-format 5139msgid "ST_Width" 5140msgstr "ST_Width" 5141 5142#. Tag: refpurpose 5143#: reference_raster.xml:2687 5144#, no-c-format 5145msgid "<refpurpose>Returns the width of the raster in pixels.</refpurpose>" 5146msgstr "" 5147 5148#. Tag: funcprototype 5149#: reference_raster.xml:2692 5150#, no-c-format 5151msgid "" 5152"<funcdef>integer <function>ST_Width</function></funcdef> " 5153"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 5154msgstr "" 5155 5156#. Tag: para 5157#: reference_raster.xml:2702 5158#, no-c-format 5159msgid "<para>Returns the width of the raster in pixels.</para>" 5160msgstr "" 5161 5162#. Tag: programlisting 5163#: reference_raster.xml:2708 5164#, no-c-format 5165msgid "" 5166"SELECT ST_Width(rast) As rastwidth\n" 5167"FROM dummy_rast WHERE rid=1;\n" 5168"\n" 5169"rastwidth\n" 5170"----------------\n" 5171"10" 5172msgstr "" 5173"SELECT ST_Width(rast) As rastwidth\n" 5174"FROM dummy_rast WHERE rid=1;\n" 5175"\n" 5176"rastwidth\n" 5177"----------------\n" 5178"10" 5179 5180#. Tag: refname 5181#: reference_raster.xml:2722 5182#, no-c-format 5183msgid "ST_WorldToRasterCoord" 5184msgstr "" 5185 5186#. Tag: refpurpose 5187#: reference_raster.xml:2723 5188#, no-c-format 5189msgid "" 5190"Returns the upper left corner as column and row given geometric X and Y " 5191"(longitude and latitude) or a point geometry expressed in the spatial " 5192"reference coordinate system of the raster." 5193msgstr "" 5194 5195#. Tag: funcsynopsis 5196#: reference_raster.xml:2727 5197#, no-c-format 5198msgid "" 5199"<funcprototype> <funcdef>record <function>ST_WorldToRasterCoord</function></" 5200"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 5201"paramdef> <paramdef><type>geometry </type> <parameter>pt</parameter></" 5202"paramdef> </funcprototype> <funcprototype> <funcdef>record " 5203"<function>ST_WorldToRasterCoord</function></funcdef> <paramdef><type>raster " 5204"</type> <parameter>rast</parameter></paramdef> <paramdef><type>double " 5205"precision </type> <parameter>longitude</parameter></paramdef> " 5206"<paramdef><type>double precision </type> <parameter>latitude</parameter></" 5207"paramdef> </funcprototype>" 5208msgstr "" 5209 5210#. Tag: para 5211#: reference_raster.xml:2746 5212#, no-c-format 5213msgid "" 5214"Returns the upper left corner as column and row given geometric X and Y " 5215"(longitude and latitude) or a point geometry. This function works regardless " 5216"of whether or not the geometric X and Y or point geometry is outside the " 5217"extent of the raster. Geometric X and Y must be expressed in the spatial " 5218"reference coordinate system of the raster." 5219msgstr "" 5220 5221#. Tag: programlisting 5222#: reference_raster.xml:2759 5223#, no-c-format 5224msgid "" 5225"SELECT\n" 5226" rid,\n" 5227" (ST_WorldToRasterCoord(rast,3427927.8,20.5)).*,\n" 5228" (ST_WorldToRasterCoord(rast,ST_GeomFromText('POINT(3427927.8 20.5)'," 5229"ST_SRID(rast)))).*\n" 5230"FROM dummy_rast;\n" 5231"\n" 5232" rid | columnx | rowy | columnx | rowy\n" 5233"-----+---------+-----------+---------+-----------\n" 5234" 1 | 1713964 | 7 | 1713964 | 7\n" 5235" 2 | 2 | 115864471 | 2 | 115864471" 5236msgstr "" 5237 5238#. Tag: para 5239#: reference_raster.xml:2765 5240#, no-c-format 5241msgid "" 5242", <xref linkend=\"RT_ST_WorldToRasterCoordY\"/>, <xref linkend=" 5243"\"RT_ST_RasterToWorldCoordX\"/>, <xref linkend=\"RT_ST_RasterToWorldCoordY\"/" 5244">, <xref linkend=\"RT_ST_SRID\"/>" 5245msgstr "" 5246 5247#. Tag: refname 5248#: reference_raster.xml:2777 5249#, no-c-format 5250msgid "ST_WorldToRasterCoordX" 5251msgstr "" 5252 5253#. Tag: refpurpose 5254#: reference_raster.xml:2778 5255#, no-c-format 5256msgid "" 5257"Returns the column in the raster of the point geometry (pt) or a X and Y " 5258"world coordinate (xw, yw) represented in world spatial reference system of " 5259"raster." 5260msgstr "" 5261 5262#. Tag: funcsynopsis 5263#: reference_raster.xml:2783 5264#, no-c-format 5265msgid "" 5266"<funcprototype> <funcdef>integer <function>ST_WorldToRasterCoordX</" 5267"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 5268"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 5269"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>integer " 5270"<function>ST_WorldToRasterCoordX</function></funcdef> <paramdef><type>raster " 5271"</type> <parameter>rast</parameter></paramdef> <paramdef><type>double " 5272"precision </type> <parameter>xw</parameter></paramdef> </funcprototype> " 5273"<funcprototype> <funcdef>integer <function>ST_WorldToRasterCoordX</" 5274"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 5275"parameter></paramdef> <paramdef><type>double precision </type> " 5276"<parameter>xw</parameter></paramdef> <paramdef><type>double precision </" 5277"type> <parameter>yw</parameter></paramdef> </funcprototype>" 5278msgstr "" 5279 5280#. Tag: para 5281#: reference_raster.xml:2808 5282#, no-c-format 5283msgid "" 5284"Returns the column in the raster of the point geometry (pt) or a X and Y " 5285"world coordinate (xw, yw). A point, or (both xw and yw world coordinates are " 5286"required if a raster is skewed). If a raster is not skewed then xw is " 5287"sufficient. World coordinates are in the spatial reference coordinate system " 5288"of the raster." 5289msgstr "" 5290 5291#. Tag: para 5292#: reference_raster.xml:2810 5293#, no-c-format 5294msgid "Changed: 2.1.0 In prior versions, this was called ST_World2RasterCoordX" 5295msgstr "" 5296 5297#. Tag: programlisting 5298#: reference_raster.xml:2816 5299#, no-c-format 5300msgid "" 5301"SELECT rid, ST_WorldToRasterCoordX(rast,3427927.8) As xcoord,\n" 5302" ST_WorldToRasterCoordX(rast,3427927.8,20.5) As xcoord_xwyw,\n" 5303" ST_WorldToRasterCoordX(rast,ST_GeomFromText('POINT(3427927.8 " 5304"20.5)',ST_SRID(rast))) As ptxcoord\n" 5305"FROM dummy_rast;\n" 5306"\n" 5307" rid | xcoord | xcoord_xwyw | ptxcoord\n" 5308"-----+---------+---------+----------\n" 5309" 1 | 1713964 | 1713964 | 1713964\n" 5310" 2 | 1 | 1 | 1" 5311msgstr "" 5312 5313#. Tag: para 5314#: reference_raster.xml:2822 reference_raster.xml:2877 5315#, no-c-format 5316msgid "" 5317", <xref linkend=\"RT_ST_RasterToWorldCoordY\"/>, <xref linkend=\"RT_ST_SRID" 5318"\"/>" 5319msgstr "" 5320 5321#. Tag: refname 5322#: reference_raster.xml:2832 5323#, no-c-format 5324msgid "ST_WorldToRasterCoordY" 5325msgstr "" 5326 5327#. Tag: refpurpose 5328#: reference_raster.xml:2833 5329#, no-c-format 5330msgid "" 5331"Returns the row in the raster of the point geometry (pt) or a X and Y world " 5332"coordinate (xw, yw) represented in world spatial reference system of raster." 5333msgstr "" 5334 5335#. Tag: funcsynopsis 5336#: reference_raster.xml:2838 5337#, no-c-format 5338msgid "" 5339"<funcprototype> <funcdef>integer <function>ST_WorldToRasterCoordY</" 5340"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 5341"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 5342"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>integer " 5343"<function>ST_WorldToRasterCoordY</function></funcdef> <paramdef><type>raster " 5344"</type> <parameter>rast</parameter></paramdef> <paramdef><type>double " 5345"precision </type> <parameter>xw</parameter></paramdef> </funcprototype> " 5346"<funcprototype> <funcdef>integer <function>ST_WorldToRasterCoordY</" 5347"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 5348"parameter></paramdef> <paramdef><type>double precision </type> " 5349"<parameter>xw</parameter></paramdef> <paramdef><type>double precision </" 5350"type> <parameter>yw</parameter></paramdef> </funcprototype>" 5351msgstr "" 5352 5353#. Tag: para 5354#: reference_raster.xml:2863 5355#, no-c-format 5356msgid "" 5357"Returns the row in the raster of the point geometry (pt) or a X and Y world " 5358"coordinate (xw, yw). A point, or (both xw and yw world coordinates are " 5359"required if a raster is skewed). If a raster is not skewed then xw is " 5360"sufficient. World coordinates are in the spatial reference coordinate system " 5361"of the raster." 5362msgstr "" 5363 5364#. Tag: para 5365#: reference_raster.xml:2865 5366#, no-c-format 5367msgid "Changed: 2.1.0 In prior versions, this was called ST_World2RasterCoordY" 5368msgstr "" 5369 5370#. Tag: programlisting 5371#: reference_raster.xml:2871 5372#, no-c-format 5373msgid "" 5374"SELECT rid, ST_WorldToRasterCoordY(rast,20.5) As ycoord,\n" 5375" ST_WorldToRasterCoordY(rast,3427927.8,20.5) As ycoord_xwyw,\n" 5376" ST_WorldToRasterCoordY(rast,ST_GeomFromText('POINT(3427927.8 " 5377"20.5)',ST_SRID(rast))) As ptycoord\n" 5378"FROM dummy_rast;\n" 5379"\n" 5380" rid | ycoord | ycoord_xwyw | ptycoord\n" 5381"-----+-----------+-------------+-----------\n" 5382" 1 | 7 | 7 | 7\n" 5383" 2 | 115864471 | 115864471 | 115864471" 5384msgstr "" 5385 5386#. Tag: title 5387#: reference_raster.xml:2884 5388#, no-c-format 5389msgid "Raster Band Accessors" 5390msgstr "" 5391 5392#. Tag: refname 5393#: reference_raster.xml:2887 5394#, no-c-format 5395msgid "ST_BandMetaData" 5396msgstr "ST_BandMetaData" 5397 5398#. Tag: refpurpose 5399#: reference_raster.xml:2888 5400#, no-c-format 5401msgid "" 5402"Returns basic meta data for a specific raster band. band num 1 is assumed if " 5403"none-specified." 5404msgstr "" 5405 5406#. Tag: funcsynopsis 5407#: reference_raster.xml:2892 5408#, fuzzy, no-c-format 5409msgid "" 5410"<funcprototype> <funcdef>(1) record <function>ST_BandMetaData</function></" 5411"funcdef> <paramdef><type>raster </type><parameter>rast</parameter></" 5412"paramdef> <paramdef choice=\"opt\"><type>integer </type><parameter>band=1</" 5413"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>(2) record " 5414"<function>ST_BandMetaData</function></funcdef> <paramdef><type>raster </" 5415"type><parameter>rast</parameter></paramdef> <paramdef choice=\"opt" 5416"\"><type>integer[] </type><parameter>band</parameter></paramdef> </" 5417"funcprototype>" 5418msgstr "" 5419"<funcprototype> <funcdef>raster <function>ST_SetScale</function></funcdef> " 5420"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5421"<paramdef><type>float8 </type> <parameter>xy</parameter></paramdef> </" 5422"funcprototype> <funcprototype> <funcdef>raster <function>ST_SetScale</" 5423"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 5424"parameter></paramdef> <paramdef><type>float8 </type> <parameter>x</" 5425"parameter></paramdef> <paramdef><type>float8 </type> <parameter>y</" 5426"parameter></paramdef> </funcprototype>" 5427 5428#. Tag: para 5429#: reference_raster.xml:2909 5430#, no-c-format 5431msgid "" 5432"Returns basic meta data about a raster band. Columns returned: pixeltype, " 5433"nodatavalue, isoutdb, path, outdbbandnum, filesize, filetimestamp." 5434msgstr "" 5435 5436#. Tag: para 5437#: reference_raster.xml:2912 5438#, no-c-format 5439msgid "If raster contains no bands then an error is thrown." 5440msgstr "" 5441 5442#. Tag: para 5443#: reference_raster.xml:2918 5444#, no-c-format 5445msgid "If band has no NODATA value, nodatavalue are NULL." 5446msgstr "" 5447 5448#. Tag: para 5449#: reference_raster.xml:2923 5450#, no-c-format 5451msgid "" 5452"If isoutdb is False, path, outdbbandnum, filesize and filetimestamp are " 5453"NULL. If outdb access is disabled, filesize and filetimestamp will also be " 5454"NULL." 5455msgstr "" 5456 5457#. Tag: para 5458#: reference_raster.xml:2928 5459#, no-c-format 5460msgid "" 5461"Enhanced: 2.5.0 to include <emphasis>outdbbandnum</emphasis>, " 5462"<emphasis>filesize</emphasis> and <emphasis>filetimestamp</emphasis> for " 5463"outdb rasters." 5464msgstr "" 5465 5466#. Tag: title 5467#: reference_raster.xml:2932 reference_raster.xml:3991 5468#: reference_raster.xml:6878 reference_raster.xml:7303 5469#: reference_raster.xml:8909 reference_raster.xml:9352 5470#: reference_raster.xml:9449 reference_raster.xml:9577 5471#, no-c-format 5472msgid "Examples: Variant 1" 5473msgstr "" 5474 5475#. Tag: programlisting 5476#: reference_raster.xml:2934 5477#, fuzzy, no-c-format 5478msgid "" 5479"SELECT\n" 5480" rid,\n" 5481" (foo.md).*\n" 5482"FROM (\n" 5483" SELECT\n" 5484" rid,\n" 5485" ST_BandMetaData(rast, 1) AS md\n" 5486" FROM dummy_rast\n" 5487" WHERE rid=2\n" 5488") As foo;\n" 5489"\n" 5490" rid | pixeltype | nodatavalue | isoutdb | path | outdbbandnum\n" 5491"-----+-----------+---- --------+---------+------+--------------\n" 5492" 2 | 8BUI | 0 | f | |" 5493msgstr "" 5494"SELECT rid, (foo.md).* \n" 5495" FROM (SELECT rid, ST_BandMetaData(rast,1) As md\n" 5496"FROM dummy_rast WHERE rid=2) As foo;\n" 5497"\n" 5498" rid | pixeltype | nodatavalue | isoutdb | path\n" 5499"-----+-----------+----------------+-------------+---------+------\n" 5500" 2 | 8BUI | 0 | f |" 5501 5502#. Tag: title 5503#: reference_raster.xml:2939 reference_raster.xml:4004 5504#: reference_raster.xml:6922 reference_raster.xml:8916 5505#: reference_raster.xml:9357 reference_raster.xml:9454 5506#: reference_raster.xml:9582 5507#, no-c-format 5508msgid "Examples: Variant 2" 5509msgstr "" 5510 5511#. Tag: programlisting 5512#: reference_raster.xml:2941 5513#, no-c-format 5514msgid "" 5515"WITH foo AS (\n" 5516" SELECT\n" 5517" ST_AddBand(NULL::raster, '/home/pele/devel/geo/postgis-git/" 5518"raster/test/regress/loader/Projected.tif', NULL::int[]) AS rast\n" 5519")\n" 5520"SELECT\n" 5521" *\n" 5522"FROM ST_BandMetadata(\n" 5523" (SELECT rast FROM foo),\n" 5524" ARRAY[1,3,2]::int[]\n" 5525");\n" 5526"\n" 5527" bandnum | pixeltype | nodatavalue | isoutdb " 5528"| " 5529"path | outdbbandnum | filesize | " 5530"filetimestamp |\n" 5531"---------+-----------+-------------+---------" 5532"+--------------------------------------------------------------------------------" 5533"+---------------+----------+---------------+-\n" 5534" 1 | 8BUI | | t | /home/pele/devel/geo/postgis-" 5535"git/raster/test/regress/loader/Projected.tif | 1 | 12345 " 5536"| 1521807257 |\n" 5537" 3 | 8BUI | | t | /home/pele/devel/geo/postgis-" 5538"git/raster/test/regress/loader/Projected.tif | 3 | 12345 " 5539"| 1521807257 |\n" 5540" 2 | 8BUI | | t | /home/pele/devel/geo/postgis-" 5541"git/raster/test/regress/loader/Projected.tif | 2 | 12345 " 5542"| 1521807257 |" 5543msgstr "" 5544 5545#. Tag: para 5546#: reference_raster.xml:2948 5547#, no-c-format 5548msgid ", <xref linkend=\"RT_ST_BandPixelType\"/>" 5549msgstr ", <xref linkend=\"RT_ST_BandPixelType\"/>" 5550 5551#. Tag: refname 5552#: reference_raster.xml:2954 5553#, no-c-format 5554msgid "ST_BandNoDataValue" 5555msgstr "ST_BandNoDataValue" 5556 5557#. Tag: refpurpose 5558#: reference_raster.xml:2955 5559#, no-c-format 5560msgid "" 5561"Returns the value in a given band that represents no data. If no band num 1 " 5562"is assumed." 5563msgstr "" 5564 5565#. Tag: funcprototype 5566#: reference_raster.xml:2960 5567#, no-c-format 5568msgid "" 5569"<funcdef>double precision <function>ST_BandNoDataValue</function></funcdef> " 5570"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5571"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5572"parameter></paramdef>" 5573msgstr "" 5574"<funcdef>double precision <function>ST_BandNoDataValue</function></funcdef> " 5575"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5576"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5577"parameter></paramdef>" 5578 5579#. Tag: para 5580#: reference_raster.xml:2971 5581#, no-c-format 5582msgid "Returns the value that represents no data for the band" 5583msgstr "" 5584 5585#. Tag: programlisting 5586#: reference_raster.xml:2977 5587#, fuzzy, no-c-format 5588msgid "" 5589"SELECT ST_BandNoDataValue(rast,1) As bnval1,\n" 5590" ST_BandNoDataValue(rast,2) As bnval2, ST_BandNoDataValue(rast,3) As " 5591"bnval3\n" 5592"FROM dummy_rast\n" 5593"WHERE rid = 2;\n" 5594"\n" 5595" bnval1 | bnval2 | bnval3\n" 5596"--------+--------+--------\n" 5597" 0 | 0 | 0" 5598msgstr "" 5599"SELECT ST_BandNoDataValue(rast,1) As bnval1, \n" 5600" ST_BandNoDataValue(rast,2) As bnval2, ST_BandNoDataValue(rast,3) As " 5601"bnval3\n" 5602"FROM dummy_rast\n" 5603"WHERE rid = 2;\n" 5604"\n" 5605" bnval1 | bnval2 | bnval3\n" 5606"--------+--------+--------\n" 5607" 0 | 0 | 0" 5608 5609#. Tag: refname 5610#: reference_raster.xml:2990 5611#, no-c-format 5612msgid "ST_BandIsNoData" 5613msgstr "ST_BandIsNoData" 5614 5615#. Tag: refpurpose 5616#: reference_raster.xml:2991 5617#, no-c-format 5618msgid "Returns true if the band is filled with only nodata values." 5619msgstr "" 5620 5621#. Tag: funcsynopsis 5622#: reference_raster.xml:2995 5623#, no-c-format 5624msgid "" 5625"<funcprototype> <funcdef>boolean <function>ST_BandIsNoData</function></" 5626"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 5627"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 5628"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 5629"<parameter>forceChecking=true</parameter></paramdef> </funcprototype> " 5630"<funcprototype> <funcdef>boolean <function>ST_BandIsNoData</function></" 5631"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 5632"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 5633"<parameter>forceChecking=true</parameter></paramdef> </funcprototype>" 5634msgstr "" 5635"<funcprototype> <funcdef>boolean <function>ST_BandIsNoData</function></" 5636"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 5637"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 5638"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 5639"<parameter>forceChecking=true</parameter></paramdef> </funcprototype> " 5640"<funcprototype> <funcdef>boolean <function>ST_BandIsNoData</function></" 5641"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 5642"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 5643"<parameter>forceChecking=true</parameter></paramdef> </funcprototype>" 5644 5645#. Tag: para 5646#: reference_raster.xml:3012 5647#, no-c-format 5648msgid "" 5649"Returns true if the band is filled with only nodata values. Band 1 is " 5650"assumed if not specified. If the last argument is TRUE, the entire band is " 5651"checked pixel by pixel. Otherwise, the function simply returns the value of " 5652"the isnodata flag for the band. The default value for this parameter is " 5653"FALSE, if not specified." 5654msgstr "" 5655 5656#. Tag: para 5657#: reference_raster.xml:3022 5658#, no-c-format 5659msgid "" 5660"If the flag is dirty (this is, the result is different using TRUE as last " 5661"parameter and not using it) you should update the raster to set this flag to " 5662"true, by using ST_SetBandIsNodata(), or ST_SetBandNodataValue() with TRUE as " 5663"last argument. See <xref linkend=\"RT_ST_SetBandIsNoData\"/>." 5664msgstr "" 5665 5666#. Tag: programlisting 5667#: reference_raster.xml:3032 5668#, no-c-format 5669msgid "" 5670"-- Create dummy table with one raster column\n" 5671"create table dummy_rast (rid integer, rast raster);\n" 5672"\n" 5673"-- Add raster with two bands, one pixel/band. In the first band, nodatavalue " 5674"= pixel value = 3.\n" 5675"-- In the second band, nodatavalue = 13, pixel value = 4\n" 5676"insert into dummy_rast values(1,\n" 5677"(\n" 5678"'01' -- little endian (uint8 ndr)\n" 5679"||\n" 5680"'0000' -- version (uint16 0)\n" 5681"||\n" 5682"'0200' -- nBands (uint16 0)\n" 5683"||\n" 5684"'17263529ED684A3F' -- scaleX (float64 0.000805965234044584)\n" 5685"||\n" 5686"'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458)\n" 5687"||\n" 5688"'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098)\n" 5689"||\n" 5690"'718F0E9A27A44840' -- ipY (float64 49.2824585505576)\n" 5691"||\n" 5692"'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707)\n" 5693"||\n" 5694"'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704)\n" 5695"||\n" 5696"'E6100000' -- SRID (int32 4326)\n" 5697"||\n" 5698"'0100' -- width (uint16 1)\n" 5699"||\n" 5700"'0100' -- height (uint16 1)\n" 5701"||\n" 5702"'6' -- hasnodatavalue and isnodata value set to true.\n" 5703"||\n" 5704"'2' -- first band type (4BUI)\n" 5705"||\n" 5706"'03' -- novalue==3\n" 5707"||\n" 5708"'03' -- pixel(0,0)==3 (same that nodata)\n" 5709"||\n" 5710"'0' -- hasnodatavalue set to false\n" 5711"||\n" 5712"'5' -- second band type (16BSI)\n" 5713"||\n" 5714"'0D00' -- novalue==13\n" 5715"||\n" 5716"'0400' -- pixel(0,0)==4\n" 5717")::raster\n" 5718");\n" 5719"\n" 5720"select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected " 5721"true\n" 5722"select st_bandisnodata(rast, 2) from dummy_rast where rid = 1; -- Expected " 5723"false" 5724msgstr "" 5725 5726#. Tag: para 5727#: reference_raster.xml:3038 5728#, no-c-format 5729msgid "" 5730", <xref linkend=\"RT_ST_NumBands\"/>, <xref linkend=" 5731"\"RT_ST_SetBandNoDataValue\"/>, <xref linkend=\"RT_ST_SetBandIsNoData\"/>" 5732msgstr "" 5733", <xref linkend=\"RT_ST_NumBands\"/>, <xref linkend=" 5734"\"RT_ST_SetBandNoDataValue\"/>, <xref linkend=\"RT_ST_SetBandIsNoData\"/>" 5735 5736#. Tag: refname 5737#: reference_raster.xml:3047 5738#, no-c-format 5739msgid "ST_BandPath" 5740msgstr "ST_BandPath" 5741 5742#. Tag: refpurpose 5743#: reference_raster.xml:3048 5744#, no-c-format 5745msgid "" 5746"Returns system file path to a band stored in file system. If no bandnum " 5747"specified, 1 is assumed." 5748msgstr "" 5749 5750#. Tag: funcprototype 5751#: reference_raster.xml:3053 5752#, no-c-format 5753msgid "" 5754"<funcdef>text <function>ST_BandPath</function></funcdef> " 5755"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5756"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5757"parameter></paramdef>" 5758msgstr "" 5759"<funcdef>text <function>ST_BandPath</function></funcdef> " 5760"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5761"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5762"parameter></paramdef>" 5763 5764#. Tag: para 5765#: reference_raster.xml:3064 5766#, no-c-format 5767msgid "" 5768"Returns system file path to a band. Throws an error if called with an in db " 5769"band." 5770msgstr "" 5771 5772#. Tag: programlisting 5773#: reference_raster.xml:3070 5774#, no-c-format 5775msgid "<!-- TODO: -->" 5776msgstr "<!-- TODO: -->" 5777 5778#. Tag: refname 5779#: reference_raster.xml:3082 5780#, fuzzy, no-c-format 5781msgid "ST_BandFileSize" 5782msgstr "ST_BandPixelType" 5783 5784#. Tag: refpurpose 5785#: reference_raster.xml:3083 5786#, no-c-format 5787msgid "" 5788"Returns the file size of a band stored in file system. If no bandnum " 5789"specified, 1 is assumed." 5790msgstr "" 5791 5792#. Tag: funcprototype 5793#: reference_raster.xml:3088 5794#, fuzzy, no-c-format 5795msgid "" 5796"<funcdef>bigint <function>ST_BandFileSize</function></funcdef> " 5797"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5798"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5799"parameter></paramdef>" 5800msgstr "" 5801"<funcdef>text <function>ST_BandPixelType</function></funcdef> " 5802"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5803"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5804"parameter></paramdef>" 5805 5806#. Tag: para 5807#: reference_raster.xml:3099 5808#, no-c-format 5809msgid "" 5810"Returns the file size of a band stored in file system. Throws an error if " 5811"called with an in db band, or if outdb access is not enabled." 5812msgstr "" 5813 5814#. Tag: para 5815#: reference_raster.xml:3101 5816#, no-c-format 5817msgid "" 5818"This function is typically used in conjunction with ST_BandPath() and " 5819"ST_BandFileTimestamp() so a client can determine if the filename of a outdb " 5820"raster as seen by it is the same as the one seen by the server." 5821msgstr "" 5822 5823#. Tag: para 5824#: reference_raster.xml:3103 reference_raster.xml:3139 5825#: reference_raster.xml:5098 reference_raster.xml:5151 5826#: reference_raster.xml:5848 reference_raster.xml:5891 5827#: reference_raster.xml:6004 reference_raster.xml:6873 5828#, fuzzy, no-c-format 5829msgid "Availability: 2.5.0" 5830msgstr "Disponibilità: 2.0" 5831 5832#. Tag: programlisting 5833#: reference_raster.xml:3110 5834#, fuzzy, no-c-format 5835msgid "" 5836"SELECT ST_BandFileSize(rast,1) FROM dummy_rast WHERE rid = 1;\n" 5837"\n" 5838" st_bandfilesize\n" 5839"-----------------\n" 5840" 240574" 5841msgstr "" 5842"SELECT ST_AsText(ST_PixelAsPoint(rast, 1, 1)) FROM dummy_rast WHERE rid = " 5843"1;\n" 5844"\n" 5845" st_astext \n" 5846"----------------\n" 5847" POINT(0.5 0.5)" 5848 5849#. Tag: refname 5850#: reference_raster.xml:3118 5851#, fuzzy, no-c-format 5852msgid "ST_BandFileTimestamp" 5853msgstr "ST_BandPixelType" 5854 5855#. Tag: refpurpose 5856#: reference_raster.xml:3119 5857#, no-c-format 5858msgid "" 5859"Returns the file timestamp of a band stored in file system. If no bandnum " 5860"specified, 1 is assumed." 5861msgstr "" 5862 5863#. Tag: funcprototype 5864#: reference_raster.xml:3124 5865#, fuzzy, no-c-format 5866msgid "" 5867"<funcdef>bigint <function>ST_BandFileTimestamp</function></funcdef> " 5868"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5869"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5870"parameter></paramdef>" 5871msgstr "" 5872"<funcdef>text <function>ST_BandPixelType</function></funcdef> " 5873"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5874"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5875"parameter></paramdef>" 5876 5877#. Tag: para 5878#: reference_raster.xml:3135 5879#, no-c-format 5880msgid "" 5881"Returns the file timestamp (number of seconds since Jan 1st 1970 00:00:00 " 5882"UTC) of a band stored in file system. Throws an error if called with an in " 5883"db band, or if outdb access is not enabled." 5884msgstr "" 5885 5886#. Tag: para 5887#: reference_raster.xml:3137 5888#, no-c-format 5889msgid "" 5890"This function is typically used in conjunction with ST_BandPath() and " 5891"ST_BandFileSize() so a client can determine if the filename of a outdb " 5892"raster as seen by it is the same as the one seen by the server." 5893msgstr "" 5894 5895#. Tag: programlisting 5896#: reference_raster.xml:3145 5897#, fuzzy, no-c-format 5898msgid "" 5899"SELECT ST_BandFileTimestamp(rast,1) FROM dummy_rast WHERE rid = 1;\n" 5900"\n" 5901" st_bandfiletimestamp\n" 5902"----------------------\n" 5903" 1521807257" 5904msgstr "" 5905"SELECT ST_AsText(ST_PixelAsPoint(rast, 1, 1)) FROM dummy_rast WHERE rid = " 5906"1;\n" 5907"\n" 5908" st_astext \n" 5909"----------------\n" 5910" POINT(0.5 0.5)" 5911 5912#. Tag: refname 5913#: reference_raster.xml:3152 5914#, no-c-format 5915msgid "ST_BandPixelType" 5916msgstr "ST_BandPixelType" 5917 5918#. Tag: refpurpose 5919#: reference_raster.xml:3153 5920#, no-c-format 5921msgid "" 5922"Returns the type of pixel for given band. If no bandnum specified, 1 is " 5923"assumed." 5924msgstr "" 5925 5926#. Tag: funcprototype 5927#: reference_raster.xml:3158 5928#, no-c-format 5929msgid "" 5930"<funcdef>text <function>ST_BandPixelType</function></funcdef> " 5931"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5932"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5933"parameter></paramdef>" 5934msgstr "" 5935"<funcdef>text <function>ST_BandPixelType</function></funcdef> " 5936"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 5937"<paramdef choice=\"opt\"><type>integer </type> <parameter>bandnum=1</" 5938"parameter></paramdef>" 5939 5940#. Tag: para 5941#: reference_raster.xml:3169 5942#, no-c-format 5943msgid "" 5944"Returns name describing data type and size of values stored in each cell of " 5945"given band." 5946msgstr "" 5947 5948#. Tag: para 5949#: reference_raster.xml:3170 5950#, no-c-format 5951msgid "There are 11 pixel types. Pixel Types supported are as follows:" 5952msgstr "" 5953 5954#. Tag: para 5955#: reference_raster.xml:3173 5956#, no-c-format 5957msgid "1BB - 1-bit boolean" 5958msgstr "" 5959 5960#. Tag: para 5961#: reference_raster.xml:3177 5962#, no-c-format 5963msgid "2BUI - 2-bit unsigned integer" 5964msgstr "" 5965 5966#. Tag: para 5967#: reference_raster.xml:3181 5968#, no-c-format 5969msgid "4BUI - 4-bit unsigned integer" 5970msgstr "" 5971 5972#. Tag: para 5973#: reference_raster.xml:3185 5974#, no-c-format 5975msgid "8BSI - 8-bit signed integer" 5976msgstr "" 5977 5978#. Tag: para 5979#: reference_raster.xml:3188 5980#, no-c-format 5981msgid "8BUI - 8-bit unsigned integer" 5982msgstr "" 5983 5984#. Tag: para 5985#: reference_raster.xml:3191 5986#, no-c-format 5987msgid "16BSI - 16-bit signed integer" 5988msgstr "" 5989 5990#. Tag: para 5991#: reference_raster.xml:3194 5992#, no-c-format 5993msgid "16BUI - 16-bit unsigned integer" 5994msgstr "" 5995 5996#. Tag: para 5997#: reference_raster.xml:3197 5998#, no-c-format 5999msgid "32BSI - 32-bit signed integer" 6000msgstr "" 6001 6002#. Tag: para 6003#: reference_raster.xml:3200 6004#, no-c-format 6005msgid "32BUI - 32-bit unsigned integer" 6006msgstr "" 6007 6008#. Tag: para 6009#: reference_raster.xml:3203 6010#, no-c-format 6011msgid "32BF - 32-bit float" 6012msgstr "" 6013 6014#. Tag: para 6015#: reference_raster.xml:3206 6016#, no-c-format 6017msgid "64BF - 64-bit float" 6018msgstr "" 6019 6020#. Tag: programlisting 6021#: reference_raster.xml:3215 6022#, fuzzy, no-c-format 6023msgid "" 6024"SELECT ST_BandPixelType(rast,1) As btype1,\n" 6025" ST_BandPixelType(rast,2) As btype2, ST_BandPixelType(rast,3) As btype3\n" 6026"FROM dummy_rast\n" 6027"WHERE rid = 2;\n" 6028"\n" 6029" btype1 | btype2 | btype3\n" 6030"--------+--------+--------\n" 6031" 8BUI | 8BUI | 8BUI" 6032msgstr "" 6033"SELECT ST_BandPixelType(rast,1) As btype1, \n" 6034" ST_BandPixelType(rast,2) As btype2, ST_BandPixelType(rast,3) As btype3\n" 6035"FROM dummy_rast\n" 6036"WHERE rid = 2;\n" 6037"\n" 6038" btype1 | btype2 | btype3\n" 6039"--------+--------+--------\n" 6040" 8BUI | 8BUI | 8BUI" 6041 6042#. Tag: refname 6043#: reference_raster.xml:3227 6044#, no-c-format 6045msgid "ST_HasNoBand" 6046msgstr "ST_HasNoBand" 6047 6048#. Tag: refpurpose 6049#: reference_raster.xml:3228 6050#, no-c-format 6051msgid "" 6052"<refpurpose>Returns true if there is no band with given band number. If no " 6053"band number is specified, then band number 1 is assumed.</refpurpose>" 6054msgstr "" 6055 6056#. Tag: funcprototype 6057#: reference_raster.xml:3233 6058#, no-c-format 6059msgid "" 6060"<funcdef>boolean <function>ST_HasNoBand</function></funcdef> " 6061"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6062"<paramdef><type>integer </type> <parameter>bandnum=1</parameter></paramdef>" 6063msgstr "" 6064"<funcdef>boolean <function>ST_HasNoBand</function></funcdef> " 6065"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6066"<paramdef><type>integer </type> <parameter>bandnum=1</parameter></paramdef>" 6067 6068#. Tag: para 6069#: reference_raster.xml:3244 6070#, no-c-format 6071msgid "" 6072"<para>Returns true if there is no band with given band number. If no band " 6073"number is specified, then band number 1 is assumed.</para>" 6074msgstr "" 6075 6076#. Tag: programlisting 6077#: reference_raster.xml:3252 6078#, fuzzy, no-c-format 6079msgid "" 6080"SELECT rid, ST_HasNoBand(rast) As hb1, ST_HasNoBand(rast,2) as hb2,\n" 6081"ST_HasNoBand(rast,4) as hb4, ST_NumBands(rast) As numbands\n" 6082"FROM dummy_rast;\n" 6083"\n" 6084"rid | hb1 | hb2 | hb4 | numbands\n" 6085"-----+-----+-----+-----+----------\n" 6086"1 | t | t | t | 0\n" 6087"2 | f | f | t | 3" 6088msgstr "" 6089"SELECT rid, ST_HasNoBand(rast) As hb1, ST_HasNoBand(rast,2) as hb2, \n" 6090"ST_HasNoBand(rast,4) as hb4, ST_NumBands(rast) As numbands \n" 6091"FROM dummy_rast;\n" 6092"\n" 6093"rid | hb1 | hb2 | hb4 | numbands\n" 6094"-----+-----+-----+-----+----------\n" 6095"1 | t | t | t | 0\n" 6096"2 | f | f | t | 3" 6097 6098#. Tag: title 6099#: reference_raster.xml:3265 6100#, no-c-format 6101msgid "Raster Pixel Accessors and Setters" 6102msgstr "" 6103 6104#. Tag: refname 6105#: reference_raster.xml:3269 6106#, no-c-format 6107msgid "ST_PixelAsPolygon" 6108msgstr "" 6109 6110#. Tag: refpurpose 6111#: reference_raster.xml:3270 6112#, no-c-format 6113msgid "" 6114"<refpurpose>Returns the polygon geometry that bounds the pixel for a " 6115"particular row and column.</refpurpose>" 6116msgstr "" 6117 6118#. Tag: funcprototype 6119#: reference_raster.xml:3275 6120#, no-c-format 6121msgid "" 6122"<funcdef>geometry <function>ST_PixelAsPolygon</function></funcdef> " 6123"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6124"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 6125"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>" 6126msgstr "" 6127"<funcdef>geometry <function>ST_PixelAsPolygon</function></funcdef> " 6128"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6129"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 6130"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>" 6131 6132#. Tag: para 6133#: reference_raster.xml:3287 6134#, no-c-format 6135msgid "" 6136"<para>Returns the polygon geometry that bounds the pixel for a particular " 6137"row and column.</para>" 6138msgstr "" 6139 6140#. Tag: programlisting 6141#: reference_raster.xml:3295 6142#, fuzzy, no-c-format 6143msgid "" 6144"-- get raster pixel polygon\n" 6145"SELECT i,j, ST_AsText(ST_PixelAsPolygon(foo.rast, i,j)) As b1pgeom\n" 6146"FROM dummy_rast As foo\n" 6147" CROSS JOIN generate_series(1,2) As i\n" 6148" CROSS JOIN generate_series(1,1) As j\n" 6149"WHERE rid=2;\n" 6150"\n" 6151" i | j | b1pgeom\n" 6152"---+---" 6153"+-----------------------------------------------------------------------------\n" 6154" 1 | 1 | POLYGON((3427927.75 5793244,3427927.8 5793244,3427927.8 " 6155"5793243.95,...\n" 6156" 2 | 1 | POLYGON((3427927.8 5793244,3427927.85 5793244,3427927.85 " 6157"5793243.95, .." 6158msgstr "" 6159"-- get raster pixel polygon\n" 6160"SELECT i,j, ST_AsText(ST_PixelAsPolygon(foo.rast, i,j)) As b1pgeom\n" 6161"FROM dummy_rast As foo \n" 6162" CROSS JOIN generate_series(1,2) As i \n" 6163" CROSS JOIN generate_series(1,1) As j\n" 6164"WHERE rid=2;\n" 6165"\n" 6166" i | j | b1pgeom\n" 6167"---+---" 6168"+-----------------------------------------------------------------------------\n" 6169" 1 | 1 | POLYGON((3427927.75 5793244,3427927.8 5793244,3427927.8 " 6170"5793243.95,...\n" 6171" 2 | 1 | POLYGON((3427927.8 5793244,3427927.85 5793244,3427927.85 " 6172"5793243.95, .." 6173 6174#. Tag: para 6175#: reference_raster.xml:3300 6176#, no-c-format 6177msgid "" 6178", <xref linkend=\"RT_ST_PixelAsPolygons\"/>, <xref linkend=" 6179"\"RT_ST_PixelAsPoint\"/>, <xref linkend=\"RT_ST_PixelAsPoints\"/>, <xref " 6180"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6181"\"/>, <xref linkend=\"RT_ST_Intersection\"/>, <xref linkend=\"ST_AsText\"/>" 6182msgstr "" 6183", <xref linkend=\"RT_ST_PixelAsPolygons\"/>, <xref linkend=" 6184"\"RT_ST_PixelAsPoint\"/>, <xref linkend=\"RT_ST_PixelAsPoints\"/>, <xref " 6185"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6186"\"/>, <xref linkend=\"RT_ST_Intersection\"/>, <xref linkend=\"ST_AsText\"/>" 6187 6188#. Tag: refname 6189#: reference_raster.xml:3315 6190#, no-c-format 6191msgid "ST_PixelAsPolygons" 6192msgstr "ST_PixelAsPolygons" 6193 6194#. Tag: refpurpose 6195#: reference_raster.xml:3316 6196#, no-c-format 6197msgid "" 6198"Returns the polygon geometry that bounds every pixel of a raster band along " 6199"with the value, the X and the Y raster coordinates of each pixel." 6200msgstr "" 6201 6202#. Tag: funcprototype 6203#: reference_raster.xml:3321 6204#, no-c-format 6205msgid "" 6206"<funcdef>setof record <function>ST_PixelAsPolygons</function></funcdef> " 6207"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6208"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 6209"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6210"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 6211msgstr "" 6212"<funcdef>setof record <function>ST_PixelAsPolygons</function></funcdef> " 6213"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6214"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 6215"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6216"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 6217 6218#. Tag: para 6219#: reference_raster.xml:3333 6220#, no-c-format 6221msgid "" 6222"Returns the polygon geometry that bounds every pixel of a raster band along " 6223"with the value (double precision), the X and the Y raster coordinates " 6224"(integers) of each pixel." 6225msgstr "" 6226 6227#. Tag: para 6228#: reference_raster.xml:3335 reference_raster.xml:3441 6229#: reference_raster.xml:3538 6230#, no-c-format 6231msgid "" 6232"Return record format: <parameter>geom</parameter> <xref linkend=\"geometry\"/" 6233">, <parameter>val</parameter> double precision, <parameter>x</parameter> " 6234"integer, <parameter>y</parameter> integers." 6235msgstr "" 6236 6237#. Tag: para 6238#: reference_raster.xml:3339 reference_raster.xml:3445 6239#: reference_raster.xml:3542 6240#, no-c-format 6241msgid "" 6242"When <parameter>exclude_nodata_value</parameter> = TRUE, only those pixels " 6243"whose values are not NODATA are returned as points." 6244msgstr "" 6245 6246#. Tag: para 6247#: reference_raster.xml:3345 6248#, no-c-format 6249msgid "" 6250"ST_PixelAsPolygons returns one polygon geometry for every pixel. This is " 6251"different than ST_DumpAsPolygons where each geometry represents one or more " 6252"pixels with the same pixel value." 6253msgstr "" 6254 6255#. Tag: para 6256#: reference_raster.xml:3351 6257#, no-c-format 6258msgid "Enhanced: 2.1.0 exclude_nodata_value optional argument was added." 6259msgstr "" 6260 6261#. Tag: para 6262#: reference_raster.xml:3352 reference_raster.xml:3450 6263#: reference_raster.xml:3548 6264#, no-c-format 6265msgid "Changed: 2.1.1 Changed behavior of exclude_nodata_value." 6266msgstr "" 6267 6268#. Tag: programlisting 6269#: reference_raster.xml:3357 6270#, no-c-format 6271msgid "" 6272"-- get raster pixel polygon\n" 6273"SELECT (gv).x, (gv).y, (gv).val, ST_AsText((gv).geom) geom\n" 6274"FROM (SELECT ST_PixelAsPolygons(\n" 6275" ST_SetValue(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, " 6276"0, 0, 0.001, -0.001, 0.001, 0.001, 4269),\n" 6277" '8BUI'::text, 1, 0),\n" 6278" 2, 2, 10),\n" 6279" 1, 1, NULL)\n" 6280") gv\n" 6281") foo;\n" 6282"\n" 6283" x | y | val | geom\n" 6284"---+---" 6285"+-----------------------------------------------------------------------------\n" 6286" 1 | 1 | | POLYGON((0 0,0.001 0.001,0.002 0,0.001 -0.001,0 0))\n" 6287" 1 | 2 | 1 | POLYGON((0.001 -0.001,0.002 0,0.003 -0.001,0.002 -0.002,0.001 " 6288"-0.001))\n" 6289" 2 | 1 | 1 | POLYGON((0.001 0.001,0.002 0.002,0.003 0.001,0.002 0,0.001 " 6290"0.001))\n" 6291" 2 | 2 | 10 | POLYGON((0.002 0,0.003 0.001,0.004 0,0.003 -0.001,0.002 0))" 6292msgstr "" 6293 6294#. Tag: para 6295#: reference_raster.xml:3362 6296#, no-c-format 6297msgid "" 6298", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6299"\"RT_ST_PixelAsPoint\"/>, <xref linkend=\"RT_ST_PixelAsPoints\"/>, <xref " 6300"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6301"\"/>, <xref linkend=\"ST_AsText\"/>" 6302msgstr "" 6303", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6304"\"RT_ST_PixelAsPoint\"/>, <xref linkend=\"RT_ST_PixelAsPoints\"/>, <xref " 6305"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6306"\"/>, <xref linkend=\"ST_AsText\"/>" 6307 6308#. Tag: refname 6309#: reference_raster.xml:3376 6310#, no-c-format 6311msgid "ST_PixelAsPoint" 6312msgstr "ST_PixelAsPoint" 6313 6314#. Tag: refpurpose 6315#: reference_raster.xml:3377 6316#, no-c-format 6317msgid "" 6318"<refpurpose>Returns a point geometry of the pixel's upper-left corner.</" 6319"refpurpose>" 6320msgstr "" 6321 6322#. Tag: funcprototype 6323#: reference_raster.xml:3383 6324#, no-c-format 6325msgid "" 6326"<funcdef>geometry <function>ST_PixelAsPoint</function></funcdef> " 6327"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6328"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 6329"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>" 6330msgstr "" 6331"<funcdef>geometry <function>ST_PixelAsPoint</function></funcdef> " 6332"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6333"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 6334"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>" 6335 6336#. Tag: para 6337#: reference_raster.xml:3394 6338#, no-c-format 6339msgid "<para>Returns a point geometry of the pixel's upper-left corner.</para>" 6340msgstr "" 6341 6342#. Tag: programlisting 6343#: reference_raster.xml:3400 6344#, fuzzy, no-c-format 6345msgid "" 6346"SELECT ST_AsText(ST_PixelAsPoint(rast, 1, 1)) FROM dummy_rast WHERE rid = " 6347"1;\n" 6348"\n" 6349" st_astext\n" 6350"----------------\n" 6351" POINT(0.5 0.5)" 6352msgstr "" 6353"SELECT ST_AsText(ST_PixelAsPoint(rast, 1, 1)) FROM dummy_rast WHERE rid = " 6354"1;\n" 6355"\n" 6356" st_astext \n" 6357"----------------\n" 6358" POINT(0.5 0.5)" 6359 6360#. Tag: para 6361#: reference_raster.xml:3405 6362#, no-c-format 6363msgid "" 6364", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6365"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoints\"/>, <xref " 6366"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6367"\"/>" 6368msgstr "" 6369", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6370"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoints\"/>, <xref " 6371"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6372"\"/>" 6373 6374#. Tag: refname 6375#: reference_raster.xml:3419 6376#, no-c-format 6377msgid "ST_PixelAsPoints" 6378msgstr "ST_PixelAsPoints" 6379 6380#. Tag: refpurpose 6381#: reference_raster.xml:3420 6382#, no-c-format 6383msgid "" 6384"<refpurpose>Returns a point geometry for each pixel of a raster band along " 6385"with the value, the X and the Y raster coordinates of each pixel. The " 6386"coordinates of the point geometry are of the pixel's upper-left corner.</" 6387"refpurpose>" 6388msgstr "" 6389 6390#. Tag: funcprototype 6391#: reference_raster.xml:3426 6392#, fuzzy, no-c-format 6393msgid "" 6394"<funcdef>setof record <function>ST_PixelAsPoints</function></funcdef> " 6395"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6396"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 6397"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6398"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 6399msgstr "" 6400"<funcdef>setof record <function>ST_PixelAsPolygons</function></funcdef> " 6401"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6402"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 6403"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6404"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 6405 6406#. Tag: para 6407#: reference_raster.xml:3437 6408#, no-c-format 6409msgid "" 6410"<para>Returns a point geometry for each pixel of a raster band along with " 6411"the value, the X and the Y raster coordinates of each pixel. The coordinates " 6412"of the point geometry are of the pixel's upper-left corner.</para>" 6413msgstr "" 6414 6415#. Tag: programlisting 6416#: reference_raster.xml:3455 6417#, fuzzy, no-c-format 6418msgid "" 6419"SELECT x, y, val, ST_AsText(geom) FROM (SELECT (ST_PixelAsPoints(rast, 1)).* " 6420"FROM dummy_rast WHERE rid = 2) foo;\n" 6421"\n" 6422" x | y | val | st_astext\n" 6423"---+---+-----+------------------------------\n" 6424" 1 | 1 | 253 | POINT(3427927.75 5793244)\n" 6425" 2 | 1 | 254 | POINT(3427927.8 5793244)\n" 6426" 3 | 1 | 253 | POINT(3427927.85 5793244)\n" 6427" 4 | 1 | 254 | POINT(3427927.9 5793244)\n" 6428" 5 | 1 | 254 | POINT(3427927.95 5793244)\n" 6429" 1 | 2 | 253 | POINT(3427927.75 5793243.95)\n" 6430" 2 | 2 | 254 | POINT(3427927.8 5793243.95)\n" 6431" 3 | 2 | 254 | POINT(3427927.85 5793243.95)\n" 6432" 4 | 2 | 253 | POINT(3427927.9 5793243.95)\n" 6433" 5 | 2 | 249 | POINT(3427927.95 5793243.95)\n" 6434" 1 | 3 | 250 | POINT(3427927.75 5793243.9)\n" 6435" 2 | 3 | 254 | POINT(3427927.8 5793243.9)\n" 6436" 3 | 3 | 254 | POINT(3427927.85 5793243.9)\n" 6437" 4 | 3 | 252 | POINT(3427927.9 5793243.9)\n" 6438" 5 | 3 | 249 | POINT(3427927.95 5793243.9)\n" 6439" 1 | 4 | 251 | POINT(3427927.75 5793243.85)\n" 6440" 2 | 4 | 253 | POINT(3427927.8 5793243.85)\n" 6441" 3 | 4 | 254 | POINT(3427927.85 5793243.85)\n" 6442" 4 | 4 | 254 | POINT(3427927.9 5793243.85)\n" 6443" 5 | 4 | 253 | POINT(3427927.95 5793243.85)\n" 6444" 1 | 5 | 252 | POINT(3427927.75 5793243.8)\n" 6445" 2 | 5 | 250 | POINT(3427927.8 5793243.8)\n" 6446" 3 | 5 | 254 | POINT(3427927.85 5793243.8)\n" 6447" 4 | 5 | 254 | POINT(3427927.9 5793243.8)\n" 6448" 5 | 5 | 254 | POINT(3427927.95 5793243.8)" 6449msgstr "" 6450"SELECT x, y, val, ST_AsText(geom) FROM (SELECT (ST_PixelAsPoints(rast, 1)).* " 6451"FROM dummy_rast WHERE rid = 2) foo;\n" 6452"\n" 6453" x | y | val | st_astext \n" 6454"---+---+-----+------------------------------\n" 6455" 1 | 1 | 253 | POINT(3427927.75 5793244)\n" 6456" 2 | 1 | 254 | POINT(3427927.8 5793244)\n" 6457" 3 | 1 | 253 | POINT(3427927.85 5793244)\n" 6458" 4 | 1 | 254 | POINT(3427927.9 5793244)\n" 6459" 5 | 1 | 254 | POINT(3427927.95 5793244)\n" 6460" 1 | 2 | 253 | POINT(3427927.75 5793243.95)\n" 6461" 2 | 2 | 254 | POINT(3427927.8 5793243.95)\n" 6462" 3 | 2 | 254 | POINT(3427927.85 5793243.95)\n" 6463" 4 | 2 | 253 | POINT(3427927.9 5793243.95)\n" 6464" 5 | 2 | 249 | POINT(3427927.95 5793243.95)\n" 6465" 1 | 3 | 250 | POINT(3427927.75 5793243.9)\n" 6466" 2 | 3 | 254 | POINT(3427927.8 5793243.9)\n" 6467" 3 | 3 | 254 | POINT(3427927.85 5793243.9)\n" 6468" 4 | 3 | 252 | POINT(3427927.9 5793243.9)\n" 6469" 5 | 3 | 249 | POINT(3427927.95 5793243.9)\n" 6470" 1 | 4 | 251 | POINT(3427927.75 5793243.85)\n" 6471" 2 | 4 | 253 | POINT(3427927.8 5793243.85)\n" 6472" 3 | 4 | 254 | POINT(3427927.85 5793243.85)\n" 6473" 4 | 4 | 254 | POINT(3427927.9 5793243.85)\n" 6474" 5 | 4 | 253 | POINT(3427927.95 5793243.85)\n" 6475" 1 | 5 | 252 | POINT(3427927.75 5793243.8)\n" 6476" 2 | 5 | 250 | POINT(3427927.8 5793243.8)\n" 6477" 3 | 5 | 254 | POINT(3427927.85 5793243.8)\n" 6478" 4 | 5 | 254 | POINT(3427927.9 5793243.8)\n" 6479" 5 | 5 | 254 | POINT(3427927.95 5793243.8)" 6480 6481#. Tag: para 6482#: reference_raster.xml:3460 6483#, no-c-format 6484msgid "" 6485", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6486"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoint\"/>, <xref " 6487"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6488"\"/>" 6489msgstr "" 6490", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6491"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoint\"/>, <xref " 6492"linkend=\"RT_ST_PixelAsCentroid\"/>, <xref linkend=\"RT_ST_PixelAsCentroids" 6493"\"/>" 6494 6495#. Tag: refname 6496#: reference_raster.xml:3474 6497#, no-c-format 6498msgid "ST_PixelAsCentroid" 6499msgstr "ST_PixelAsCentroid" 6500 6501#. Tag: refpurpose 6502#: reference_raster.xml:3475 6503#, no-c-format 6504msgid "" 6505"<refpurpose>Returns the centroid (point geometry) of the area represented by " 6506"a pixel.</refpurpose>" 6507msgstr "" 6508 6509#. Tag: funcprototype 6510#: reference_raster.xml:3481 6511#, fuzzy, no-c-format 6512msgid "" 6513"<funcdef>geometry <function>ST_PixelAsCentroid</function></funcdef> " 6514"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6515"<paramdef><type>integer </type> <parameter>x</parameter></paramdef> " 6516"<paramdef><type>integer </type> <parameter>y</parameter></paramdef>" 6517msgstr "" 6518"<funcdef>geometry <function>ST_PixelAsCentroid</function></funcdef> " 6519"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6520"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 6521"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef>" 6522 6523#. Tag: para 6524#: reference_raster.xml:3492 6525#, no-c-format 6526msgid "" 6527"<para>Returns the centroid (point geometry) of the area represented by a " 6528"pixel.</para>" 6529msgstr "" 6530 6531#. Tag: programlisting 6532#: reference_raster.xml:3498 6533#, fuzzy, no-c-format 6534msgid "" 6535"SELECT ST_AsText(ST_PixelAsCentroid(rast, 1, 1)) FROM dummy_rast WHERE rid = " 6536"1;\n" 6537"\n" 6538" st_astext\n" 6539"--------------\n" 6540" POINT(1.5 2)" 6541msgstr "" 6542"SELECT ST_AsText(ST_PixelAsCentroid(rast, 1, 1)) FROM dummy_rast WHERE rid = " 6543"1;\n" 6544"\n" 6545" st_astext \n" 6546"--------------\n" 6547" POINT(1.5 2)" 6548 6549#. Tag: para 6550#: reference_raster.xml:3503 6551#, no-c-format 6552msgid "" 6553", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6554"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoint\"/>, <xref " 6555"linkend=\"RT_ST_PixelAsPoints\"/>, <xref linkend=\"RT_ST_PixelAsCentroids\"/>" 6556msgstr "" 6557", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6558"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoint\"/>, <xref " 6559"linkend=\"RT_ST_PixelAsPoints\"/>, <xref linkend=\"RT_ST_PixelAsCentroids\"/>" 6560 6561#. Tag: refname 6562#: reference_raster.xml:3517 6563#, no-c-format 6564msgid "ST_PixelAsCentroids" 6565msgstr "ST_PixelAsCentroids" 6566 6567#. Tag: refpurpose 6568#: reference_raster.xml:3518 6569#, no-c-format 6570msgid "" 6571"<refpurpose>Returns the centroid (point geometry) for each pixel of a raster " 6572"band along with the value, the X and the Y raster coordinates of each pixel. " 6573"The point geometry is the centroid of the area represented by a pixel.</" 6574"refpurpose>" 6575msgstr "" 6576 6577#. Tag: funcprototype 6578#: reference_raster.xml:3524 6579#, fuzzy, no-c-format 6580msgid "" 6581"<funcdef>setof record <function>ST_PixelAsCentroids</function></funcdef> " 6582"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6583"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 6584"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6585"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 6586msgstr "" 6587"<funcdef>geometry <function>ST_PixelAsCentroids</function></funcdef> " 6588"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 6589"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 6590"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6591"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 6592 6593#. Tag: para 6594#: reference_raster.xml:3535 6595#, no-c-format 6596msgid "" 6597"<para>Returns the centroid (point geometry) for each pixel of a raster band " 6598"along with the value, the X and the Y raster coordinates of each pixel. The " 6599"point geometry is the centroid of the area represented by a pixel.</para>" 6600msgstr "" 6601 6602#. Tag: programlisting 6603#: reference_raster.xml:3553 6604#, fuzzy, no-c-format 6605msgid "" 6606"--LATERAL syntax requires PostgreSQL 9.3+\n" 6607"SELECT x, y, val, ST_AsText(geom)\n" 6608" FROM (SELECT dp.* FROM dummy_rast, LATERAL ST_PixelAsCentroids(rast, " 6609"1) AS dp WHERE rid = 2) foo;\n" 6610" x | y | val | st_astext\n" 6611"---+---+-----+--------------------------------\n" 6612" 1 | 1 | 253 | POINT(3427927.775 5793243.975)\n" 6613" 2 | 1 | 254 | POINT(3427927.825 5793243.975)\n" 6614" 3 | 1 | 253 | POINT(3427927.875 5793243.975)\n" 6615" 4 | 1 | 254 | POINT(3427927.925 5793243.975)\n" 6616" 5 | 1 | 254 | POINT(3427927.975 5793243.975)\n" 6617" 1 | 2 | 253 | POINT(3427927.775 5793243.925)\n" 6618" 2 | 2 | 254 | POINT(3427927.825 5793243.925)\n" 6619" 3 | 2 | 254 | POINT(3427927.875 5793243.925)\n" 6620" 4 | 2 | 253 | POINT(3427927.925 5793243.925)\n" 6621" 5 | 2 | 249 | POINT(3427927.975 5793243.925)\n" 6622" 1 | 3 | 250 | POINT(3427927.775 5793243.875)\n" 6623" 2 | 3 | 254 | POINT(3427927.825 5793243.875)\n" 6624" 3 | 3 | 254 | POINT(3427927.875 5793243.875)\n" 6625" 4 | 3 | 252 | POINT(3427927.925 5793243.875)\n" 6626" 5 | 3 | 249 | POINT(3427927.975 5793243.875)\n" 6627" 1 | 4 | 251 | POINT(3427927.775 5793243.825)\n" 6628" 2 | 4 | 253 | POINT(3427927.825 5793243.825)\n" 6629" 3 | 4 | 254 | POINT(3427927.875 5793243.825)\n" 6630" 4 | 4 | 254 | POINT(3427927.925 5793243.825)\n" 6631" 5 | 4 | 253 | POINT(3427927.975 5793243.825)\n" 6632" 1 | 5 | 252 | POINT(3427927.775 5793243.775)\n" 6633" 2 | 5 | 250 | POINT(3427927.825 5793243.775)\n" 6634" 3 | 5 | 254 | POINT(3427927.875 5793243.775)\n" 6635" 4 | 5 | 254 | POINT(3427927.925 5793243.775)\n" 6636" 5 | 5 | 254 | POINT(3427927.975 5793243.775)" 6637msgstr "" 6638"SELECT x, y, val, ST_AsText(geom) FROM (SELECT (ST_PixelAsCentroids(rast, " 6639"1)).* FROM dummy_rast WHERE rid = 2) foo;\n" 6640" x | y | val | st_astext \n" 6641"---+---+-----+--------------------------------\n" 6642" 1 | 1 | 253 | POINT(3427927.775 5793243.975)\n" 6643" 2 | 1 | 254 | POINT(3427927.825 5793243.975)\n" 6644" 3 | 1 | 253 | POINT(3427927.875 5793243.975)\n" 6645" 4 | 1 | 254 | POINT(3427927.925 5793243.975)\n" 6646" 5 | 1 | 254 | POINT(3427927.975 5793243.975)\n" 6647" 1 | 2 | 253 | POINT(3427927.775 5793243.925)\n" 6648" 2 | 2 | 254 | POINT(3427927.825 5793243.925)\n" 6649" 3 | 2 | 254 | POINT(3427927.875 5793243.925)\n" 6650" 4 | 2 | 253 | POINT(3427927.925 5793243.925)\n" 6651" 5 | 2 | 249 | POINT(3427927.975 5793243.925)\n" 6652" 1 | 3 | 250 | POINT(3427927.775 5793243.875)\n" 6653" 2 | 3 | 254 | POINT(3427927.825 5793243.875)\n" 6654" 3 | 3 | 254 | POINT(3427927.875 5793243.875)\n" 6655" 4 | 3 | 252 | POINT(3427927.925 5793243.875)\n" 6656" 5 | 3 | 249 | POINT(3427927.975 5793243.875)\n" 6657" 1 | 4 | 251 | POINT(3427927.775 5793243.825)\n" 6658" 2 | 4 | 253 | POINT(3427927.825 5793243.825)\n" 6659" 3 | 4 | 254 | POINT(3427927.875 5793243.825)\n" 6660" 4 | 4 | 254 | POINT(3427927.925 5793243.825)\n" 6661" 5 | 4 | 253 | POINT(3427927.975 5793243.825)\n" 6662" 1 | 5 | 252 | POINT(3427927.775 5793243.775)\n" 6663" 2 | 5 | 250 | POINT(3427927.825 5793243.775)\n" 6664" 3 | 5 | 254 | POINT(3427927.875 5793243.775)\n" 6665" 4 | 5 | 254 | POINT(3427927.925 5793243.775)\n" 6666" 5 | 5 | 254 | POINT(3427927.975 5793243.775)" 6667 6668#. Tag: para 6669#: reference_raster.xml:3558 6670#, no-c-format 6671msgid "" 6672", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6673"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoint\"/>, <xref " 6674"linkend=\"RT_ST_PixelAsPoints\"/>, <xref linkend=\"RT_ST_PixelAsCentroid\"/>" 6675msgstr "" 6676", <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=" 6677"\"RT_ST_PixelAsPolygons\"/>, <xref linkend=\"RT_ST_PixelAsPoint\"/>, <xref " 6678"linkend=\"RT_ST_PixelAsPoints\"/>, <xref linkend=\"RT_ST_PixelAsCentroid\"/>" 6679 6680#. Tag: refname 6681#: reference_raster.xml:3572 6682#, no-c-format 6683msgid "ST_Value" 6684msgstr "ST_Value" 6685 6686#. Tag: refpurpose 6687#: reference_raster.xml:3573 6688#, no-c-format 6689msgid "" 6690"Returns the value of a given band in a given columnx, rowy pixel or at a " 6691"particular geometric point. Band numbers start at 1 and assumed to be 1 if " 6692"not specified. If <varname>exclude_nodata_value</varname> is set to false, " 6693"then all pixels include <varname>nodata</varname> pixels are considered to " 6694"intersect and return value. If <varname>exclude_nodata_value</varname> is " 6695"not passed in then reads it from metadata of raster." 6696msgstr "" 6697 6698#. Tag: funcsynopsis 6699#: reference_raster.xml:3577 6700#, fuzzy, no-c-format 6701msgid "" 6702"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6703"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6704"paramdef> <paramdef><type>geometry </type> <parameter>pt</parameter></" 6705"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6706"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 6707"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6708"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6709"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 6710"paramdef> <paramdef><type>geometry </type> <parameter>pt</parameter></" 6711"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6712"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 6713"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6714"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6715"paramdef> <paramdef><type>integer </type> <parameter>x</parameter></" 6716"paramdef> <paramdef><type>integer </type> <parameter>y</parameter></" 6717"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6718"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 6719"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6720"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6721"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 6722"paramdef> <paramdef><type>integer </type> <parameter>x</parameter></" 6723"paramdef> <paramdef><type>integer </type> <parameter>y</parameter></" 6724"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6725"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype>" 6726msgstr "" 6727"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6728"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6729"paramdef> <paramdef><type>geometry </type> <parameter>pt</parameter></" 6730"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6731"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 6732"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6733"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6734"paramdef> <paramdef><type>integer </type> <parameter>bandnum</parameter></" 6735"paramdef> <paramdef><type>geometry </type> <parameter>pt</parameter></" 6736"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6737"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 6738"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6739"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6740"paramdef> <paramdef><type>integer </type> <parameter>columnx</parameter></" 6741"paramdef> <paramdef><type>integer </type> <parameter>rowy</parameter></" 6742"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6743"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 6744"<funcprototype> <funcdef>double precision <function>ST_Value</function></" 6745"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 6746"paramdef> <paramdef><type>integer </type> <parameter>bandnum</parameter></" 6747"paramdef> <paramdef><type>integer </type> <parameter>columnx</parameter></" 6748"paramdef> <paramdef><type>integer </type> <parameter>rowy</parameter></" 6749"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 6750"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype>" 6751 6752#. Tag: para 6753#: reference_raster.xml:3612 6754#, no-c-format 6755msgid "" 6756"Returns the value of a given band in a given columnx, rowy pixel or at a " 6757"given geometry point. Band numbers start at 1 and band is assumed to be 1 if " 6758"not specified. If <varname>exclude_nodata_value</varname> is set to true, " 6759"then only non <varname>nodata</varname> pixels are considered. If " 6760"<varname>exclude_nodata_value</varname> is set to false, then all pixels are " 6761"considered." 6762msgstr "" 6763 6764#. Tag: para 6765#: reference_raster.xml:3615 6766#, no-c-format 6767msgid "Enhanced: 2.0.0 exclude_nodata_value optional argument was added." 6768msgstr "" 6769 6770#. Tag: programlisting 6771#: reference_raster.xml:3620 6772#, no-c-format 6773msgid "" 6774"-- get raster values at particular postgis geometry points\n" 6775"-- the srid of your geometry should be same as for your raster\n" 6776"SELECT rid, ST_Value(rast, foo.pt_geom) As b1pval, ST_Value(rast, 2, foo." 6777"pt_geom) As b2pval\n" 6778"FROM dummy_rast CROSS JOIN (SELECT ST_SetSRID(ST_Point(3427927.77, " 6779"5793243.76), 0) As pt_geom) As foo\n" 6780"WHERE rid=2;\n" 6781"\n" 6782" rid | b1pval | b2pval\n" 6783"-----+--------+--------\n" 6784" 2 | 252 | 79\n" 6785"\n" 6786"\n" 6787"-- general fictitious example using a real table\n" 6788"SELECT rid, ST_Value(rast, 3, sometable.geom) As b3pval\n" 6789"FROM sometable\n" 6790"WHERE ST_Intersects(rast,sometable.geom);" 6791msgstr "" 6792 6793#. Tag: programlisting 6794#: reference_raster.xml:3621 6795#, fuzzy, no-c-format 6796msgid "" 6797"SELECT rid, ST_Value(rast, 1, 1, 1) As b1pval,\n" 6798" ST_Value(rast, 2, 1, 1) As b2pval, ST_Value(rast, 3, 1, 1) As b3pval\n" 6799"FROM dummy_rast\n" 6800"WHERE rid=2;\n" 6801"\n" 6802" rid | b1pval | b2pval | b3pval\n" 6803"-----+--------+--------+--------\n" 6804" 2 | 253 | 78 | 70" 6805msgstr "" 6806"SELECT rid, ST_Value(rast, 1, 1, 1) As b1pval, \n" 6807" ST_Value(rast, 2, 1, 1) As b2pval, ST_Value(rast, 3, 1, 1) As b3pval\n" 6808"FROM dummy_rast\n" 6809"WHERE rid=2;\n" 6810"\n" 6811" rid | b1pval | b2pval | b3pval\n" 6812"-----+--------+--------+--------\n" 6813" 2 | 253 | 78 | 70" 6814 6815#. Tag: programlisting 6816#: reference_raster.xml:3623 6817#, fuzzy, no-c-format 6818msgid "" 6819"--- Get all values in bands 1,2,3 of each pixel --\n" 6820"SELECT x, y, ST_Value(rast, 1, x, y) As b1val,\n" 6821" ST_Value(rast, 2, x, y) As b2val, ST_Value(rast, 3, x, y) As b3val\n" 6822"FROM dummy_rast CROSS JOIN\n" 6823"generate_series(1, 1000) As x CROSS JOIN generate_series(1, 1000) As y\n" 6824"WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast);\n" 6825"\n" 6826" x | y | b1val | b2val | b3val\n" 6827"---+---+-------+-------+-------\n" 6828" 1 | 1 | 253 | 78 | 70\n" 6829" 1 | 2 | 253 | 96 | 80\n" 6830" 1 | 3 | 250 | 99 | 90\n" 6831" 1 | 4 | 251 | 89 | 77\n" 6832" 1 | 5 | 252 | 79 | 62\n" 6833" 2 | 1 | 254 | 98 | 86\n" 6834" 2 | 2 | 254 | 118 | 108\n" 6835" :\n" 6836" :" 6837msgstr "" 6838"--- Get all values in bands 1,2,3 of each pixel --\n" 6839"SELECT x, y, ST_Value(rast, 1, x, y) As b1val, \n" 6840" ST_Value(rast, 2, x, y) As b2val, ST_Value(rast, 3, x, y) As b3val\n" 6841"FROM dummy_rast CROSS JOIN\n" 6842"generate_series(1, 1000) As x CROSS JOIN generate_series(1, 1000) As y\n" 6843"WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast);\n" 6844"\n" 6845" x | y | b1val | b2val | b3val\n" 6846"---+---+-------+-------+-------\n" 6847" 1 | 1 | 253 | 78 | 70\n" 6848" 1 | 2 | 253 | 96 | 80\n" 6849" 1 | 3 | 250 | 99 | 90\n" 6850" 1 | 4 | 251 | 89 | 77\n" 6851" 1 | 5 | 252 | 79 | 62\n" 6852" 2 | 1 | 254 | 98 | 86\n" 6853" 2 | 2 | 254 | 118 | 108\n" 6854" :\n" 6855" :" 6856 6857#. Tag: programlisting 6858#: reference_raster.xml:3625 6859#, fuzzy, no-c-format 6860msgid "" 6861"--- Get all values in bands 1,2,3 of each pixel same as above but returning " 6862"the upper left point point of each pixel --\n" 6863"SELECT ST_AsText(ST_SetSRID(\n" 6864" ST_Point(ST_UpperLeftX(rast) + ST_ScaleX(rast)*x,\n" 6865" ST_UpperLeftY(rast) + ST_ScaleY(rast)*y),\n" 6866" ST_SRID(rast))) As uplpt\n" 6867" , ST_Value(rast, 1, x, y) As b1val,\n" 6868" ST_Value(rast, 2, x, y) As b2val, ST_Value(rast, 3, x, y) As b3val\n" 6869"FROM dummy_rast CROSS JOIN\n" 6870"generate_series(1,1000) As x CROSS JOIN generate_series(1,1000) As y\n" 6871"WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast);\n" 6872"\n" 6873" uplpt | b1val | b2val | b3val\n" 6874"-----------------------------+-------+-------+-------\n" 6875" POINT(3427929.25 5793245.5) | 253 | 78 | 70\n" 6876" POINT(3427929.25 5793247) | 253 | 96 | 80\n" 6877" POINT(3427929.25 5793248.5) | 250 | 99 | 90\n" 6878":" 6879msgstr "" 6880"--- Get all values in bands 1,2,3 of each pixel --\n" 6881"SELECT x, y, ST_Value(rast, 1, x, y) As b1val, \n" 6882" ST_Value(rast, 2, x, y) As b2val, ST_Value(rast, 3, x, y) As b3val\n" 6883"FROM dummy_rast CROSS JOIN\n" 6884"generate_series(1, 1000) As x CROSS JOIN generate_series(1, 1000) As y\n" 6885"WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast);\n" 6886"\n" 6887" x | y | b1val | b2val | b3val\n" 6888"---+---+-------+-------+-------\n" 6889" 1 | 1 | 253 | 78 | 70\n" 6890" 1 | 2 | 253 | 96 | 80\n" 6891" 1 | 3 | 250 | 99 | 90\n" 6892" 1 | 4 | 251 | 89 | 77\n" 6893" 1 | 5 | 252 | 79 | 62\n" 6894" 2 | 1 | 254 | 98 | 86\n" 6895" 2 | 2 | 254 | 118 | 108\n" 6896" :\n" 6897" :" 6898 6899#. Tag: programlisting 6900#: reference_raster.xml:3626 6901#, no-c-format 6902msgid "" 6903"--- Get a polygon formed by union of all pixels\n" 6904" that fall in a particular value range and intersect particular " 6905"polygon --\n" 6906"SELECT ST_AsText(ST_Union(pixpolyg)) As shadow\n" 6907"FROM (SELECT ST_Translate(ST_MakeEnvelope(\n" 6908" ST_UpperLeftX(rast), ST_UpperLeftY(rast),\n" 6909" ST_UpperLeftX(rast) + ST_ScaleX(rast),\n" 6910" ST_UpperLeftY(rast) + ST_ScaleY(rast), 0\n" 6911" ), ST_ScaleX(rast)*x, ST_ScaleY(rast)*y\n" 6912" ) As pixpolyg, ST_Value(rast, 2, x, y) As b2val\n" 6913" FROM dummy_rast CROSS JOIN\n" 6914"generate_series(1,1000) As x CROSS JOIN generate_series(1,1000) As y\n" 6915"WHERE rid = 2\n" 6916" AND x <= ST_Width(rast) AND y <= ST_Height(rast)) As foo\n" 6917"WHERE\n" 6918" ST_Intersects(\n" 6919" pixpolyg,\n" 6920" ST_GeomFromText('POLYGON((3427928 5793244,3427927.75 " 6921"5793243.75,3427928 5793243.75,3427928 5793244))',0)\n" 6922" ) AND b2val != 254;\n" 6923"\n" 6924"\n" 6925" shadow\n" 6926"------------------------------------------------------------------------------------\n" 6927" MULTIPOLYGON(((3427928 5793243.9,3427928 5793243.85,3427927.95 " 6928"5793243.85,3427927.95 5793243.9,\n" 6929" 3427927.95 5793243.95,3427928 5793243.95,3427928.05 5793243.95,3427928.05 " 6930"5793243.9,3427928 5793243.9)),((3427927.95 5793243.9,3427927.95 579324\n" 6931"3.85,3427927.9 5793243.85,3427927.85 5793243.85,3427927.85 " 6932"5793243.9,3427927.9 5793243.9,3427927.9 5793243.95,\n" 6933"3427927.95 5793243.95,3427927.95 5793243.9)),((3427927.85 " 6934"5793243.75,3427927.85 5793243.7,3427927.8 5793243.7,3427927.8 5793243.75\n" 6935",3427927.8 5793243.8,3427927.8 5793243.85,3427927.85 5793243.85,3427927.85 " 6936"5793243.8,3427927.85 5793243.75)),\n" 6937"((3427928.05 5793243.75,3427928.05 5793243.7,3427928 5793243.7,3427927.95 " 6938"5793243.7,3427927.95 5793243.75,3427927.95 5793243.8,3427\n" 6939"927.95 5793243.85,3427928 5793243.85,3427928 5793243.8,3427928.05 " 6940"5793243.8,\n" 6941"3427928.05 5793243.75)),((3427927.95 5793243.75,3427927.95 " 6942"5793243.7,3427927.9 5793243.7,3427927.85 5793243.7,\n" 6943"3427927.85 5793243.75,3427927.85 5793243.8,3427927.85 5793243.85,3427927.9 " 6944"5793243.85,\n" 6945"3427927.95 5793243.85,3427927.95 5793243.8,3427927.95 5793243.75)))" 6946msgstr "" 6947 6948#. Tag: programlisting 6949#: reference_raster.xml:3628 6950#, no-c-format 6951msgid "" 6952"--- Checking all the pixels of a large raster tile can take a long time.\n" 6953"--- You can dramatically improve speed at some lose of precision by orders " 6954"of magnitude\n" 6955"-- by sampling pixels using the step optional parameter of " 6956"generate_series.\n" 6957"-- This next example does the same as previous but by checking 1 for every " 6958"4 (2x2) pixels and putting in the last checked\n" 6959"-- putting in the checked pixel as the value for subsequent 4\n" 6960"\n" 6961"SELECT ST_AsText(ST_Union(pixpolyg)) As shadow\n" 6962"FROM (SELECT ST_Translate(ST_MakeEnvelope(\n" 6963" ST_UpperLeftX(rast), ST_UpperLeftY(rast),\n" 6964" ST_UpperLeftX(rast) + ST_ScaleX(rast)*2,\n" 6965" ST_UpperLeftY(rast) + ST_ScaleY(rast)*2, 0\n" 6966" ), ST_ScaleX(rast)*x, ST_ScaleY(rast)*y\n" 6967" ) As pixpolyg, ST_Value(rast, 2, x, y) As b2val\n" 6968" FROM dummy_rast CROSS JOIN\n" 6969"generate_series(1,1000,2) As x CROSS JOIN generate_series(1,1000,2) As y\n" 6970"WHERE rid = 2\n" 6971" AND x <= ST_Width(rast) AND y <= ST_Height(rast) ) As foo\n" 6972"WHERE\n" 6973" ST_Intersects(\n" 6974" pixpolyg,\n" 6975" ST_GeomFromText('POLYGON((3427928 5793244,3427927.75 " 6976"5793243.75,3427928 5793243.75,3427928 5793244))',0)\n" 6977" ) AND b2val != 254;\n" 6978"\n" 6979" shadow\n" 6980"------------------------------------------------------------------------------------\n" 6981" MULTIPOLYGON(((3427927.9 5793243.85,3427927.8 5793243.85,3427927.8 " 6982"5793243.95,\n" 6983" 3427927.9 5793243.95,3427928 5793243.95,3427928.1 5793243.95,3427928.1 " 6984"5793243.85,3427928 5793243.85,3427927.9 5793243.85)),\n" 6985" ((3427927.9 5793243.65,3427927.8 5793243.65,3427927.8 5793243.75,3427927.8 " 6986"5793243.85,3427927.9 5793243.85,\n" 6987" 3427928 5793243.85,3427928 5793243.75,3427928.1 5793243.75,3427928.1 " 6988"5793243.65,3427928 5793243.65,3427927.9 5793243.65)))" 6989msgstr "" 6990 6991#. Tag: para 6992#: reference_raster.xml:3633 6993#, no-c-format 6994msgid "" 6995", <xref linkend=\"RT_ST_DumpAsPolygons\"/>, <xref linkend=\"RT_ST_NumBands\"/" 6996">, <xref linkend=\"RT_ST_PixelAsPolygon\"/>, <xref linkend=\"RT_ST_ScaleX\"/" 6997">, <xref linkend=\"RT_ST_ScaleY\"/>, <xref linkend=\"RT_ST_UpperLeftX\"/>, " 6998"<xref linkend=\"RT_ST_UpperLeftY\"/>, <xref linkend=\"RT_ST_SRID\"/>, <xref " 6999"linkend=\"ST_AsText\"/>, <xref linkend=\"ST_Point\"/>, <xref linkend=" 7000"\"ST_MakeEnvelope\"/>, <xref linkend=\"ST_Intersects\"/>, <xref linkend=" 7001"\"ST_Intersection\"/>" 7002msgstr "" 7003 7004#. Tag: refname 7005#: reference_raster.xml:3654 7006#, no-c-format 7007msgid "ST_NearestValue" 7008msgstr "ST_NearestValue" 7009 7010#. Tag: refpurpose 7011#: reference_raster.xml:3655 7012#, no-c-format 7013msgid "" 7014"Returns the nearest non-<varname>NODATA</varname> value of a given band's " 7015"pixel specified by a columnx and rowy or a geometric point expressed in the " 7016"same spatial reference coordinate system as the raster." 7017msgstr "" 7018 7019#. Tag: funcsynopsis 7020#: reference_raster.xml:3661 7021#, no-c-format 7022msgid "" 7023"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7024"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7025"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7026"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7027"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7028"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7029"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7030"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7031"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7032"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7033"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7034"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7035"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7036"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7037"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnx</" 7038"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowy</" 7039"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7040"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7041"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7042"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7043"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnx</" 7044"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowy</" 7045"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7046"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype>" 7047msgstr "" 7048"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7049"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7050"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7051"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7052"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7053"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7054"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7055"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7056"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7057"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7058"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7059"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7060"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7061"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7062"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnx</" 7063"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowy</" 7064"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7065"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7066"<funcprototype> <funcdef>double precision <function>ST_NearestValue</" 7067"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7068"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnx</" 7069"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowy</" 7070"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7071"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype>" 7072 7073#. Tag: para 7074#: reference_raster.xml:3698 7075#, no-c-format 7076msgid "" 7077"Returns the nearest non-<varname>NODATA</varname> value of a given band in a " 7078"given columnx, rowy pixel or at a specific geometric point. If the columnx, " 7079"rowy pixel or the pixel at the specified geometric point is <varname>NODATA</" 7080"varname>, the function will find the nearest pixel to the columnx, rowy " 7081"pixel or geometric point whose value is not <varname>NODATA</varname>." 7082msgstr "" 7083 7084#. Tag: para 7085#: reference_raster.xml:3701 reference_raster.xml:3788 7086#, no-c-format 7087msgid "" 7088"Band numbers start at 1 and <varname>bandnum</varname> is assumed to be 1 if " 7089"not specified. If <varname>exclude_nodata_value</varname> is set to false, " 7090"then all pixels include <varname>nodata</varname> pixels are considered to " 7091"intersect and return value. If <varname>exclude_nodata_value</varname> is " 7092"not passed in then reads it from metadata of raster." 7093msgstr "" 7094 7095#. Tag: para 7096#: reference_raster.xml:3706 7097#, no-c-format 7098msgid "ST_NearestValue is a drop-in replacement for ST_Value." 7099msgstr "" 7100 7101#. Tag: programlisting 7102#: reference_raster.xml:3715 7103#, fuzzy, no-c-format 7104msgid "" 7105"-- pixel 2x2 has value\n" 7106"SELECT\n" 7107" ST_Value(rast, 2, 2) AS value,\n" 7108" ST_NearestValue(rast, 2, 2) AS nearestvalue\n" 7109"FROM (\n" 7110" SELECT\n" 7111" ST_SetValue(\n" 7112" ST_SetValue(\n" 7113" ST_SetValue(\n" 7114" ST_SetValue(\n" 7115" ST_SetValue(\n" 7116" ST_AddBand(\n" 7117" ST_MakeEmptyRaster(5, " 7118"5, -2, 2, 1, -1, 0, 0, 0),\n" 7119" '8BUI'::" 7120"text, 1, 0\n" 7121" ),\n" 7122" 1, 1, 0.\n" 7123" ),\n" 7124" 2, 3, 0.\n" 7125" ),\n" 7126" 3, 5, 0.\n" 7127" ),\n" 7128" 4, 2, 0.\n" 7129" ),\n" 7130" 5, 4, 0.\n" 7131" ) AS rast\n" 7132") AS foo\n" 7133"\n" 7134" value | nearestvalue\n" 7135"-------+--------------\n" 7136" 1 | 1" 7137msgstr "" 7138"-- un pixel 2x2 ha valore\n" 7139"SELECT\n" 7140" ST_Neighborhood(rast, 2, 2, 1, 1)\n" 7141"FROM (\n" 7142" SELECT\n" 7143" ST_SetValues(\n" 7144" ST_AddBand(\n" 7145" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7146"0),\n" 7147" '8BUI'::text, 1, 0\n" 7148" ),\n" 7149" 1, 1, 1, ARRAY[\n" 7150" [0, 1, 1, 1, 1],\n" 7151" [1, 1, 1, 0, 1],\n" 7152" [1, 0, 1, 1, 1],\n" 7153" [1, 1, 1, 1, 0],\n" 7154" [1, 1, 0, 1, 1]\n" 7155" ]::double precision[],\n" 7156" 1\n" 7157" ) AS rast\n" 7158") AS foo\n" 7159"\n" 7160" st_neighborhood \n" 7161"---------------------------------\n" 7162" {{NULL,1,1},{1,1,NULL},{1,1,1}}" 7163 7164#. Tag: programlisting 7165#: reference_raster.xml:3717 7166#, no-c-format 7167msgid "" 7168"-- pixel 2x3 is NODATA\n" 7169"SELECT\n" 7170" ST_Value(rast, 2, 3) AS value,\n" 7171" ST_NearestValue(rast, 2, 3) AS nearestvalue\n" 7172"FROM (\n" 7173" SELECT\n" 7174" ST_SetValue(\n" 7175" ST_SetValue(\n" 7176" ST_SetValue(\n" 7177" ST_SetValue(\n" 7178" ST_SetValue(\n" 7179" ST_AddBand(\n" 7180" ST_MakeEmptyRaster(5, " 7181"5, -2, 2, 1, -1, 0, 0, 0),\n" 7182" '8BUI'::" 7183"text, 1, 0\n" 7184" ),\n" 7185" 1, 1, 0.\n" 7186" ),\n" 7187" 2, 3, 0.\n" 7188" ),\n" 7189" 3, 5, 0.\n" 7190" ),\n" 7191" 4, 2, 0.\n" 7192" ),\n" 7193" 5, 4, 0.\n" 7194" ) AS rast\n" 7195") AS foo\n" 7196"\n" 7197" value | nearestvalue\n" 7198"-------+--------------\n" 7199" | 1" 7200msgstr "" 7201 7202#. Tag: para 7203#: reference_raster.xml:3723 7204#, no-c-format 7205msgid ", <xref linkend=\"RT_ST_Value\"/>" 7206msgstr ", <xref linkend=\"RT_ST_Value\"/>" 7207 7208#. Tag: refname 7209#: reference_raster.xml:3733 7210#, no-c-format 7211msgid "ST_Neighborhood" 7212msgstr "ST_Neighborhood" 7213 7214#. Tag: refpurpose 7215#: reference_raster.xml:3734 7216#, no-c-format 7217msgid "" 7218"Returns a 2-D double precision array of the non-<varname>NODATA</varname> " 7219"values around a given band's pixel specified by either a columnX and rowY or " 7220"a geometric point expressed in the same spatial reference coordinate system " 7221"as the raster." 7222msgstr "" 7223 7224#. Tag: funcsynopsis 7225#: reference_raster.xml:3740 7226#, no-c-format 7227msgid "" 7228"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7229"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7230"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7231"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnX</" 7232"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowY</" 7233"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7234"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7235"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7236"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7237"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7238"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7239"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnX</" 7240"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowY</" 7241"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7242"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7243"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7244"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7245"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7246"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7247"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7248"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7249"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7250"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7251"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7252"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7253"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7254"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7255"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7256"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7257"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7258"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7259"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype>" 7260msgstr "" 7261"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7262"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7263"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7264"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnX</" 7265"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowY</" 7266"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7267"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7268"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7269"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7270"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7271"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7272"parameter></paramdef> <paramdef><type>integer </type> <parameter>columnX</" 7273"parameter></paramdef> <paramdef><type>integer </type> <parameter>rowY</" 7274"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7275"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7276"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7277"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7278"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7279"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7280"parameter></paramdef> <paramdef><type>integer </type> <parameter>bandnum</" 7281"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7282"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7283"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7284"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7285"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 7286"<funcprototype> <funcdef>double precision[][] <function>ST_Neighborhood</" 7287"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 7288"parameter></paramdef> <paramdef><type>geometry </type> <parameter>pt</" 7289"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceX</" 7290"parameter></paramdef> <paramdef><type>integer </type> <parameter>distanceY</" 7291"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 7292"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype>" 7293 7294#. Tag: para 7295#: reference_raster.xml:3785 7296#, no-c-format 7297msgid "" 7298"Returns a 2-D double precision array of the non-<varname>NODATA</varname> " 7299"values around a given band's pixel specified by either a columnX and rowY or " 7300"a geometric point expressed in the same spatial reference coordinate system " 7301"as the raster. The <varname>distanceX</varname> and <varname>distanceY</" 7302"varname> parameters define the number of pixels around the specified pixel " 7303"in the X and Y axes, e.g. I want all values within 3 pixel distance along " 7304"the X axis and 2 pixel distance along the Y axis around my pixel of " 7305"interest. The center value of the 2-D array will be the value at the pixel " 7306"specified by the columnX and rowY or the geometric point." 7307msgstr "" 7308 7309#. Tag: para 7310#: reference_raster.xml:3792 7311#, no-c-format 7312msgid "" 7313"The number of elements along each axis of the returning 2-D array is 2 * " 7314"(<varname>distanceX</varname>|<varname>distanceY</varname>) + 1. So for a " 7315"<varname>distanceX</varname> and <varname>distanceY</varname> of 1, the " 7316"returning array will be 3x3." 7317msgstr "" 7318 7319#. Tag: para 7320#: reference_raster.xml:3797 7321#, no-c-format 7322msgid "" 7323"The 2-D array output can be passed to any of the raster processing builtin " 7324"functions, e.g. ST_Min4ma, ST_Sum4ma, ST_Mean4ma." 7325msgstr "" 7326 7327#. Tag: programlisting 7328#: reference_raster.xml:3807 7329#, fuzzy, no-c-format 7330msgid "" 7331"-- pixel 2x2 has value\n" 7332"SELECT\n" 7333" ST_Neighborhood(rast, 2, 2, 1, 1)\n" 7334"FROM (\n" 7335" SELECT\n" 7336" ST_SetValues(\n" 7337" ST_AddBand(\n" 7338" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7339"0),\n" 7340" '8BUI'::text, 1, 0\n" 7341" ),\n" 7342" 1, 1, 1, ARRAY[\n" 7343" [0, 1, 1, 1, 1],\n" 7344" [1, 1, 1, 0, 1],\n" 7345" [1, 0, 1, 1, 1],\n" 7346" [1, 1, 1, 1, 0],\n" 7347" [1, 1, 0, 1, 1]\n" 7348" ]::double precision[],\n" 7349" 1\n" 7350" ) AS rast\n" 7351") AS foo\n" 7352"\n" 7353" st_neighborhood\n" 7354"---------------------------------\n" 7355" {{NULL,1,1},{1,1,NULL},{1,1,1}}" 7356msgstr "" 7357"-- un pixel 2x2 ha valore\n" 7358"SELECT\n" 7359" ST_Neighborhood(rast, 2, 2, 1, 1)\n" 7360"FROM (\n" 7361" SELECT\n" 7362" ST_SetValues(\n" 7363" ST_AddBand(\n" 7364" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7365"0),\n" 7366" '8BUI'::text, 1, 0\n" 7367" ),\n" 7368" 1, 1, 1, ARRAY[\n" 7369" [0, 1, 1, 1, 1],\n" 7370" [1, 1, 1, 0, 1],\n" 7371" [1, 0, 1, 1, 1],\n" 7372" [1, 1, 1, 1, 0],\n" 7373" [1, 1, 0, 1, 1]\n" 7374" ]::double precision[],\n" 7375" 1\n" 7376" ) AS rast\n" 7377") AS foo\n" 7378"\n" 7379" st_neighborhood \n" 7380"---------------------------------\n" 7381" {{NULL,1,1},{1,1,NULL},{1,1,1}}" 7382 7383#. Tag: programlisting 7384#: reference_raster.xml:3809 7385#, fuzzy, no-c-format 7386msgid "" 7387"-- pixel 2x3 is NODATA\n" 7388"SELECT\n" 7389" ST_Neighborhood(rast, 2, 3, 1, 1)\n" 7390"FROM (\n" 7391" SELECT\n" 7392" ST_SetValues(\n" 7393" ST_AddBand(\n" 7394" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7395"0),\n" 7396" '8BUI'::text, 1, 0\n" 7397" ),\n" 7398" 1, 1, 1, ARRAY[\n" 7399" [0, 1, 1, 1, 1],\n" 7400" [1, 1, 1, 0, 1],\n" 7401" [1, 0, 1, 1, 1],\n" 7402" [1, 1, 1, 1, 0],\n" 7403" [1, 1, 0, 1, 1]\n" 7404" ]::double precision[],\n" 7405" 1\n" 7406" ) AS rast\n" 7407") AS foo\n" 7408"\n" 7409" st_neighborhood\n" 7410"------------------------------\n" 7411" {{1,1,1},{1,NULL,1},{1,1,1}}" 7412msgstr "" 7413"-- un pixel 2x2 ha valore\n" 7414"SELECT\n" 7415" ST_Neighborhood(rast, 2, 2, 1, 1)\n" 7416"FROM (\n" 7417" SELECT\n" 7418" ST_SetValues(\n" 7419" ST_AddBand(\n" 7420" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7421"0),\n" 7422" '8BUI'::text, 1, 0\n" 7423" ),\n" 7424" 1, 1, 1, ARRAY[\n" 7425" [0, 1, 1, 1, 1],\n" 7426" [1, 1, 1, 0, 1],\n" 7427" [1, 0, 1, 1, 1],\n" 7428" [1, 1, 1, 1, 0],\n" 7429" [1, 1, 0, 1, 1]\n" 7430" ]::double precision[],\n" 7431" 1\n" 7432" ) AS rast\n" 7433") AS foo\n" 7434"\n" 7435" st_neighborhood \n" 7436"---------------------------------\n" 7437" {{NULL,1,1},{1,1,NULL},{1,1,1}}" 7438 7439#. Tag: programlisting 7440#: reference_raster.xml:3811 7441#, fuzzy, no-c-format 7442msgid "" 7443"-- pixel 3x3 has value\n" 7444"-- exclude_nodata_value = FALSE\n" 7445"SELECT\n" 7446" ST_Neighborhood(rast, 3, 3, 1, 1, false)\n" 7447"FROM (\n" 7448" ST_SetValues(\n" 7449" ST_AddBand(\n" 7450" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7451"0),\n" 7452" '8BUI'::text, 1, 0\n" 7453" ),\n" 7454" 1, 1, 1, ARRAY[\n" 7455" [0, 1, 1, 1, 1],\n" 7456" [1, 1, 1, 0, 1],\n" 7457" [1, 0, 1, 1, 1],\n" 7458" [1, 1, 1, 1, 0],\n" 7459" [1, 1, 0, 1, 1]\n" 7460" ]::double precision[],\n" 7461" 1\n" 7462" ) AS rast\n" 7463") AS foo\n" 7464"\n" 7465" st_neighborhood\n" 7466"---------------------------\n" 7467" {{1,0,1},{1,1,1},{0,1,1}}" 7468msgstr "" 7469"-- un pixel 2x2 ha valore\n" 7470"SELECT\n" 7471" ST_Neighborhood(rast, 2, 2, 1, 1)\n" 7472"FROM (\n" 7473" SELECT\n" 7474" ST_SetValues(\n" 7475" ST_AddBand(\n" 7476" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 7477"0),\n" 7478" '8BUI'::text, 1, 0\n" 7479" ),\n" 7480" 1, 1, 1, ARRAY[\n" 7481" [0, 1, 1, 1, 1],\n" 7482" [1, 1, 1, 0, 1],\n" 7483" [1, 0, 1, 1, 1],\n" 7484" [1, 1, 1, 1, 0],\n" 7485" [1, 1, 0, 1, 1]\n" 7486" ]::double precision[],\n" 7487" 1\n" 7488" ) AS rast\n" 7489") AS foo\n" 7490"\n" 7491" st_neighborhood \n" 7492"---------------------------------\n" 7493" {{NULL,1,1},{1,1,NULL},{1,1,1}}" 7494 7495#. Tag: para 7496#: reference_raster.xml:3817 7497#, no-c-format 7498msgid "" 7499", <xref linkend=\"RT_ST_Min4ma\"/>, <xref linkend=\"RT_ST_Max4ma\"/>, <xref " 7500"linkend=\"RT_ST_Sum4ma\"/>, <xref linkend=\"RT_ST_Mean4ma\"/>, <xref linkend=" 7501"\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref linkend=" 7502"\"RT_ST_StdDev4ma\"/>" 7503msgstr "" 7504", <xref linkend=\"RT_ST_Min4ma\"/>, <xref linkend=\"RT_ST_Max4ma\"/>, <xref " 7505"linkend=\"RT_ST_Sum4ma\"/>, <xref linkend=\"RT_ST_Mean4ma\"/>, <xref linkend=" 7506"\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref linkend=" 7507"\"RT_ST_StdDev4ma\"/>" 7508 7509#. Tag: refname 7510#: reference_raster.xml:3834 7511#, no-c-format 7512msgid "ST_SetValue" 7513msgstr "ST_SetValue" 7514 7515#. Tag: refpurpose 7516#: reference_raster.xml:3835 7517#, no-c-format 7518msgid "" 7519"Returns modified raster resulting from setting the value of a given band in " 7520"a given columnx, rowy pixel or the pixels that intersect a particular " 7521"geometry. Band numbers start at 1 and assumed to be 1 if not specified." 7522msgstr "" 7523 7524#. Tag: funcsynopsis 7525#: reference_raster.xml:3839 7526#, no-c-format 7527msgid "" 7528"<funcprototype> <funcdef>raster <function>ST_SetValue</function></funcdef> " 7529"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 7530"<paramdef><type>integer </type> <parameter>bandnum</parameter></paramdef> " 7531"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 7532"<paramdef><type>double precision </type> <parameter>newvalue</parameter></" 7533"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 7534"<function>ST_SetValue</function></funcdef> <paramdef><type>raster </type> " 7535"<parameter>rast</parameter></paramdef> <paramdef><type>geometry </type> " 7536"<parameter>geom</parameter></paramdef> <paramdef><type>double precision </" 7537"type> <parameter>newvalue</parameter></paramdef> </funcprototype> " 7538"<funcprototype> <funcdef>raster <function>ST_SetValue</function></funcdef> " 7539"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 7540"<paramdef><type>integer </type> <parameter>bandnum</parameter></paramdef> " 7541"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 7542"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef> " 7543"<paramdef><type>double precision </type> <parameter>newvalue</parameter></" 7544"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 7545"<function>ST_SetValue</function></funcdef> <paramdef><type>raster </type> " 7546"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 7547"<parameter>columnx</parameter></paramdef> <paramdef><type>integer </type> " 7548"<parameter>rowy</parameter></paramdef> <paramdef><type>double precision </" 7549"type> <parameter>newvalue</parameter></paramdef> </funcprototype>" 7550msgstr "" 7551 7552#. Tag: para 7553#: reference_raster.xml:3873 7554#, no-c-format 7555msgid "" 7556"Returns modified raster resulting from setting the specified pixels' values " 7557"to new value for the designated band given the raster's row and column or a " 7558"geometry. If no band is specified, then band 1 is assumed." 7559msgstr "" 7560 7561#. Tag: para 7562#: reference_raster.xml:3876 7563#, no-c-format 7564msgid "" 7565"Enhanced: 2.1.0 Geometry variant of ST_SetValue() now supports any geometry " 7566"type, not just point. The geometry variant is a wrapper around the geomval[] " 7567"variant of ST_SetValues()" 7568msgstr "" 7569 7570#. Tag: programlisting 7571#: reference_raster.xml:3882 7572#, no-c-format 7573msgid "" 7574"-- Geometry example\n" 7575"SELECT (foo.geomval).val, ST_AsText(ST_Union((foo.geomval).geom))\n" 7576"FROM (SELECT ST_DumpAsPolygons(\n" 7577" ST_SetValue(rast,1,\n" 7578" ST_Point(3427927.75, 5793243.95),\n" 7579" 50)\n" 7580" ) As geomval\n" 7581"FROM dummy_rast\n" 7582"where rid = 2) As foo\n" 7583"WHERE (foo.geomval).val < 250\n" 7584"GROUP BY (foo.geomval).val;\n" 7585"\n" 7586" val | st_astext\n" 7587"-----+-------------------------------------------------------------------\n" 7588" 50 | POLYGON((3427927.75 5793244,3427927.75 5793243.95,3427927.8 " 7589"579324 ...\n" 7590" 249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 57932 ..." 7591msgstr "" 7592 7593#. Tag: programlisting 7594#: reference_raster.xml:3884 7595#, no-c-format 7596msgid "" 7597"-- Store the changed raster --\n" 7598" UPDATE dummy_rast SET rast = ST_SetValue(rast,1, " 7599"ST_Point(3427927.75, 5793243.95),100)\n" 7600" WHERE rid = 2 ;" 7601msgstr "" 7602 7603#. Tag: para 7604#: reference_raster.xml:3888 reference_raster.xml:9966 7605#, no-c-format 7606msgid ", <xref linkend=\"RT_ST_DumpAsPolygons\"/>" 7607msgstr ", <xref linkend=\"RT_ST_DumpAsPolygons\"/>" 7608 7609#. Tag: refname 7610#: reference_raster.xml:3894 7611#, no-c-format 7612msgid "ST_SetValues" 7613msgstr "ST_SetValues" 7614 7615#. Tag: refpurpose 7616#: reference_raster.xml:3895 7617#, no-c-format 7618msgid "" 7619"Returns modified raster resulting from setting the values of a given band." 7620msgstr "" 7621 7622#. Tag: funcsynopsis 7623#: reference_raster.xml:3899 7624#, no-c-format 7625msgid "" 7626"<funcprototype> <funcdef>raster <function>ST_SetValues</function></funcdef> " 7627"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 7628"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 7629"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 7630"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef> " 7631"<paramdef><type>double precision[][] </type> <parameter>newvalueset</" 7632"parameter></paramdef> <paramdef><type>boolean[][] </type> " 7633"<parameter>noset=NULL</parameter></paramdef> <paramdef><type>boolean </type> " 7634"<parameter>keepnodata=FALSE</parameter></paramdef> </funcprototype> " 7635"<funcprototype> <funcdef>raster <function>ST_SetValues</function></funcdef> " 7636"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 7637"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 7638"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 7639"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef> " 7640"<paramdef><type>double precision[][] </type> <parameter>newvalueset</" 7641"parameter></paramdef> <paramdef><type>double precision </type> " 7642"<parameter>nosetvalue</parameter></paramdef> <paramdef><type>boolean </type> " 7643"<parameter>keepnodata=FALSE</parameter></paramdef> </funcprototype> " 7644"<funcprototype> <funcdef>raster <function>ST_SetValues</function></funcdef> " 7645"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 7646"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 7647"<paramdef><type>integer </type> <parameter>columnx</parameter></paramdef> " 7648"<paramdef><type>integer </type> <parameter>rowy</parameter></paramdef> " 7649"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 7650"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 7651"<paramdef><type>double precision </type> <parameter>newvalue</parameter></" 7652"paramdef> <paramdef><type>boolean </type> <parameter>keepnodata=FALSE</" 7653"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 7654"<function>ST_SetValues</function></funcdef> <paramdef><type>raster </type> " 7655"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 7656"<parameter>columnx</parameter></paramdef> <paramdef><type>integer </type> " 7657"<parameter>rowy</parameter></paramdef> <paramdef><type>integer </type> " 7658"<parameter>width</parameter></paramdef> <paramdef><type>integer </type> " 7659"<parameter>height</parameter></paramdef> <paramdef><type>double precision </" 7660"type> <parameter>newvalue</parameter></paramdef> <paramdef><type>boolean </" 7661"type> <parameter>keepnodata=FALSE</parameter></paramdef> </funcprototype> " 7662"<funcprototype> <funcdef>raster <function>ST_SetValues</function></funcdef> " 7663"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 7664"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 7665"<paramdef><type>geomval[] </type> <parameter>geomvalset</parameter></" 7666"paramdef> <paramdef><type>boolean </type> <parameter>keepnodata=FALSE</" 7667"parameter></paramdef> </funcprototype>" 7668msgstr "" 7669 7670#. Tag: para 7671#: reference_raster.xml:3958 7672#, no-c-format 7673msgid "" 7674"Returns modified raster resulting from setting specified pixels to new " 7675"value(s) for the designated band. <varname>columnx</varname> and " 7676"<varname>rowy</varname> are 1-indexed." 7677msgstr "" 7678 7679#. Tag: para 7680#: reference_raster.xml:3962 7681#, no-c-format 7682msgid "" 7683"If <varname>keepnodata</varname> is TRUE, those pixels whose values are " 7684"NODATA will not be set with the corresponding value in <varname>newvalueset</" 7685"varname>." 7686msgstr "" 7687 7688#. Tag: para 7689#: reference_raster.xml:3966 7690#, no-c-format 7691msgid "" 7692"For Variant 1, the specific pixels to be set are determined by the " 7693"<varname>columnx</varname>, <varname>rowy</varname> pixel coordinates and " 7694"the dimensions of the <varname>newvalueset</varname> array. <varname>noset</" 7695"varname> can be used to prevent pixels with values present in " 7696"<varname>newvalueset</varname> from being set (due to PostgreSQL not " 7697"permitting ragged/jagged arrays). See example Variant 1." 7698msgstr "" 7699 7700#. Tag: para 7701#: reference_raster.xml:3970 7702#, no-c-format 7703msgid "" 7704"Variant 2 is like Variant 1 but with a simple double precision " 7705"<varname>nosetvalue</varname> instead of a boolean <varname>noset</varname> " 7706"array. Elements in <varname>newvalueset</varname> with the " 7707"<varname>nosetvalue</varname> value with be skipped. See example Variant 2." 7708msgstr "" 7709 7710#. Tag: para 7711#: reference_raster.xml:3974 7712#, no-c-format 7713msgid "" 7714"For Variant 3, the specific pixels to be set are determined by the " 7715"<varname>columnx</varname>, <varname>rowy</varname> pixel coordinates, " 7716"<varname>width</varname> and <varname>height</varname>. See example Variant " 7717"3." 7718msgstr "" 7719 7720#. Tag: para 7721#: reference_raster.xml:3978 7722#, no-c-format 7723msgid "" 7724"Variant 4 is the same as Variant 3 with the exception that it assumes that " 7725"the first band's pixels of <varname>rast</varname> will be set." 7726msgstr "" 7727 7728#. Tag: para 7729#: reference_raster.xml:3982 7730#, no-c-format 7731msgid "" 7732"For Variant 5, an array of <xref linkend=\"geomval\"/> is used to determine " 7733"the specific pixels to be set. If all the geometries in the array are of " 7734"type POINT or MULTIPOINT, the function uses a shortcut where the longitude " 7735"and latitude of each point is used to set a pixel directly. Otherwise, the " 7736"geometries are converted to rasters and then iterated through in one pass. " 7737"See example Variant 5." 7738msgstr "" 7739 7740#. Tag: programlisting 7741#: reference_raster.xml:3993 7742#, no-c-format 7743msgid "" 7744"/*\n" 7745"The ST_SetValues() does the following...\n" 7746"\n" 7747"+ - + - + - + + - + - + - +\n" 7748"| 1 | 1 | 1 | | 1 | 1 | 1 |\n" 7749"+ - + - + - + + - + - + - +\n" 7750"| 1 | 1 | 1 | => | 1 | 9 | 9 |\n" 7751"+ - + - + - + + - + - + - +\n" 7752"| 1 | 1 | 1 | | 1 | 9 | 9 |\n" 7753"+ - + - + - + + - + - + - +\n" 7754"*/\n" 7755"SELECT\n" 7756" (poly).x,\n" 7757" (poly).y,\n" 7758" (poly).val\n" 7759"FROM (\n" 7760"SELECT\n" 7761" ST_PixelAsPolygons(\n" 7762" ST_SetValues(\n" 7763" ST_AddBand(\n" 7764" ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, " 7765"0),\n" 7766" 1, '8BUI', 1, 0\n" 7767" ),\n" 7768" 1, 2, 2, ARRAY[[9, 9], [9, 9]]::double precision[]" 7769"[]\n" 7770" )\n" 7771" ) AS poly\n" 7772") foo\n" 7773"ORDER BY 1, 2;\n" 7774"\n" 7775" x | y | val\n" 7776"---+---+-----\n" 7777" 1 | 1 | 1\n" 7778" 1 | 2 | 1\n" 7779" 1 | 3 | 1\n" 7780" 2 | 1 | 1\n" 7781" 2 | 2 | 9\n" 7782" 2 | 3 | 9\n" 7783" 3 | 1 | 1\n" 7784" 3 | 2 | 9\n" 7785" 3 | 3 | 9" 7786msgstr "" 7787 7788#. Tag: programlisting 7789#: reference_raster.xml:3995 7790#, no-c-format 7791msgid "" 7792"/*\n" 7793"The ST_SetValues() does the following...\n" 7794"\n" 7795"+ - + - + - + + - + - + - +\n" 7796"| 1 | 1 | 1 | | 9 | 9 | 9 |\n" 7797"+ - + - + - + + - + - + - +\n" 7798"| 1 | 1 | 1 | => | 9 | | 9 |\n" 7799"+ - + - + - + + - + - + - +\n" 7800"| 1 | 1 | 1 | | 9 | 9 | 9 |\n" 7801"+ - + - + - + + - + - + - +\n" 7802"*/\n" 7803"SELECT\n" 7804" (poly).x,\n" 7805" (poly).y,\n" 7806" (poly).val\n" 7807"FROM (\n" 7808"SELECT\n" 7809" ST_PixelAsPolygons(\n" 7810" ST_SetValues(\n" 7811" ST_AddBand(\n" 7812" ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, " 7813"0),\n" 7814" 1, '8BUI', 1, 0\n" 7815" ),\n" 7816" 1, 1, 1, ARRAY[[9, 9, 9], [9, NULL, 9], [9, 9, 9]]::" 7817"double precision[][]\n" 7818" )\n" 7819" ) AS poly\n" 7820") foo\n" 7821"ORDER BY 1, 2;\n" 7822"\n" 7823" x | y | val\n" 7824"---+---+-----\n" 7825" 1 | 1 | 9\n" 7826" 1 | 2 | 9\n" 7827" 1 | 3 | 9\n" 7828" 2 | 1 | 9\n" 7829" 2 | 2 |\n" 7830" 2 | 3 | 9\n" 7831" 3 | 1 | 9\n" 7832" 3 | 2 | 9\n" 7833" 3 | 3 | 9" 7834msgstr "" 7835 7836#. Tag: programlisting 7837#: reference_raster.xml:3997 7838#, no-c-format 7839msgid "" 7840"/*\n" 7841"The ST_SetValues() does the following...\n" 7842"\n" 7843"+ - + - + - + + - + - + - +\n" 7844"| 1 | 1 | 1 | | 9 | 9 | 9 |\n" 7845"+ - + - + - + + - + - + - +\n" 7846"| 1 | 1 | 1 | => | 1 | | 9 |\n" 7847"+ - + - + - + + - + - + - +\n" 7848"| 1 | 1 | 1 | | 9 | 9 | 9 |\n" 7849"+ - + - + - + + - + - + - +\n" 7850"*/\n" 7851"SELECT\n" 7852" (poly).x,\n" 7853" (poly).y,\n" 7854" (poly).val\n" 7855"FROM (\n" 7856"SELECT\n" 7857" ST_PixelAsPolygons(\n" 7858" ST_SetValues(\n" 7859" ST_AddBand(\n" 7860" ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, " 7861"0),\n" 7862" 1, '8BUI', 1, 0\n" 7863" ),\n" 7864" 1, 1, 1,\n" 7865" ARRAY[[9, 9, 9], [9, NULL, 9], [9, 9, 9]]::" 7866"double precision[][],\n" 7867" ARRAY[[false], [true]]::boolean[][]\n" 7868" )\n" 7869" ) AS poly\n" 7870") foo\n" 7871"ORDER BY 1, 2;\n" 7872"\n" 7873" x | y | val\n" 7874"---+---+-----\n" 7875" 1 | 1 | 9\n" 7876" 1 | 2 | 1\n" 7877" 1 | 3 | 9\n" 7878" 2 | 1 | 9\n" 7879" 2 | 2 |\n" 7880" 2 | 3 | 9\n" 7881" 3 | 1 | 9\n" 7882" 3 | 2 | 9\n" 7883" 3 | 3 | 9" 7884msgstr "" 7885 7886#. Tag: programlisting 7887#: reference_raster.xml:3999 7888#, no-c-format 7889msgid "" 7890"/*\n" 7891"The ST_SetValues() does the following...\n" 7892"\n" 7893"+ - + - + - + + - + - + - +\n" 7894"| | 1 | 1 | | | 9 | 9 |\n" 7895"+ - + - + - + + - + - + - +\n" 7896"| 1 | 1 | 1 | => | 1 | | 9 |\n" 7897"+ - + - + - + + - + - + - +\n" 7898"| 1 | 1 | 1 | | 9 | 9 | 9 |\n" 7899"+ - + - + - + + - + - + - +\n" 7900"*/\n" 7901"SELECT\n" 7902" (poly).x,\n" 7903" (poly).y,\n" 7904" (poly).val\n" 7905"FROM (\n" 7906"SELECT\n" 7907" ST_PixelAsPolygons(\n" 7908" ST_SetValues(\n" 7909" ST_SetValue(\n" 7910" ST_AddBand(\n" 7911" ST_MakeEmptyRaster(3, 3, 0, 0, 1, " 7912"-1, 0, 0, 0),\n" 7913" 1, '8BUI', 1, 0\n" 7914" ),\n" 7915" 1, 1, 1, NULL\n" 7916" ),\n" 7917" 1, 1, 1,\n" 7918" ARRAY[[9, 9, 9], [9, NULL, 9], [9, 9, 9]]::" 7919"double precision[][],\n" 7920" ARRAY[[false], [true]]::boolean[][],\n" 7921" TRUE\n" 7922" )\n" 7923" ) AS poly\n" 7924") foo\n" 7925"ORDER BY 1, 2;\n" 7926"\n" 7927" x | y | val\n" 7928"---+---+-----\n" 7929" 1 | 1 |\n" 7930" 1 | 2 | 1\n" 7931" 1 | 3 | 9\n" 7932" 2 | 1 | 9\n" 7933" 2 | 2 |\n" 7934" 2 | 3 | 9\n" 7935" 3 | 1 | 9\n" 7936" 3 | 2 | 9\n" 7937" 3 | 3 | 9" 7938msgstr "" 7939 7940#. Tag: programlisting 7941#: reference_raster.xml:4006 7942#, no-c-format 7943msgid "" 7944"/*\n" 7945"The ST_SetValues() does the following...\n" 7946"\n" 7947"+ - + - + - + + - + - + - +\n" 7948"| 1 | 1 | 1 | | 1 | 1 | 1 |\n" 7949"+ - + - + - + + - + - + - +\n" 7950"| 1 | 1 | 1 | => | 1 | 9 | 9 |\n" 7951"+ - + - + - + + - + - + - +\n" 7952"| 1 | 1 | 1 | | 1 | 9 | 9 |\n" 7953"+ - + - + - + + - + - + - +\n" 7954"*/\n" 7955"SELECT\n" 7956" (poly).x,\n" 7957" (poly).y,\n" 7958" (poly).val\n" 7959"FROM (\n" 7960"SELECT\n" 7961" ST_PixelAsPolygons(\n" 7962" ST_SetValues(\n" 7963" ST_AddBand(\n" 7964" ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, " 7965"0),\n" 7966" 1, '8BUI', 1, 0\n" 7967" ),\n" 7968" 1, 1, 1, ARRAY[[-1, -1, -1], [-1, 9, 9], [-1, 9, " 7969"9]]::double precision[][], -1\n" 7970" )\n" 7971" ) AS poly\n" 7972") foo\n" 7973"ORDER BY 1, 2;\n" 7974"\n" 7975" x | y | val\n" 7976"---+---+-----\n" 7977" 1 | 1 | 1\n" 7978" 1 | 2 | 1\n" 7979" 1 | 3 | 1\n" 7980" 2 | 1 | 1\n" 7981" 2 | 2 | 9\n" 7982" 2 | 3 | 9\n" 7983" 3 | 1 | 1\n" 7984" 3 | 2 | 9\n" 7985" 3 | 3 | 9" 7986msgstr "" 7987 7988#. Tag: programlisting 7989#: reference_raster.xml:4008 7990#, no-c-format 7991msgid "" 7992"/*\n" 7993"This example is like the previous one. Instead of nosetvalue = -1, " 7994"nosetvalue = NULL\n" 7995"\n" 7996"The ST_SetValues() does the following...\n" 7997"\n" 7998"+ - + - + - + + - + - + - +\n" 7999"| 1 | 1 | 1 | | 1 | 1 | 1 |\n" 8000"+ - + - + - + + - + - + - +\n" 8001"| 1 | 1 | 1 | => | 1 | 9 | 9 |\n" 8002"+ - + - + - + + - + - + - +\n" 8003"| 1 | 1 | 1 | | 1 | 9 | 9 |\n" 8004"+ - + - + - + + - + - + - +\n" 8005"*/\n" 8006"SELECT\n" 8007" (poly).x,\n" 8008" (poly).y,\n" 8009" (poly).val\n" 8010"FROM (\n" 8011"SELECT\n" 8012" ST_PixelAsPolygons(\n" 8013" ST_SetValues(\n" 8014" ST_AddBand(\n" 8015" ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, " 8016"0),\n" 8017" 1, '8BUI', 1, 0\n" 8018" ),\n" 8019" 1, 1, 1, ARRAY[[NULL, NULL, NULL], [NULL, 9, 9], " 8020"[NULL, 9, 9]]::double precision[][], NULL::double precision\n" 8021" )\n" 8022" ) AS poly\n" 8023") foo\n" 8024"ORDER BY 1, 2;\n" 8025"\n" 8026" x | y | val\n" 8027"---+---+-----\n" 8028" 1 | 1 | 1\n" 8029" 1 | 2 | 1\n" 8030" 1 | 3 | 1\n" 8031" 2 | 1 | 1\n" 8032" 2 | 2 | 9\n" 8033" 2 | 3 | 9\n" 8034" 3 | 1 | 1\n" 8035" 3 | 2 | 9\n" 8036" 3 | 3 | 9" 8037msgstr "" 8038 8039#. Tag: title 8040#: reference_raster.xml:4013 reference_raster.xml:4958 8041#, no-c-format 8042msgid "Examples: Variant 3" 8043msgstr "" 8044 8045#. Tag: programlisting 8046#: reference_raster.xml:4015 8047#, no-c-format 8048msgid "" 8049"/*\n" 8050"The ST_SetValues() does the following...\n" 8051"\n" 8052"+ - + - + - + + - + - + - +\n" 8053"| 1 | 1 | 1 | | 1 | 1 | 1 |\n" 8054"+ - + - + - + + - + - + - +\n" 8055"| 1 | 1 | 1 | => | 1 | 9 | 9 |\n" 8056"+ - + - + - + + - + - + - +\n" 8057"| 1 | 1 | 1 | | 1 | 9 | 9 |\n" 8058"+ - + - + - + + - + - + - +\n" 8059"*/\n" 8060"SELECT\n" 8061" (poly).x,\n" 8062" (poly).y,\n" 8063" (poly).val\n" 8064"FROM (\n" 8065"SELECT\n" 8066" ST_PixelAsPolygons(\n" 8067" ST_SetValues(\n" 8068" ST_AddBand(\n" 8069" ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, " 8070"0),\n" 8071" 1, '8BUI', 1, 0\n" 8072" ),\n" 8073" 1, 2, 2, 2, 2, 9\n" 8074" )\n" 8075" ) AS poly\n" 8076") foo\n" 8077"ORDER BY 1, 2;\n" 8078"\n" 8079" x | y | val\n" 8080"---+---+-----\n" 8081" 1 | 1 | 1\n" 8082" 1 | 2 | 1\n" 8083" 1 | 3 | 1\n" 8084" 2 | 1 | 1\n" 8085" 2 | 2 | 9\n" 8086" 2 | 3 | 9\n" 8087" 3 | 1 | 1\n" 8088" 3 | 2 | 9\n" 8089" 3 | 3 | 9" 8090msgstr "" 8091 8092#. Tag: programlisting 8093#: reference_raster.xml:4017 8094#, no-c-format 8095msgid "" 8096"/*\n" 8097"The ST_SetValues() does the following...\n" 8098"\n" 8099"+ - + - + - + + - + - + - +\n" 8100"| 1 | 1 | 1 | | 1 | 1 | 1 |\n" 8101"+ - + - + - + + - + - + - +\n" 8102"| 1 | | 1 | => | 1 | | 9 |\n" 8103"+ - + - + - + + - + - + - +\n" 8104"| 1 | 1 | 1 | | 1 | 9 | 9 |\n" 8105"+ - + - + - + + - + - + - +\n" 8106"*/\n" 8107"SELECT\n" 8108" (poly).x,\n" 8109" (poly).y,\n" 8110" (poly).val\n" 8111"FROM (\n" 8112"SELECT\n" 8113" ST_PixelAsPolygons(\n" 8114" ST_SetValues(\n" 8115" ST_SetValue(\n" 8116" ST_AddBand(\n" 8117" ST_MakeEmptyRaster(3, 3, 0, 0, 1, " 8118"-1, 0, 0, 0),\n" 8119" 1, '8BUI', 1, 0\n" 8120" ),\n" 8121" 1, 2, 2, NULL\n" 8122" ),\n" 8123" 1, 2, 2, 2, 2, 9, TRUE\n" 8124" )\n" 8125" ) AS poly\n" 8126") foo\n" 8127"ORDER BY 1, 2;\n" 8128"\n" 8129" x | y | val\n" 8130"---+---+-----\n" 8131" 1 | 1 | 1\n" 8132" 1 | 2 | 1\n" 8133" 1 | 3 | 1\n" 8134" 2 | 1 | 1\n" 8135" 2 | 2 |\n" 8136" 2 | 3 | 9\n" 8137" 3 | 1 | 1\n" 8138" 3 | 2 | 9\n" 8139" 3 | 3 | 9" 8140msgstr "" 8141 8142#. Tag: title 8143#: reference_raster.xml:4022 8144#, no-c-format 8145msgid "Examples: Variant 5" 8146msgstr "" 8147 8148#. Tag: programlisting 8149#: reference_raster.xml:4024 8150#, no-c-format 8151msgid "" 8152"WITH foo AS (\n" 8153" SELECT 1 AS rid, ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, " 8154"0, 0), 1, '8BUI', 0, 0) AS rast\n" 8155"), bar AS (\n" 8156" SELECT 1 AS gid, 'SRID=0;POINT(2.5 -2.5)'::geometry geom UNION ALL\n" 8157" SELECT 2 AS gid, 'SRID=0;POLYGON((1 -1, 4 -1, 4 -4, 1 -4, 1 -1))'::" 8158"geometry geom UNION ALL\n" 8159" SELECT 3 AS gid, 'SRID=0;POLYGON((0 0, 5 0, 5 -1, 1 -1, 1 -4, 0 -4, " 8160"0 0))'::geometry geom UNION ALL\n" 8161" SELECT 4 AS gid, 'SRID=0;MULTIPOINT(0 0, 4 4, 4 -4)'::geometry\n" 8162")\n" 8163"SELECT\n" 8164" rid, gid, ST_DumpValues(ST_SetValue(rast, 1, geom, gid))\n" 8165"FROM foo t1\n" 8166"CROSS JOIN bar t2\n" 8167"ORDER BY rid, gid;\n" 8168"\n" 8169" rid | gid | " 8170"st_dumpvalues\n" 8171"-----+-----" 8172"+---------------------------------------------------------------------------------------------------------------------------------------------\n" 8173" 1 | 1 | (1,\"{{NULL,NULL,NULL,NULL,NULL},{NULL,NULL,NULL,NULL,NULL}," 8174"{NULL,NULL,1,NULL,NULL},{NULL,NULL,NULL,NULL,NULL},{NULL,NULL,NULL,NULL," 8175"NULL}}\")\n" 8176" 1 | 2 | (1,\"{{NULL,NULL,NULL,NULL,NULL},{NULL,2,2,2,NULL},{NULL,2,2,2," 8177"NULL},{NULL,2,2,2,NULL},{NULL,NULL,NULL,NULL,NULL}}\")\n" 8178" 1 | 3 | (1,\"{{3,3,3,3,3},{3,NULL,NULL,NULL,NULL},{3,NULL,NULL,NULL," 8179"NULL},{3,NULL,NULL,NULL,NULL},{NULL,NULL,NULL,NULL,NULL}}\")\n" 8180" 1 | 4 | (1,\"{{4,NULL,NULL,NULL,NULL},{NULL,NULL,NULL,NULL,NULL},{NULL," 8181"NULL,NULL,NULL,NULL},{NULL,NULL,NULL,NULL,NULL},{NULL,NULL,NULL,NULL,4}}\")\n" 8182"(4 rows)" 8183msgstr "" 8184 8185#. Tag: para 8186#: reference_raster.xml:4026 8187#, no-c-format 8188msgid "" 8189"The following shows that geomvals later in the array can overwrite prior " 8190"geomvals" 8191msgstr "" 8192 8193#. Tag: programlisting 8194#: reference_raster.xml:4027 8195#, no-c-format 8196msgid "" 8197"WITH foo AS (\n" 8198" SELECT 1 AS rid, ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, " 8199"0, 0), 1, '8BUI', 0, 0) AS rast\n" 8200"), bar AS (\n" 8201" SELECT 1 AS gid, 'SRID=0;POINT(2.5 -2.5)'::geometry geom UNION ALL\n" 8202" SELECT 2 AS gid, 'SRID=0;POLYGON((1 -1, 4 -1, 4 -4, 1 -4, 1 -1))'::" 8203"geometry geom UNION ALL\n" 8204" SELECT 3 AS gid, 'SRID=0;POLYGON((0 0, 5 0, 5 -1, 1 -1, 1 -4, 0 -4, " 8205"0 0))'::geometry geom UNION ALL\n" 8206" SELECT 4 AS gid, 'SRID=0;MULTIPOINT(0 0, 4 4, 4 -4)'::geometry\n" 8207")\n" 8208"SELECT\n" 8209" t1.rid, t2.gid, t3.gid, ST_DumpValues(ST_SetValues(rast, 1, " 8210"ARRAY[ROW(t2.geom, t2.gid), ROW(t3.geom, t3.gid)]::geomval[]))\n" 8211"FROM foo t1\n" 8212"CROSS JOIN bar t2\n" 8213"CROSS JOIN bar t3\n" 8214"WHERE t2.gid = 1\n" 8215" AND t3.gid = 2\n" 8216"ORDER BY t1.rid, t2.gid, t3.gid;\n" 8217"\n" 8218" rid | gid | gid | " 8219"st_dumpvalues\n" 8220"-----+-----+-----" 8221"+---------------------------------------------------------------------------------------------------------------------\n" 8222" 1 | 1 | 2 | (1,\"{{NULL,NULL,NULL,NULL,NULL},{NULL,2,2,2,NULL}," 8223"{NULL,2,2,2,NULL},{NULL,2,2,2,NULL},{NULL,NULL,NULL,NULL,NULL}}\")\n" 8224"(1 row)" 8225msgstr "" 8226 8227#. Tag: para 8228#: reference_raster.xml:4029 8229#, no-c-format 8230msgid "This example is the opposite of the prior example" 8231msgstr "" 8232 8233#. Tag: programlisting 8234#: reference_raster.xml:4030 8235#, no-c-format 8236msgid "" 8237"WITH foo AS (\n" 8238" SELECT 1 AS rid, ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, " 8239"0, 0), 1, '8BUI', 0, 0) AS rast\n" 8240"), bar AS (\n" 8241" SELECT 1 AS gid, 'SRID=0;POINT(2.5 -2.5)'::geometry geom UNION ALL\n" 8242" SELECT 2 AS gid, 'SRID=0;POLYGON((1 -1, 4 -1, 4 -4, 1 -4, 1 -1))'::" 8243"geometry geom UNION ALL\n" 8244" SELECT 3 AS gid, 'SRID=0;POLYGON((0 0, 5 0, 5 -1, 1 -1, 1 -4, 0 -4, " 8245"0 0))'::geometry geom UNION ALL\n" 8246" SELECT 4 AS gid, 'SRID=0;MULTIPOINT(0 0, 4 4, 4 -4)'::geometry\n" 8247")\n" 8248"SELECT\n" 8249" t1.rid, t2.gid, t3.gid, ST_DumpValues(ST_SetValues(rast, 1, " 8250"ARRAY[ROW(t2.geom, t2.gid), ROW(t3.geom, t3.gid)]::geomval[]))\n" 8251"FROM foo t1\n" 8252"CROSS JOIN bar t2\n" 8253"CROSS JOIN bar t3\n" 8254"WHERE t2.gid = 2\n" 8255" AND t3.gid = 1\n" 8256"ORDER BY t1.rid, t2.gid, t3.gid;\n" 8257"\n" 8258" rid | gid | gid | " 8259"st_dumpvalues\n" 8260"-----+-----+-----" 8261"+---------------------------------------------------------------------------------------------------------------------\n" 8262" 1 | 2 | 1 | (1,\"{{NULL,NULL,NULL,NULL,NULL},{NULL,2,2,2,NULL}," 8263"{NULL,2,1,2,NULL},{NULL,2,2,2,NULL},{NULL,NULL,NULL,NULL,NULL}}\")\n" 8264"(1 row)" 8265msgstr "" 8266 8267#. Tag: para 8268#: reference_raster.xml:4037 8269#, no-c-format 8270msgid "" 8271", <xref linkend=\"RT_ST_SetValue\"/>, <xref linkend=\"RT_ST_PixelAsPolygons" 8272"\"/>" 8273msgstr "" 8274", <xref linkend=\"RT_ST_SetValue\"/>, <xref linkend=\"RT_ST_PixelAsPolygons" 8275"\"/>" 8276 8277#. Tag: refname 8278#: reference_raster.xml:4047 8279#, no-c-format 8280msgid "ST_DumpValues" 8281msgstr "" 8282 8283#. Tag: refpurpose 8284#: reference_raster.xml:4048 8285#, no-c-format 8286msgid "Get the values of the specified band as a 2-dimension array." 8287msgstr "" 8288 8289#. Tag: funcsynopsis 8290#: reference_raster.xml:4054 8291#, no-c-format 8292msgid "" 8293"<funcprototype> <funcdef>setof record <function>ST_DumpValues</function></" 8294"funcdef> <paramdef> <type>raster </type> <parameter>rast</parameter> </" 8295"paramdef> <paramdef> <type>integer[] </type> <parameter>nband=NULL</" 8296"parameter> </paramdef> <paramdef> <type>boolean </type> " 8297"<parameter>exclude_nodata_value=true</parameter> </paramdef> </" 8298"funcprototype> <funcprototype> <funcdef>double precision[][] " 8299"<function>ST_DumpValues</function></funcdef> <paramdef> <type>raster </type> " 8300"<parameter>rast</parameter> </paramdef> <paramdef> <type>integer </type> " 8301"<parameter>nband</parameter> </paramdef> <paramdef> <type>boolean </type> " 8302"<parameter>exclude_nodata_value=true</parameter> </paramdef> </funcprototype>" 8303msgstr "" 8304 8305#. Tag: para 8306#: reference_raster.xml:4085 8307#, no-c-format 8308msgid "" 8309"Get the values of the specified band as a 2-dimension array (first index is " 8310"row, second is column). If <varname>nband</varname> is NULL or not provided, " 8311"all raster bands are processed." 8312msgstr "" 8313 8314#. Tag: programlisting 8315#: reference_raster.xml:4095 8316#, no-c-format 8317msgid "" 8318"WITH foo AS (\n" 8319" SELECT ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, " 8320"0, 1, -1, 0, 0, 0), 1, '8BUI'::text, 1, 0), 2, '32BF'::text, 3, -9999), 3, " 8321"'16BSI', 0, 0) AS rast\n" 8322")\n" 8323"SELECT\n" 8324" (ST_DumpValues(rast)).*\n" 8325"FROM foo;\n" 8326"\n" 8327" nband | valarray\n" 8328"-------+------------------------------------------------------\n" 8329" 1 | {{1,1,1},{1,1,1},{1,1,1}}\n" 8330" 2 | {{3,3,3},{3,3,3},{3,3,3}}\n" 8331" 3 | {{NULL,NULL,NULL},{NULL,NULL,NULL},{NULL,NULL,NULL}}\n" 8332"(3 rows)" 8333msgstr "" 8334 8335#. Tag: programlisting 8336#: reference_raster.xml:4097 8337#, no-c-format 8338msgid "" 8339"WITH foo AS (\n" 8340" SELECT ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, " 8341"0, 1, -1, 0, 0, 0), 1, '8BUI'::text, 1, 0), 2, '32BF'::text, 3, -9999), 3, " 8342"'16BSI', 0, 0) AS rast\n" 8343")\n" 8344"SELECT\n" 8345" (ST_DumpValues(rast, ARRAY[3, 1])).*\n" 8346"FROM foo;\n" 8347"\n" 8348" nband | valarray\n" 8349"-------+------------------------------------------------------\n" 8350" 3 | {{NULL,NULL,NULL},{NULL,NULL,NULL},{NULL,NULL,NULL}}\n" 8351" 1 | {{1,1,1},{1,1,1},{1,1,1}}\n" 8352"(2 rows)" 8353msgstr "" 8354 8355#. Tag: programlisting 8356#: reference_raster.xml:4098 8357#, no-c-format 8358msgid "" 8359"WITH foo AS (\n" 8360" SELECT ST_SetValue(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, " 8361"0, 0, 0), 1, '8BUI', 1, 0), 1, 2, 5) AS rast\n" 8362")\n" 8363"SELECT\n" 8364" (ST_DumpValues(rast, 1))[2][1]\n" 8365"FROM foo;\n" 8366"\n" 8367" st_dumpvalues\n" 8368"---------------\n" 8369" 5\n" 8370"(1 row)" 8371msgstr "" 8372 8373#. Tag: para 8374#: reference_raster.xml:4103 8375#, no-c-format 8376msgid "" 8377", <xref linkend=\"RT_ST_SetValue\"/>, <xref linkend=\"RT_ST_SetValues\"/>" 8378msgstr "" 8379 8380#. Tag: refname 8381#: reference_raster.xml:4114 8382#, no-c-format 8383msgid "ST_PixelOfValue" 8384msgstr "ST_PixelOfValue" 8385 8386#. Tag: refpurpose 8387#: reference_raster.xml:4115 8388#, no-c-format 8389msgid "" 8390"Get the columnx, rowy coordinates of the pixel whose value equals the search " 8391"value." 8392msgstr "" 8393 8394#. Tag: funcsynopsis 8395#: reference_raster.xml:4121 8396#, no-c-format 8397msgid "" 8398"<funcprototype> <funcdef>setof record <function>ST_PixelOfValue</function></" 8399"funcdef> <paramdef> <type>raster </type> <parameter>rast</parameter> </" 8400"paramdef> <paramdef> <type>integer </type> <parameter>nband</parameter> </" 8401"paramdef> <paramdef> <type>double precision[] </type> <parameter>search</" 8402"parameter> </paramdef> <paramdef> <type>boolean </type> " 8403"<parameter>exclude_nodata_value=true</parameter> </paramdef> </" 8404"funcprototype> <funcprototype> <funcdef>setof record " 8405"<function>ST_PixelOfValue</function></funcdef> <paramdef> <type>raster </" 8406"type> <parameter>rast</parameter> </paramdef> <paramdef> <type>double " 8407"precision[] </type> <parameter>search</parameter> </paramdef> <paramdef> " 8408"<type>boolean </type> <parameter>exclude_nodata_value=true</parameter> </" 8409"paramdef> </funcprototype> <funcprototype> <funcdef>setof record " 8410"<function>ST_PixelOfValue</function></funcdef> <paramdef> <type>raster </" 8411"type> <parameter>rast</parameter> </paramdef> <paramdef> <type>integer </" 8412"type> <parameter>nband</parameter> </paramdef> <paramdef> <type>double " 8413"precision </type> <parameter>search</parameter> </paramdef> <paramdef> " 8414"<type>boolean </type> <parameter>exclude_nodata_value=true</parameter> </" 8415"paramdef> </funcprototype> <funcprototype> <funcdef>setof record " 8416"<function>ST_PixelOfValue</function></funcdef> <paramdef> <type>raster </" 8417"type> <parameter>rast</parameter> </paramdef> <paramdef> <type>double " 8418"precision </type> <parameter>search</parameter> </paramdef> <paramdef> " 8419"<type>boolean </type> <parameter>exclude_nodata_value=true</parameter> </" 8420"paramdef> </funcprototype>" 8421msgstr "" 8422"<funcprototype> <funcdef>setof record <function>ST_PixelOfValue</function></" 8423"funcdef> <paramdef> <type>raster </type> <parameter>rast</parameter> </" 8424"paramdef> <paramdef> <type>integer </type> <parameter>nband</parameter> </" 8425"paramdef> <paramdef> <type>double precision[] </type> <parameter>search</" 8426"parameter> </paramdef> <paramdef> <type>boolean </type> " 8427"<parameter>exclude_nodata_value=true</parameter> </paramdef> </" 8428"funcprototype> <funcprototype> <funcdef>setof record " 8429"<function>ST_PixelOfValue</function></funcdef> <paramdef> <type>raster </" 8430"type> <parameter>rast</parameter> </paramdef> <paramdef> <type>double " 8431"precision[] </type> <parameter>search</parameter> </paramdef> <paramdef> " 8432"<type>boolean </type> <parameter>exclude_nodata_value=true</parameter> </" 8433"paramdef> </funcprototype> <funcprototype> <funcdef>setof record " 8434"<function>ST_PixelOfValue</function></funcdef> <paramdef> <type>raster </" 8435"type> <parameter>rast</parameter> </paramdef> <paramdef> <type>integer </" 8436"type> <parameter>nband</parameter> </paramdef> <paramdef> <type>double " 8437"precision </type> <parameter>search</parameter> </paramdef> <paramdef> " 8438"<type>boolean </type> <parameter>exclude_nodata_value=true</parameter> </" 8439"paramdef> </funcprototype> <funcprototype> <funcdef>setof record " 8440"<function>ST_PixelOfValue</function></funcdef> <paramdef> <type>raster </" 8441"type> <parameter>rast</parameter> </paramdef> <paramdef> <type>double " 8442"precision </type> <parameter>search</parameter> </paramdef> <paramdef> " 8443"<type>boolean </type> <parameter>exclude_nodata_value=true</parameter> </" 8444"paramdef> </funcprototype>" 8445 8446#. Tag: para 8447#: reference_raster.xml:4182 8448#, no-c-format 8449msgid "" 8450"Get the columnx, rowy coordinates of the pixel whose value equals the search " 8451"value. If no band is specified, then band 1 is assumed." 8452msgstr "" 8453 8454#. Tag: programlisting 8455#: reference_raster.xml:4191 8456#, no-c-format 8457msgid "" 8458"SELECT\n" 8459" (pixels).*\n" 8460"FROM (\n" 8461" SELECT\n" 8462" ST_PixelOfValue(\n" 8463" ST_SetValue(\n" 8464" ST_SetValue(\n" 8465" ST_SetValue(\n" 8466" ST_SetValue(\n" 8467" ST_SetValue(\n" 8468" ST_AddBand(\n" 8469" ST_MakeEmptyRaster(5, " 8470"5, -2, 2, 1, -1, 0, 0, 0),\n" 8471" '8BUI'::" 8472"text, 1, 0\n" 8473" ),\n" 8474" 1, 1, 0\n" 8475" ),\n" 8476" 2, 3, 0\n" 8477" ),\n" 8478" 3, 5, 0\n" 8479" ),\n" 8480" 4, 2, 0\n" 8481" ),\n" 8482" 5, 4, 255\n" 8483" )\n" 8484" , 1, ARRAY[1, 255]) AS pixels\n" 8485") AS foo\n" 8486"\n" 8487" val | x | y\n" 8488"-----+---+---\n" 8489" 1 | 1 | 2\n" 8490" 1 | 1 | 3\n" 8491" 1 | 1 | 4\n" 8492" 1 | 1 | 5\n" 8493" 1 | 2 | 1\n" 8494" 1 | 2 | 2\n" 8495" 1 | 2 | 4\n" 8496" 1 | 2 | 5\n" 8497" 1 | 3 | 1\n" 8498" 1 | 3 | 2\n" 8499" 1 | 3 | 3\n" 8500" 1 | 3 | 4\n" 8501" 1 | 4 | 1\n" 8502" 1 | 4 | 3\n" 8503" 1 | 4 | 4\n" 8504" 1 | 4 | 5\n" 8505" 1 | 5 | 1\n" 8506" 1 | 5 | 2\n" 8507" 1 | 5 | 3\n" 8508" 255 | 5 | 4\n" 8509" 1 | 5 | 5" 8510msgstr "" 8511 8512#. Tag: title 8513#: reference_raster.xml:4199 8514#, no-c-format 8515msgid "Raster Editors" 8516msgstr "" 8517 8518#. Tag: refname 8519#: reference_raster.xml:4203 8520#, no-c-format 8521msgid "ST_SetGeoReference" 8522msgstr "ST_SetGeoReference" 8523 8524#. Tag: refpurpose 8525#: reference_raster.xml:4204 8526#, no-c-format 8527msgid "" 8528"Set Georeference 6 georeference parameters in a single call. Numbers should " 8529"be separated by white space. Accepts inputs in GDAL or ESRI format. Default " 8530"is GDAL." 8531msgstr "" 8532 8533#. Tag: funcsynopsis 8534#: reference_raster.xml:4208 8535#, no-c-format 8536msgid "" 8537"<funcprototype> <funcdef>raster <function>ST_SetGeoReference</function></" 8538"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 8539"paramdef> <paramdef><type>text </type> <parameter>georefcoords</parameter></" 8540"paramdef> <paramdef choice=\"opt\"><type>text </type> " 8541"<parameter>format=GDAL</parameter></paramdef> </funcprototype> " 8542"<funcprototype> <funcdef>raster <function>ST_SetGeoReference</function></" 8543"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 8544"paramdef> <paramdef><type>double precision </type> <parameter>upperleftx</" 8545"parameter></paramdef> <paramdef><type>double precision </type> " 8546"<parameter>upperlefty</parameter></paramdef> <paramdef><type>double " 8547"precision </type> <parameter>scalex</parameter></paramdef> " 8548"<paramdef><type>double precision </type> <parameter>scaley</parameter></" 8549"paramdef> <paramdef><type>double precision </type> <parameter>skewx</" 8550"parameter></paramdef> <paramdef><type>double precision </type> " 8551"<parameter>skewy</parameter></paramdef> </funcprototype>" 8552msgstr "" 8553 8554#. Tag: para 8555#: reference_raster.xml:4234 8556#, no-c-format 8557msgid "" 8558"Set Georeference 6 georeference parameters in a single call. Accepts inputs " 8559"in 'GDAL' or 'ESRI' format. Default is GDAL. If 6 coordinates are not " 8560"provided will return null." 8561msgstr "" 8562 8563#. Tag: programlisting 8564#: reference_raster.xml:4237 8565#, no-c-format 8566msgid "scalex skewy skewx scaley upperleftx upperlefty" 8567msgstr "scalex skewy skewx scaley upperleftx upperlefty" 8568 8569#. Tag: programlisting 8570#: reference_raster.xml:4239 8571#, no-c-format 8572msgid "" 8573"scalex skewy skewx scaley upperleftx + scalex*0.5 upperlefty + scaley*0.5" 8574msgstr "" 8575"scalex skewy skewx scaley upperleftx + scalex*0.5 upperlefty + scaley*0.5" 8576 8577#. Tag: para 8578#: reference_raster.xml:4242 8579#, no-c-format 8580msgid "" 8581"If the raster has out-db bands, changing the georeference may result in " 8582"incorrect access of the band's externally stored data." 8583msgstr "" 8584 8585#. Tag: para 8586#: reference_raster.xml:4247 8587#, no-c-format 8588msgid "" 8589"Enhanced: 2.1.0 Addition of ST_SetGeoReference(raster, double " 8590"precision, ...) variant" 8591msgstr "" 8592 8593#. Tag: programlisting 8594#: reference_raster.xml:4254 8595#, no-c-format 8596msgid "" 8597"WITH foo AS (\n" 8598" SELECT ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, 0, 0) AS rast\n" 8599")\n" 8600"SELECT\n" 8601" 0 AS rid, (ST_Metadata(rast)).*\n" 8602"FROM foo\n" 8603"UNION ALL\n" 8604"SELECT\n" 8605" 1, (ST_Metadata(ST_SetGeoReference(rast, '10 0 0 -10 0.1 0.1', " 8606"'GDAL'))).*\n" 8607"FROM foo\n" 8608"UNION ALL\n" 8609"SELECT\n" 8610" 2, (ST_Metadata(ST_SetGeoReference(rast, '10 0 0 -10 5.1 -4.9', " 8611"'ESRI'))).*\n" 8612"FROM foo\n" 8613"UNION ALL\n" 8614"SELECT\n" 8615" 3, (ST_Metadata(ST_SetGeoReference(rast, 1, 1, 10, -10, 0.001, " 8616"0.001))).*\n" 8617"FROM foo\n" 8618"\n" 8619" rid | upperleftx | upperlefty | width | height | scalex | " 8620"scaley | skewx | skewy | srid | numbands\n" 8621"-----+--------------------+--------------------+-------+--------+--------" 8622"+--------+-------+-------+------+----------\n" 8623" 0 | 0 | 0 | 5 | 5 | 1 " 8624"| -1 | 0 | 0 | 0 | 0\n" 8625" 1 | 0.1 | 0.1 | 5 | 5 | 10 " 8626"| -10 | 0 | 0 | 0 | 0\n" 8627" 2 | 0.0999999999999996 | 0.0999999999999996 | 5 | 5 | 10 " 8628"| -10 | 0 | 0 | 0 | 0\n" 8629" 3 | 1 | 1 | 5 | 5 | 10 " 8630"| -10 | 0.001 | 0.001 | 0 | 0" 8631msgstr "" 8632 8633#. Tag: para 8634#: reference_raster.xml:4259 8635#, no-c-format 8636msgid "" 8637", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>, <xref " 8638"linkend=\"RT_ST_UpperLeftX\"/>, <xref linkend=\"RT_ST_UpperLeftY\"/>" 8639msgstr "" 8640", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>, <xref " 8641"linkend=\"RT_ST_UpperLeftX\"/>, <xref linkend=\"RT_ST_UpperLeftY\"/>" 8642 8643#. Tag: refname 8644#: reference_raster.xml:4265 8645#, no-c-format 8646msgid "ST_SetRotation" 8647msgstr "ST_SetRotation" 8648 8649#. Tag: refpurpose 8650#: reference_raster.xml:4266 8651#, no-c-format 8652msgid "Set the rotation of the raster in radian." 8653msgstr "" 8654 8655#. Tag: funcprototype 8656#: reference_raster.xml:4271 8657#, no-c-format 8658msgid "" 8659"<funcdef>float8 <function>ST_SetRotation</function></funcdef> " 8660"<paramdef><type>raster</type> <parameter>rast</parameter></paramdef> " 8661"<paramdef><type>float8</type> <parameter>rotation</parameter></paramdef>" 8662msgstr "" 8663"<funcdef>float8 <function>ST_SetRotation</function></funcdef> " 8664"<paramdef><type>raster</type> <parameter>rast</parameter></paramdef> " 8665"<paramdef><type>float8</type> <parameter>rotation</parameter></paramdef>" 8666 8667#. Tag: para 8668#: reference_raster.xml:4282 8669#, no-c-format 8670msgid "" 8671"Uniformly rotate the raster. Rotation is in radian. Refer to <ulink url=" 8672"\"http://en.wikipedia.org/wiki/World_file\">World File</ulink> for more " 8673"details." 8674msgstr "" 8675 8676#. Tag: programlisting 8677#: reference_raster.xml:4288 8678#, fuzzy, no-c-format 8679msgid "" 8680"SELECT\n" 8681" ST_ScaleX(rast1), ST_ScaleY(rast1), ST_SkewX(rast1), ST_SkewY(rast1),\n" 8682" ST_ScaleX(rast2), ST_ScaleY(rast2), ST_SkewX(rast2), ST_SkewY(rast2)\n" 8683"FROM (\n" 8684" SELECT ST_SetRotation(rast, 15) AS rast1, rast as rast2 FROM dummy_rast\n" 8685") AS foo;\n" 8686" st_scalex | st_scaley | st_skewx | " 8687"st_skewy | st_scalex | st_scaley | st_skewx | st_skewy\n" 8688"---------------------+---------------------+--------------------" 8689"+--------------------+-----------+-----------+----------+----------\n" 8690" -1.51937582571764 | -2.27906373857646 | 1.95086352047135 | " 8691"1.30057568031423 | 2 | 3 | 0 | 0\n" 8692" -0.0379843956429411 | -0.0379843956429411 | 0.0325143920078558 | " 8693"0.0325143920078558 | 0.05 | -0.05 | 0 | 0" 8694msgstr "" 8695"SELECT \n" 8696" ST_ScaleX(rast1), ST_ScaleY(rast1), ST_SkewX(rast1), ST_SkewY(rast1),\n" 8697" ST_ScaleX(rast2), ST_ScaleY(rast2), ST_SkewX(rast2), ST_SkewY(rast2) \n" 8698"FROM (\n" 8699" SELECT ST_SetRotation(rast, 15) AS rast1, rast as rast2 FROM dummy_rast\n" 8700") AS foo;\n" 8701" st_scalex | st_scaley | st_skewx | " 8702"st_skewy | st_scalex | st_scaley | st_skewx | st_skewy\n" 8703"---------------------+---------------------+--------------------" 8704"+--------------------+-----------+-----------+----------+----------\n" 8705" -1.51937582571764 | -2.27906373857646 | 1.95086352047135 | " 8706"1.30057568031423 | 2 | 3 | 0 | 0\n" 8707" -0.0379843956429411 | -0.0379843956429411 | 0.0325143920078558 | " 8708"0.0325143920078558 | 0.05 | -0.05 | 0 | 0" 8709 8710#. Tag: refname 8711#: reference_raster.xml:4301 8712#, no-c-format 8713msgid "ST_SetScale" 8714msgstr "ST_SetScale" 8715 8716#. Tag: refpurpose 8717#: reference_raster.xml:4302 8718#, no-c-format 8719msgid "" 8720"Sets the X and Y size of pixels in units of coordinate reference system. " 8721"Number units/pixel width/height." 8722msgstr "" 8723 8724#. Tag: funcsynopsis 8725#: reference_raster.xml:4306 8726#, no-c-format 8727msgid "" 8728"<funcprototype> <funcdef>raster <function>ST_SetScale</function></funcdef> " 8729"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 8730"<paramdef><type>float8 </type> <parameter>xy</parameter></paramdef> </" 8731"funcprototype> <funcprototype> <funcdef>raster <function>ST_SetScale</" 8732"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 8733"parameter></paramdef> <paramdef><type>float8 </type> <parameter>x</" 8734"parameter></paramdef> <paramdef><type>float8 </type> <parameter>y</" 8735"parameter></paramdef> </funcprototype>" 8736msgstr "" 8737"<funcprototype> <funcdef>raster <function>ST_SetScale</function></funcdef> " 8738"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 8739"<paramdef><type>float8 </type> <parameter>xy</parameter></paramdef> </" 8740"funcprototype> <funcprototype> <funcdef>raster <function>ST_SetScale</" 8741"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 8742"parameter></paramdef> <paramdef><type>float8 </type> <parameter>x</" 8743"parameter></paramdef> <paramdef><type>float8 </type> <parameter>y</" 8744"parameter></paramdef> </funcprototype>" 8745 8746#. Tag: para 8747#: reference_raster.xml:4325 8748#, no-c-format 8749msgid "" 8750"Sets the X and Y size of pixels in units of coordinate reference system. " 8751"Number units/pixel width/height. If only one unit passed in, assumed X and Y " 8752"are the same number." 8753msgstr "" 8754 8755#. Tag: para 8756#: reference_raster.xml:4328 8757#, no-c-format 8758msgid "" 8759"ST_SetScale is different from <xref linkend=\"RT_ST_Rescale\"/> in that " 8760"ST_SetScale do not resample the raster to match the raster extent. It only " 8761"changes the metadata (or georeference) of the raster to correct an " 8762"originally mis-specified scaling. ST_Rescale results in a raster having " 8763"different width and height computed to fit the geographic extent of the " 8764"input raster. ST_SetScale do not modify the width, nor the height of the " 8765"raster." 8766msgstr "" 8767 8768#. Tag: para 8769#: reference_raster.xml:4330 8770#, no-c-format 8771msgid "" 8772"Changed: 2.0.0 In WKTRaster versions this was called ST_SetPixelSize. This " 8773"was changed in 2.0.0." 8774msgstr "" 8775"Changed: 2.0.0 In WKTRaster versions this was called ST_SetPixelSize. This " 8776"was changed in 2.0.0." 8777 8778#. Tag: programlisting 8779#: reference_raster.xml:4336 8780#, fuzzy, no-c-format 8781msgid "" 8782"UPDATE dummy_rast\n" 8783" SET rast = ST_SetScale(rast, 1.5)\n" 8784"WHERE rid = 2;\n" 8785"\n" 8786"SELECT ST_ScaleX(rast) As pixx, ST_ScaleY(rast) As pixy, Box3D(rast) As " 8787"newbox\n" 8788"FROM dummy_rast\n" 8789"WHERE rid = 2;\n" 8790"\n" 8791" pixx | pixy | newbox\n" 8792"------+------+----------------------------------------------\n" 8793" 1.5 | 1.5 | BOX(3427927.75 5793244 0, 3427935.25 5793251.5 0)" 8794msgstr "" 8795"UPDATE dummy_rast \n" 8796" SET rast = ST_SetScale(rast, 1.5)\n" 8797"WHERE rid = 2;\n" 8798"\n" 8799"SELECT ST_ScaleX(rast) As pixx, ST_ScaleY(rast) As pixy, Box3D(rast) As " 8800"newbox\n" 8801"FROM dummy_rast\n" 8802"WHERE rid = 2;\n" 8803"\n" 8804" pixx | pixy | newbox\n" 8805"------+------+----------------------------------------------\n" 8806" 1.5 | 1.5 | BOX(3427927.75 5793244 0, 3427935.25 5793251.5 0)" 8807 8808#. Tag: programlisting 8809#: reference_raster.xml:4337 8810#, fuzzy, no-c-format 8811msgid "" 8812"UPDATE dummy_rast\n" 8813" SET rast = ST_SetScale(rast, 1.5, 0.55)\n" 8814"WHERE rid = 2;\n" 8815"\n" 8816"SELECT ST_ScaleX(rast) As pixx, ST_ScaleY(rast) As pixy, Box3D(rast) As " 8817"newbox\n" 8818"FROM dummy_rast\n" 8819"WHERE rid = 2;\n" 8820"\n" 8821" pixx | pixy | newbox\n" 8822"------+------+--------------------------------------------\n" 8823" 1.5 | 0.55 | BOX(3427927.75 5793244 0,3427935.25 5793247 0)" 8824msgstr "" 8825"UPDATE dummy_rast \n" 8826" SET rast = ST_SetScale(rast, 1.5, 0.55)\n" 8827"WHERE rid = 2;\n" 8828"\n" 8829"SELECT ST_ScaleX(rast) As pixx, ST_ScaleY(rast) As pixy, Box3D(rast) As " 8830"newbox\n" 8831"FROM dummy_rast\n" 8832"WHERE rid = 2;\n" 8833"\n" 8834" pixx | pixy | newbox\n" 8835"------+------+--------------------------------------------\n" 8836" 1.5 | 0.55 | BOX(3427927.75 5793244 0,3427935.25 5793247 0)" 8837 8838#. Tag: para 8839#: reference_raster.xml:4343 8840#, no-c-format 8841msgid ", <xref linkend=\"RT_ST_ScaleY\"/>, <xref linkend=\"RT_Box3D\"/>" 8842msgstr ", <xref linkend=\"RT_ST_ScaleY\"/>, <xref linkend=\"RT_Box3D\"/>" 8843 8844#. Tag: refname 8845#: reference_raster.xml:4349 8846#, no-c-format 8847msgid "ST_SetSkew" 8848msgstr "ST_SetSkew" 8849 8850#. Tag: refpurpose 8851#: reference_raster.xml:4350 8852#, no-c-format 8853msgid "" 8854"Sets the georeference X and Y skew (or rotation parameter). If only one is " 8855"passed in, sets X and Y to the same value." 8856msgstr "" 8857 8858#. Tag: funcsynopsis 8859#: reference_raster.xml:4354 8860#, no-c-format 8861msgid "" 8862"<funcprototype> <funcdef>raster <function>ST_SetSkew</function></funcdef> " 8863"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 8864"<paramdef><type>float8 </type> <parameter>skewxy</parameter></paramdef> </" 8865"funcprototype> <funcprototype> <funcdef>raster <function>ST_SetSkew</" 8866"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 8867"parameter></paramdef> <paramdef><type>float8 </type> <parameter>skewx</" 8868"parameter></paramdef> <paramdef><type>float8 </type> <parameter>skewy</" 8869"parameter></paramdef> </funcprototype>" 8870msgstr "" 8871 8872#. Tag: para 8873#: reference_raster.xml:4372 8874#, no-c-format 8875msgid "" 8876"Sets the georeference X and Y skew (or rotation parameter). If only one is " 8877"passed in, sets X and Y to the same value. Refer to <ulink url=\"http://en." 8878"wikipedia.org/wiki/World_file\">World File</ulink> for more details." 8879msgstr "" 8880 8881#. Tag: programlisting 8882#: reference_raster.xml:4379 8883#, fuzzy, no-c-format 8884msgid "" 8885"-- Example 1\n" 8886"UPDATE dummy_rast SET rast = ST_SetSkew(rast,1,2) WHERE rid = 1;\n" 8887"SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy,\n" 8888" ST_GeoReference(rast) as georef\n" 8889"FROM dummy_rast WHERE rid = 1;\n" 8890"\n" 8891"rid | skewx | skewy | georef\n" 8892"----+-------+-------+--------------\n" 8893" 1 | 1 | 2 | 2.0000000000\n" 8894" : 2.0000000000\n" 8895" : 1.0000000000\n" 8896" : 3.0000000000\n" 8897" : 0.5000000000\n" 8898" : 0.5000000000" 8899msgstr "" 8900"SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, \n" 8901" ST_GeoReference(rast) as georef\n" 8902"FROM dummy_rast;\n" 8903"\n" 8904" rid | skewx | skewy | georef\n" 8905"-----+-------+-------+--------------------\n" 8906" 1 | 0 | 0 | 2.0000000000\n" 8907" : 0.0000000000\n" 8908" : 0.0000000000\n" 8909" : 3.0000000000\n" 8910" : 0.5000000000\n" 8911" : 0.5000000000\n" 8912" :\n" 8913" 2 | 0 | 0 | 0.0500000000\n" 8914" : 0.0000000000\n" 8915" : 0.0000000000\n" 8916" : -0.0500000000\n" 8917" : 3427927.7500000000\n" 8918" : 5793244.0000000000" 8919 8920#. Tag: programlisting 8921#: reference_raster.xml:4381 8922#, fuzzy, no-c-format 8923msgid "" 8924"-- Example 2 set both to same number:\n" 8925"UPDATE dummy_rast SET rast = ST_SetSkew(rast,0) WHERE rid = 1;\n" 8926"SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy,\n" 8927" ST_GeoReference(rast) as georef\n" 8928"FROM dummy_rast WHERE rid = 1;\n" 8929"\n" 8930" rid | skewx | skewy | georef\n" 8931"-----+-------+-------+--------------\n" 8932" 1 | 0 | 0 | 2.0000000000\n" 8933" : 0.0000000000\n" 8934" : 0.0000000000\n" 8935" : 3.0000000000\n" 8936" : 0.5000000000\n" 8937" : 0.5000000000" 8938msgstr "" 8939"SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, \n" 8940" ST_GeoReference(rast) as georef\n" 8941"FROM dummy_rast;\n" 8942"\n" 8943" rid | skewx | skewy | georef\n" 8944"-----+-------+-------+--------------------\n" 8945" 1 | 0 | 0 | 2.0000000000\n" 8946" : 0.0000000000\n" 8947" : 0.0000000000\n" 8948" : 3.0000000000\n" 8949" : 0.5000000000\n" 8950" : 0.5000000000\n" 8951" :\n" 8952" 2 | 0 | 0 | 0.0500000000\n" 8953" : 0.0000000000\n" 8954" : 0.0000000000\n" 8955" : -0.0500000000\n" 8956" : 3427927.7500000000\n" 8957" : 5793244.0000000000" 8958 8959#. Tag: para 8960#: reference_raster.xml:4388 8961#, no-c-format 8962msgid "" 8963", <xref linkend=\"RT_ST_SetGeoReference\"/>, <xref linkend=\"RT_ST_SkewX\"/" 8964">, <xref linkend=\"RT_ST_SkewY\"/>" 8965msgstr "" 8966", <xref linkend=\"RT_ST_SetGeoReference\"/>, <xref linkend=\"RT_ST_SkewX\"/" 8967">, <xref linkend=\"RT_ST_SkewY\"/>" 8968 8969#. Tag: refname 8970#: reference_raster.xml:4394 8971#, no-c-format 8972msgid "ST_SetSRID" 8973msgstr "ST_SetSRID" 8974 8975#. Tag: refpurpose 8976#: reference_raster.xml:4396 8977#, no-c-format 8978msgid "" 8979"Sets the SRID of a raster to a particular integer srid defined in the " 8980"spatial_ref_sys table." 8981msgstr "" 8982 8983#. Tag: funcprototype 8984#: reference_raster.xml:4401 8985#, no-c-format 8986msgid "" 8987"<funcdef>raster <function>ST_SetSRID</function></funcdef> " 8988"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 8989"<paramdef><type>integer </type> <parameter>srid</parameter></paramdef>" 8990msgstr "" 8991"<funcdef>raster <function>ST_SetSRID</function></funcdef> " 8992"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 8993"<paramdef><type>integer </type> <parameter>srid</parameter></paramdef>" 8994 8995#. Tag: para 8996#: reference_raster.xml:4416 8997#, no-c-format 8998msgid "Sets the SRID on a raster to a particular integer value." 8999msgstr "" 9000 9001#. Tag: para 9002#: reference_raster.xml:4419 9003#, no-c-format 9004msgid "" 9005"This function does not transform the raster in any way - it simply sets meta " 9006"data defining the spatial ref of the coordinate reference system that it's " 9007"currently in. Useful for transformations later." 9008msgstr "" 9009 9010#. Tag: para 9011#: reference_raster.xml:4429 9012#, no-c-format 9013msgid ", <xref linkend=\"RT_ST_SRID\"/>" 9014msgstr ", <xref linkend=\"RT_ST_SRID\"/>" 9015 9016#. Tag: refname 9017#: reference_raster.xml:4436 9018#, no-c-format 9019msgid "ST_SetUpperLeft" 9020msgstr "ST_SetUpperLeft" 9021 9022#. Tag: refpurpose 9023#: reference_raster.xml:4437 9024#, no-c-format 9025msgid "" 9026"Sets the value of the upper left corner of the pixel of the raster to " 9027"projected X and Y coordinates." 9028msgstr "" 9029 9030#. Tag: funcprototype 9031#: reference_raster.xml:4442 9032#, no-c-format 9033msgid "" 9034"<funcdef>raster <function>ST_SetUpperLeft</function></funcdef> " 9035"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9036"<paramdef><type>double precision </type> <parameter>x</parameter></paramdef> " 9037"<paramdef><type>double precision </type> <parameter>y</parameter></paramdef>" 9038msgstr "" 9039"<funcdef>raster <function>ST_SetUpperLeft</function></funcdef> " 9040"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9041"<paramdef><type>double precision </type> <parameter>x</parameter></paramdef> " 9042"<paramdef><type>double precision </type> <parameter>y</parameter></paramdef>" 9043 9044#. Tag: para 9045#: reference_raster.xml:4454 9046#, no-c-format 9047msgid "" 9048"Set the value of the upper left corner of raster to the projected X and Y " 9049"coordinates" 9050msgstr "" 9051 9052#. Tag: programlisting 9053#: reference_raster.xml:4460 9054#, fuzzy, no-c-format 9055msgid "" 9056"SELECT ST_SetUpperLeft(rast,-71.01,42.37)\n" 9057"FROM dummy_rast\n" 9058"WHERE rid = 2;" 9059msgstr "" 9060"SELECT ST_SetUpperLeft(rast,-71.01,42.37) \n" 9061"FROM dummy_rast\n" 9062"WHERE rid = 2;" 9063 9064#. Tag: para 9065#: reference_raster.xml:4466 9066#, no-c-format 9067msgid ", <xref linkend=\"RT_ST_UpperLeftY\"/>" 9068msgstr ", <xref linkend=\"RT_ST_UpperLeftY\"/>" 9069 9070#. Tag: refname 9071#: reference_raster.xml:4472 9072#, no-c-format 9073msgid "ST_Resample" 9074msgstr "ST_Resample" 9075 9076#. Tag: refpurpose 9077#: reference_raster.xml:4473 9078#, no-c-format 9079msgid "" 9080"Resample a raster using a specified resampling algorithm, new dimensions, an " 9081"arbitrary grid corner and a set of raster georeferencing attributes defined " 9082"or borrowed from another raster." 9083msgstr "" 9084 9085#. Tag: funcsynopsis 9086#: reference_raster.xml:4479 9087#, no-c-format 9088msgid "" 9089"<funcprototype> <funcdef>raster <function>ST_Resample</function></funcdef> " 9090"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9091"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 9092"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 9093"<paramdef choice=\"opt\"><type>double precision </type> " 9094"<parameter>gridx=NULL</parameter></paramdef> <paramdef choice=\"opt" 9095"\"><type>double precision </type> <parameter>gridy=NULL</parameter></" 9096"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 9097"<parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 9098"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 9099"<paramdef choice=\"opt\"><type>text </type> " 9100"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9101"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9102"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9103"<function>ST_Resample</function></funcdef> <paramdef><type>raster </type> " 9104"<parameter>rast</parameter></paramdef> <paramdef choice=\"opt\"><type>double " 9105"precision </type> <parameter>scalex=0</parameter></paramdef> <paramdef " 9106"choice=\"opt\"><type>double precision </type> <parameter>scaley=0</" 9107"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9108"type> <parameter>gridx=NULL</parameter></paramdef> <paramdef choice=\"opt" 9109"\"><type>double precision </type> <parameter>gridy=NULL</parameter></" 9110"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 9111"<parameter>skewx=0</parameter></paramdef> <paramdef choice=\"opt" 9112"\"><type>double precision </type> <parameter>skewy=0</parameter></paramdef> " 9113"<paramdef choice=\"opt\"><type>text </type> " 9114"<parameter>algorithm=NearestNeighbor</parameter></paramdef> <paramdef choice=" 9115"\"opt\"><type>double precision </type> <parameter>maxerr=0.125</parameter></" 9116"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9117"<function>ST_Resample</function></funcdef> <paramdef><type>raster </type> " 9118"<parameter>rast</parameter></paramdef> <paramdef><type>raster </type> " 9119"<parameter>ref</parameter></paramdef> <paramdef choice=\"opt\"><type>text </" 9120"type> <parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9121"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9122"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 9123"<parameter>usescale=true</parameter></paramdef> </funcprototype> " 9124"<funcprototype> <funcdef>raster <function>ST_Resample</function></funcdef> " 9125"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9126"<paramdef><type>raster </type> <parameter>ref</parameter></paramdef> " 9127"<paramdef><type>boolean </type> <parameter>usescale</parameter></paramdef> " 9128"<paramdef choice=\"opt\"><type>text </type> " 9129"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9130"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9131"parameter></paramdef> </funcprototype>" 9132msgstr "" 9133 9134#. Tag: para 9135#: reference_raster.xml:4529 9136#, no-c-format 9137msgid "" 9138"Resample a raster using a specified resampling algorithm, new dimensions " 9139"(width & height), a grid corner (gridx & gridy) and a set of raster " 9140"georeferencing attributes (scalex, scaley, skewx & skewy) defined or " 9141"borrowed from another raster. If using a reference raster, the two rasters " 9142"must have the same SRID." 9143msgstr "" 9144 9145#. Tag: para 9146#: reference_raster.xml:4533 9147#, no-c-format 9148msgid "" 9149"New pixel values are computed using the NearestNeighbor (English or American " 9150"spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. " 9151"Default is NearestNeighbor which is the fastest but produce the worst " 9152"interpolation." 9153msgstr "" 9154 9155#. Tag: para 9156#: reference_raster.xml:4537 9157#, no-c-format 9158msgid "" 9159"A maxerror percent of 0.125 is used if no <varname>maxerr</varname> is " 9160"specified." 9161msgstr "" 9162 9163#. Tag: para 9164#: reference_raster.xml:4542 reference_raster.xml:4606 9165#: reference_raster.xml:4674 reference_raster.xml:4752 9166#, no-c-format 9167msgid "" 9168"Refer to: <ulink url=\"http://www.gdal.org/gdalwarp.html\">GDAL Warp " 9169"resampling methods</ulink> for more details." 9170msgstr "" 9171 9172#. Tag: para 9173#: reference_raster.xml:4546 reference_raster.xml:4610 9174#: reference_raster.xml:4678 reference_raster.xml:4756 9175#: reference_raster.xml:4912 9176#, no-c-format 9177msgid "Availability: 2.0.0 Requires GDAL 1.6.1+" 9178msgstr "" 9179 9180#. Tag: para 9181#: reference_raster.xml:4547 9182#, no-c-format 9183msgid "" 9184"Changed: 2.1.0 Parameter srid removed. Variants with a reference raster no " 9185"longer applies the reference raster's SRID. Use ST_Transform() to reproject " 9186"raster. Works on rasters with no SRID." 9187msgstr "" 9188 9189#. Tag: programlisting 9190#: reference_raster.xml:4553 9191#, fuzzy, no-c-format 9192msgid "" 9193"SELECT\n" 9194" ST_Width(orig) AS orig_width,\n" 9195" ST_Width(reduce_100) AS new_width\n" 9196"FROM (\n" 9197" SELECT\n" 9198" rast AS orig,\n" 9199" ST_Resample(rast,100,100) AS reduce_100\n" 9200" FROM aerials.boston\n" 9201" WHERE ST_Intersects(rast,\n" 9202" ST_Transform(\n" 9203" ST_MakeEnvelope(-71.128, 42.2392,-71.1277, 42.2397, " 9204"4326),26986)\n" 9205" )\n" 9206" LIMIT 1\n" 9207") AS foo;\n" 9208"\n" 9209" orig_width | new_width\n" 9210"------------+-------------\n" 9211" 200 | 100" 9212msgstr "" 9213"SELECT ST_Width(mass_stm) As w_before, ST_Width(wgs_84) As w_after,\n" 9214" ST_Height(mass_stm) As h_before, ST_Height(wgs_84) As h_after\n" 9215" FROM \n" 9216" ( SELECT rast As mass_stm, ST_Transform(rast,4326) As wgs_84\n" 9217" , ST_Transform(rast,4326, 'Bilinear') AS wgs_84_bilin\n" 9218" FROM aerials.o_2_boston \n" 9219" WHERE ST_Intersects(rast,\n" 9220" ST_Transform(ST_MakeEnvelope(-71.128, " 9221"42.2392,-71.1277, 42.2397, 4326),26986) )\n" 9222" LIMIT 1) As foo;\n" 9223" \n" 9224" w_before | w_after | h_before | h_after\n" 9225"----------+---------+----------+---------\n" 9226" 200 | 228 | 200 | 170" 9227 9228#. Tag: para 9229#: reference_raster.xml:4558 9230#, no-c-format 9231msgid ", <xref linkend=\"RT_ST_Resize\"/>, <xref linkend=\"RT_ST_Transform\"/>" 9232msgstr "" 9233 9234#. Tag: refname 9235#: reference_raster.xml:4568 9236#, no-c-format 9237msgid "ST_Rescale" 9238msgstr "ST_Rescale" 9239 9240#. Tag: refpurpose 9241#: reference_raster.xml:4569 9242#, no-c-format 9243msgid "" 9244"Resample a raster by adjusting only its scale (or pixel size). New pixel " 9245"values are computed using the NearestNeighbor (english or american " 9246"spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. " 9247"Default is NearestNeighbor." 9248msgstr "" 9249 9250#. Tag: funcsynopsis 9251#: reference_raster.xml:4574 9252#, no-c-format 9253msgid "" 9254"<funcprototype> <funcdef>raster <function>ST_Rescale</function></funcdef> " 9255"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9256"<paramdef><type>double precision </type> <parameter>scalexy</parameter></" 9257"paramdef> <paramdef choice=\"opt\"><type>text </type> " 9258"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9259"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9260"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9261"<function>ST_Rescale</function></funcdef> <paramdef><type>raster </type> " 9262"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9263"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 9264"precision </type> <parameter>scaley</parameter></paramdef> <paramdef choice=" 9265"\"opt\"><type>text </type> <parameter>algorithm=NearestNeighbour</" 9266"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9267"type> <parameter>maxerr=0.125</parameter></paramdef> </funcprototype>" 9268msgstr "" 9269"<funcprototype> <funcdef>raster <function>ST_Rescale</function></funcdef> " 9270"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9271"<paramdef><type>double precision </type> <parameter>scalexy</parameter></" 9272"paramdef> <paramdef choice=\"opt\"><type>text </type> " 9273"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9274"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9275"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9276"<function>ST_Rescale</function></funcdef> <paramdef><type>raster </type> " 9277"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9278"type> <parameter>scalex</parameter></paramdef> <paramdef><type>double " 9279"precision </type> <parameter>scaley</parameter></paramdef> <paramdef choice=" 9280"\"opt\"><type>text </type> <parameter>algorithm=NearestNeighbour</" 9281"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9282"type> <parameter>maxerr=0.125</parameter></paramdef> </funcprototype>" 9283 9284#. Tag: para 9285#: reference_raster.xml:4598 9286#, no-c-format 9287msgid "" 9288"Resample a raster by adjusting only its scale (or pixel size). New pixel " 9289"values are computed using the NearestNeighbor (english or american " 9290"spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. The " 9291"default is NearestNeighbor which is the fastest but results in the worst " 9292"interpolation." 9293msgstr "" 9294 9295#. Tag: para 9296#: reference_raster.xml:4600 9297#, no-c-format 9298msgid "" 9299"<varname>scalex</varname> and <varname>scaley</varname> define the new pixel " 9300"size. scaley must often be negative to get well oriented raster." 9301msgstr "" 9302 9303#. Tag: para 9304#: reference_raster.xml:4602 9305#, no-c-format 9306msgid "" 9307"When the new scalex or scaley is not a divisor of the raster width or " 9308"height, the extent of the resulting raster is expanded to encompass the " 9309"extent of the provided raster. If you want to be sure to retain exact input " 9310"extent see <xref linkend=\"RT_ST_Resize\"/>" 9311msgstr "" 9312 9313#. Tag: para 9314#: reference_raster.xml:4604 9315#, no-c-format 9316msgid "" 9317"<varname>maxerr</varname> is the threshold for transformation approximation " 9318"by the resampling algorithm (in pixel units). A default of 0.125 is used if " 9319"no <varname>maxerr</varname> is specified, which is the same value used in " 9320"GDAL gdalwarp utility. If set to zero, no approximation takes place." 9321msgstr "" 9322 9323#. Tag: para 9324#: reference_raster.xml:4608 9325#, no-c-format 9326msgid "" 9327"ST_Rescale is different from <xref linkend=\"RT_ST_SetScale\"/> in that " 9328"ST_SetScale do not resample the raster to match the raster extent. " 9329"ST_SetScale only changes the metadata (or georeference) of the raster to " 9330"correct an originally mis-specified scaling. ST_Rescale results in a raster " 9331"having different width and height computed to fit the geographic extent of " 9332"the input raster. ST_SetScale do not modify the width, nor the height of the " 9333"raster." 9334msgstr "" 9335 9336#. Tag: para 9337#: reference_raster.xml:4611 reference_raster.xml:4679 9338#: reference_raster.xml:4757 9339#, no-c-format 9340msgid "Changed: 2.1.0 Works on rasters with no SRID" 9341msgstr "" 9342 9343#. Tag: para 9344#: reference_raster.xml:4616 9345#, no-c-format 9346msgid "" 9347"A simple example rescaling a raster from a pixel size of 0.001 degree to a " 9348"pixel size of 0.0015 degree." 9349msgstr "" 9350 9351#. Tag: programlisting 9352#: reference_raster.xml:4618 9353#, no-c-format 9354msgid "" 9355"-- the original raster pixel size\n" 9356"SELECT ST_PixelWidth(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 0.001, " 9357"-0.001, 0, 0, 4269), '8BUI'::text, 1, 0)) width\n" 9358"\n" 9359" width\n" 9360"----------\n" 9361"0.001\n" 9362"\n" 9363"-- the rescaled raster raster pixel size\n" 9364"SELECT ST_PixelWidth(ST_Rescale(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, " 9365"0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0), 0.0015)) width\n" 9366"\n" 9367" width\n" 9368"----------\n" 9369"0.0015" 9370msgstr "" 9371 9372#. Tag: para 9373#: reference_raster.xml:4623 9374#, no-c-format 9375msgid "" 9376", <xref linkend=\"RT_ST_Resample\"/>, <xref linkend=\"RT_ST_SetScale\"/>, " 9377"<xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>, <xref " 9378"linkend=\"RT_ST_Transform\"/>" 9379msgstr "" 9380 9381#. Tag: refname 9382#: reference_raster.xml:4636 9383#, no-c-format 9384msgid "ST_Reskew" 9385msgstr "ST_Reskew" 9386 9387#. Tag: refpurpose 9388#: reference_raster.xml:4637 9389#, no-c-format 9390msgid "" 9391"Resample a raster by adjusting only its skew (or rotation parameters). New " 9392"pixel values are computed using the NearestNeighbor (english or american " 9393"spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. " 9394"Default is NearestNeighbor." 9395msgstr "" 9396 9397#. Tag: funcsynopsis 9398#: reference_raster.xml:4642 9399#, no-c-format 9400msgid "" 9401"<funcprototype> <funcdef>raster <function>ST_Reskew</function></funcdef> " 9402"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9403"<paramdef><type>double precision </type> <parameter>skewxy</parameter></" 9404"paramdef> <paramdef choice=\"opt\"><type>text </type> " 9405"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9406"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9407"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9408"<function>ST_Reskew</function></funcdef> <paramdef><type>raster </type> " 9409"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9410"type> <parameter>skewx</parameter></paramdef> <paramdef><type>double " 9411"precision </type> <parameter>skewy</parameter></paramdef> <paramdef choice=" 9412"\"opt\"><type>text </type> <parameter>algorithm=NearestNeighbour</" 9413"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9414"type> <parameter>maxerr=0.125</parameter></paramdef> </funcprototype>" 9415msgstr "" 9416"<funcprototype> <funcdef>raster <function>ST_Reskew</function></funcdef> " 9417"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9418"<paramdef><type>double precision </type> <parameter>skewxy</parameter></" 9419"paramdef> <paramdef choice=\"opt\"><type>text </type> " 9420"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9421"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9422"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9423"<function>ST_Reskew</function></funcdef> <paramdef><type>raster </type> " 9424"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9425"type> <parameter>skewx</parameter></paramdef> <paramdef><type>double " 9426"precision </type> <parameter>skewy</parameter></paramdef> <paramdef choice=" 9427"\"opt\"><type>text </type> <parameter>algorithm=NearestNeighbour</" 9428"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9429"type> <parameter>maxerr=0.125</parameter></paramdef> </funcprototype>" 9430 9431#. Tag: para 9432#: reference_raster.xml:4666 9433#, no-c-format 9434msgid "" 9435"Resample a raster by adjusting only its skew (or rotation parameters). New " 9436"pixel values are computed using the NearestNeighbor (english or american " 9437"spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. The " 9438"default is NearestNeighbor which is the fastest but results in the worst " 9439"interpolation." 9440msgstr "" 9441 9442#. Tag: para 9443#: reference_raster.xml:4668 9444#, no-c-format 9445msgid "" 9446"<varname>skewx</varname> and <varname>skewy</varname> define the new skew." 9447msgstr "" 9448 9449#. Tag: para 9450#: reference_raster.xml:4670 reference_raster.xml:4748 9451#, no-c-format 9452msgid "" 9453"The extent of the new raster will encompass the extent of the provided " 9454"raster." 9455msgstr "" 9456 9457#. Tag: para 9458#: reference_raster.xml:4672 reference_raster.xml:4750 9459#, no-c-format 9460msgid "" 9461"A maxerror percent of 0.125 if no <varname>maxerr</varname> is specified." 9462msgstr "" 9463 9464#. Tag: para 9465#: reference_raster.xml:4676 9466#, no-c-format 9467msgid "" 9468"ST_Reskew is different from <xref linkend=\"RT_ST_SetSkew\"/> in that " 9469"ST_SetSkew do not resample the raster to match the raster extent. ST_SetSkew " 9470"only changes the metadata (or georeference) of the raster to correct an " 9471"originally mis-specified skew. ST_Reskew results in a raster having " 9472"different width and height computed to fit the geographic extent of the " 9473"input raster. ST_SetSkew do not modify the width, nor the height of the " 9474"raster." 9475msgstr "" 9476 9477#. Tag: para 9478#: reference_raster.xml:4684 9479#, no-c-format 9480msgid "" 9481"A simple example reskewing a raster from a skew of 0.0 to a skew of 0.0015." 9482msgstr "" 9483 9484#. Tag: programlisting 9485#: reference_raster.xml:4686 9486#, no-c-format 9487msgid "" 9488"-- the original raster non-rotated\n" 9489"SELECT ST_Rotation(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 0.001, " 9490"-0.001, 0, 0, 4269), '8BUI'::text, 1, 0));\n" 9491"\n" 9492"-- result\n" 9493"0\n" 9494"\n" 9495"-- the reskewed raster raster rotation\n" 9496"SELECT ST_Rotation(ST_Reskew(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, " 9497"0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0), 0.0015));\n" 9498"\n" 9499"-- result\n" 9500"-0.982793723247329" 9501msgstr "" 9502 9503#. Tag: para 9504#: reference_raster.xml:4692 9505#, no-c-format 9506msgid "" 9507", <xref linkend=\"RT_ST_Rescale\"/>, <xref linkend=\"RT_ST_SetSkew\"/>, " 9508"<xref linkend=\"RT_ST_SetRotation\"/>, <xref linkend=\"RT_ST_SkewX\"/>, " 9509"<xref linkend=\"RT_ST_SkewY\"/>, <xref linkend=\"RT_ST_Transform\"/>" 9510msgstr "" 9511", <xref linkend=\"RT_ST_Rescale\"/>, <xref linkend=\"RT_ST_SetSkew\"/>, " 9512"<xref linkend=\"RT_ST_SetRotation\"/>, <xref linkend=\"RT_ST_SkewX\"/>, " 9513"<xref linkend=\"RT_ST_SkewY\"/>, <xref linkend=\"RT_ST_Transform\"/>" 9514 9515#. Tag: refname 9516#: reference_raster.xml:4698 9517#, no-c-format 9518msgid "ST_SnapToGrid" 9519msgstr "ST_SnapToGrid" 9520 9521#. Tag: refpurpose 9522#: reference_raster.xml:4699 9523#, no-c-format 9524msgid "" 9525"Resample a raster by snapping it to a grid. New pixel values are computed " 9526"using the NearestNeighbor (english or american spelling), Bilinear, Cubic, " 9527"CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor." 9528msgstr "" 9529 9530#. Tag: funcsynopsis 9531#: reference_raster.xml:4704 9532#, no-c-format 9533msgid "" 9534"<funcprototype> <funcdef>raster <function>ST_SnapToGrid</function></funcdef> " 9535"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9536"<paramdef><type>double precision </type> <parameter>gridx</parameter></" 9537"paramdef> <paramdef><type>double precision </type> <parameter>gridy</" 9538"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 9539"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9540"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9541"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9542"type> <parameter>scalex=DEFAULT 0</parameter></paramdef> <paramdef choice=" 9543"\"opt\"><type>double precision </type> <parameter>scaley=DEFAULT 0</" 9544"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9545"<function>ST_SnapToGrid</function></funcdef> <paramdef><type>raster </type> " 9546"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9547"type> <parameter>gridx</parameter></paramdef> <paramdef><type>double " 9548"precision </type> <parameter>gridy</parameter></paramdef> " 9549"<paramdef><type>double precision </type> <parameter>scalex</parameter></" 9550"paramdef> <paramdef><type>double precision </type> <parameter>scaley</" 9551"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 9552"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9553"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9554"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9555"<function>ST_SnapToGrid</function></funcdef> <paramdef><type>raster </type> " 9556"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9557"type> <parameter>gridx</parameter></paramdef> <paramdef><type>double " 9558"precision </type> <parameter>gridy</parameter></paramdef> " 9559"<paramdef><type>double precision </type> <parameter>scalexy</parameter></" 9560"paramdef> <paramdef choice=\"opt\"><type>text </type> " 9561"<parameter>algorithm=NearestNeighbour</parameter></paramdef> <paramdef " 9562"choice=\"opt\"><type>double precision </type> <parameter>maxerr=0.125</" 9563"parameter></paramdef> </funcprototype>" 9564msgstr "" 9565 9566#. Tag: para 9567#: reference_raster.xml:4743 9568#, no-c-format 9569msgid "" 9570"Resample a raster by snapping it to a grid defined by an arbitrary pixel " 9571"corner (gridx & gridy) and optionally a pixel size (scalex & " 9572"scaley). New pixel values are computed using the NearestNeighbor (english or " 9573"american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling " 9574"algorithm. The default is NearestNeighbor which is the fastest but results " 9575"in the worst interpolation." 9576msgstr "" 9577 9578#. Tag: para 9579#: reference_raster.xml:4745 9580#, no-c-format 9581msgid "" 9582"<varname>gridx</varname> and <varname>gridy</varname> define any arbitrary " 9583"pixel corner of the new grid. This is not necessarily the upper left corner " 9584"of the new raster and it does not have to be inside or on the edge of the " 9585"new raster extent." 9586msgstr "" 9587 9588#. Tag: para 9589#: reference_raster.xml:4747 9590#, no-c-format 9591msgid "" 9592"You can optionally define the pixel size of the new grid with " 9593"<varname>scalex</varname> and <varname>scaley</varname>." 9594msgstr "" 9595 9596#. Tag: para 9597#: reference_raster.xml:4754 9598#, no-c-format 9599msgid "" 9600"Use <xref linkend=\"RT_ST_Resample\"/> if you need more control over the " 9601"grid parameters." 9602msgstr "" 9603 9604#. Tag: para 9605#: reference_raster.xml:4762 9606#, no-c-format 9607msgid "A simple example snapping a raster to a slightly different grid." 9608msgstr "" 9609 9610#. Tag: programlisting 9611#: reference_raster.xml:4764 9612#, no-c-format 9613msgid "" 9614"-- the original raster upper left X\n" 9615"SELECT ST_UpperLeftX(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 0.001, " 9616"-0.001, 0, 0, 4269), '8BUI'::text, 1, 0));\n" 9617"-- result\n" 9618"0\n" 9619"\n" 9620"-- the upper left of raster after snapping\n" 9621"SELECT ST_UpperLeftX(ST_SnapToGrid(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, " 9622"0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0), 0.0002, 0.0002));\n" 9623"\n" 9624"--result\n" 9625"-0.0008" 9626msgstr "" 9627 9628#. Tag: para 9629#: reference_raster.xml:4770 9630#, no-c-format 9631msgid "" 9632", <xref linkend=\"RT_ST_Rescale\"/>, <xref linkend=\"RT_ST_UpperLeftX\"/>, " 9633"<xref linkend=\"RT_ST_UpperLeftY\"/>" 9634msgstr "" 9635", <xref linkend=\"RT_ST_Rescale\"/>, <xref linkend=\"RT_ST_UpperLeftX\"/>, " 9636"<xref linkend=\"RT_ST_UpperLeftY\"/>" 9637 9638#. Tag: refname 9639#: reference_raster.xml:4776 9640#, no-c-format 9641msgid "ST_Resize" 9642msgstr "" 9643 9644#. Tag: refpurpose 9645#: reference_raster.xml:4777 9646#, no-c-format 9647msgid "Resize a raster to a new width/height" 9648msgstr "" 9649 9650#. Tag: funcsynopsis 9651#: reference_raster.xml:4781 9652#, no-c-format 9653msgid "" 9654"<funcprototype> <funcdef>raster <function>ST_Resize</function></funcdef> " 9655"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9656"<paramdef><type>integer </type> <parameter>width</parameter></paramdef> " 9657"<paramdef><type>integer </type> <parameter>height</parameter></paramdef> " 9658"<paramdef choice=\"opt\"><type>text </type> " 9659"<parameter>algorithm=NearestNeighbor</parameter></paramdef> <paramdef choice=" 9660"\"opt\"><type>double precision </type> <parameter>maxerr=0.125</parameter></" 9661"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 9662"<function>ST_Resize</function></funcdef> <paramdef><type>raster </type> " 9663"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 9664"type> <parameter>percentwidth</parameter></paramdef> <paramdef><type>double " 9665"precision </type> <parameter>percentheight</parameter></paramdef> <paramdef " 9666"choice=\"opt\"><type>text </type> <parameter>algorithm=NearestNeighbor</" 9667"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 9668"type> <parameter>maxerr=0.125</parameter></paramdef> </funcprototype> " 9669"<funcprototype> <funcdef>raster <function>ST_Resize</function></funcdef> " 9670"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9671"<paramdef><type>text </type> <parameter>width</parameter></paramdef> " 9672"<paramdef><type>text </type> <parameter>height</parameter></paramdef> " 9673"<paramdef choice=\"opt\"><type>text </type> " 9674"<parameter>algorithm=NearestNeighbor</parameter></paramdef> <paramdef choice=" 9675"\"opt\"><type>double precision </type> <parameter>maxerr=0.125</parameter></" 9676"paramdef> </funcprototype>" 9677msgstr "" 9678 9679#. Tag: para 9680#: reference_raster.xml:4815 9681#, no-c-format 9682msgid "" 9683"Resize a raster to a new width/height. The new width/height can be specified " 9684"in exact number of pixels or a percentage of the raster's width/height. The " 9685"extent of the the new raster will be the same as the extent of the provided " 9686"raster." 9687msgstr "" 9688 9689#. Tag: para 9690#: reference_raster.xml:4819 9691#, no-c-format 9692msgid "" 9693"New pixel values are computed using the NearestNeighbor (english or american " 9694"spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. The " 9695"default is NearestNeighbor which is the fastest but results in the worst " 9696"interpolation." 9697msgstr "" 9698 9699#. Tag: para 9700#: reference_raster.xml:4823 9701#, no-c-format 9702msgid "Variant 1 expects the actual width/height of the output raster." 9703msgstr "" 9704 9705#. Tag: para 9706#: reference_raster.xml:4827 9707#, no-c-format 9708msgid "" 9709"Variant 2 expects decimal values between zero (0) and one (1) indicating the " 9710"percentage of the input raster's width/height." 9711msgstr "" 9712 9713#. Tag: para 9714#: reference_raster.xml:4831 9715#, no-c-format 9716msgid "" 9717"Variant 3 takes either the actual width/height of the output raster or a " 9718"textual percentage (\"20%\") indicating the percentage of the input raster's " 9719"width/height." 9720msgstr "" 9721 9722#. Tag: para 9723#: reference_raster.xml:4835 9724#, no-c-format 9725msgid "Availability: 2.1.0 Requires GDAL 1.6.1+" 9726msgstr "" 9727 9728#. Tag: programlisting 9729#: reference_raster.xml:4839 9730#, no-c-format 9731msgid "" 9732"WITH foo AS(\n" 9733"SELECT\n" 9734" 1 AS rid,\n" 9735" ST_Resize(\n" 9736" ST_AddBand(\n" 9737" ST_MakeEmptyRaster(1000, 1000, 0, 0, 1, -1, 0, 0, " 9738"0)\n" 9739" , 1, '8BUI', 255, 0\n" 9740" )\n" 9741" , '50%', '500') AS rast\n" 9742"UNION ALL\n" 9743"SELECT\n" 9744" 2 AS rid,\n" 9745" ST_Resize(\n" 9746" ST_AddBand(\n" 9747" ST_MakeEmptyRaster(1000, 1000, 0, 0, 1, -1, 0, 0, " 9748"0)\n" 9749" , 1, '8BUI', 255, 0\n" 9750" )\n" 9751" , 500, 100) AS rast\n" 9752"UNION ALL\n" 9753"SELECT\n" 9754" 3 AS rid,\n" 9755" ST_Resize(\n" 9756" ST_AddBand(\n" 9757" ST_MakeEmptyRaster(1000, 1000, 0, 0, 1, -1, 0, 0, " 9758"0)\n" 9759" , 1, '8BUI', 255, 0\n" 9760" )\n" 9761" , 0.25, 0.9) AS rast\n" 9762"), bar AS (\n" 9763" SELECT rid, ST_Metadata(rast) AS meta, rast FROM foo\n" 9764")\n" 9765"SELECT rid, (meta).* FROM bar\n" 9766"\n" 9767" rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | " 9768"skewy | srid | numbands\n" 9769"-----+------------+------------+-------+--------+--------+--------+-------" 9770"+-------+------+----------\n" 9771" 1 | 0 | 0 | 500 | 500 | 1 | -1 | 0 " 9772"| 0 | 0 | 1\n" 9773" 2 | 0 | 0 | 500 | 100 | 1 | -1 | 0 " 9774"| 0 | 0 | 1\n" 9775" 3 | 0 | 0 | 250 | 900 | 1 | -1 | 0 " 9776"| 0 | 0 | 1\n" 9777"(3 rows)" 9778msgstr "" 9779 9780#. Tag: para 9781#: reference_raster.xml:4844 9782#, no-c-format 9783msgid "" 9784", <xref linkend=\"RT_ST_Rescale\"/>, <xref linkend=\"RT_ST_Reskew\"/>, <xref " 9785"linkend=\"RT_ST_SnapToGrid\"/>" 9786msgstr "" 9787 9788#. Tag: refname 9789#: reference_raster.xml:4855 9790#, no-c-format 9791msgid "ST_Transform" 9792msgstr "ST_Transform" 9793 9794#. Tag: refpurpose 9795#: reference_raster.xml:4856 9796#, no-c-format 9797msgid "" 9798"Reprojects a raster in a known spatial reference system to another known " 9799"spatial reference system using specified resampling algorithm. Options are " 9800"NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to " 9801"NearestNeighbor." 9802msgstr "" 9803 9804#. Tag: funcsynopsis 9805#: reference_raster.xml:4860 9806#, no-c-format 9807msgid "" 9808"<funcprototype> <funcdef>raster <function>ST_Transform</function></funcdef> " 9809"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9810"<paramdef><type>integer </type> <parameter>srid</parameter></paramdef> " 9811"<paramdef choice=\"opt\"><type>text </type> " 9812"<parameter>algorithm=NearestNeighbor</parameter></paramdef> <paramdef choice=" 9813"\"opt\"><type>double precision </type> <parameter>maxerr=0.125</parameter></" 9814"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 9815"<parameter>scalex</parameter></paramdef> <paramdef choice=\"opt" 9816"\"><type>double precision </type> <parameter>scaley</parameter></paramdef> </" 9817"funcprototype> <funcprototype> <funcdef>raster <function>ST_Transform</" 9818"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 9819"parameter></paramdef> <paramdef><type>integer </type> <parameter>srid</" 9820"parameter></paramdef> <paramdef><type>double precision </type> " 9821"<parameter>scalex</parameter></paramdef> <paramdef><type>double precision </" 9822"type> <parameter>scaley</parameter></paramdef> <paramdef choice=\"opt" 9823"\"><type>text </type> <parameter>algorithm=NearestNeighbor</parameter></" 9824"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 9825"<parameter>maxerr=0.125</parameter></paramdef> </funcprototype> " 9826"<funcprototype> <funcdef>raster <function>ST_Transform</function></funcdef> " 9827"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 9828"<paramdef><type>raster </type> <parameter>alignto</parameter></paramdef> " 9829"<paramdef choice=\"opt\"><type>text </type> " 9830"<parameter>algorithm=NearestNeighbor</parameter></paramdef> <paramdef choice=" 9831"\"opt\"><type>double precision </type> <parameter>maxerr=0.125</parameter></" 9832"paramdef> </funcprototype>" 9833msgstr "" 9834 9835#. Tag: para 9836#: reference_raster.xml:4894 9837#, no-c-format 9838msgid "" 9839"Reprojects a raster in a known spatial reference system to another known " 9840"spatial reference system using specified pixel warping algorithm. Uses " 9841"'NearestNeighbor' if no algorithm is specified and maxerror percent of 0.125 " 9842"if no maxerr is specified." 9843msgstr "" 9844 9845#. Tag: para 9846#: reference_raster.xml:4898 9847#, no-c-format 9848msgid "" 9849"ST_Transform is often confused with ST_SetSRID(). ST_Transform actually " 9850"changes the coordinates of a raster (and resamples the pixel values) from " 9851"one spatial reference system to another, while ST_SetSRID() simply changes " 9852"the SRID identifier of the raster." 9853msgstr "" 9854 9855#. Tag: para 9856#: reference_raster.xml:4902 9857#, no-c-format 9858msgid "" 9859"Unlike the other variants, Variant 3 requires a reference raster as " 9860"<varname>alignto</varname>. The transformed raster will be transformed to " 9861"the spatial reference system (SRID) of the reference raster and be aligned " 9862"(ST_SameAlignment = TRUE) to the reference raster." 9863msgstr "" 9864 9865#. Tag: para 9866#: reference_raster.xml:4907 9867#, no-c-format 9868msgid "" 9869"If you find your transformation support is not working right, you may need " 9870"to set the environment variable PROJSO to the .so or .dll projection library " 9871"your PostGIS is using. This just needs to have the name of the file. So for " 9872"example on windows, you would in Control Panel -> System -> Environment " 9873"Variables add a system variable called <varname>PROJSO</varname> and set it " 9874"to <varname>libproj.dll</varname> (if you are using proj 4.6.1). You'll have " 9875"to restart your PostgreSQL service/daemon after this change." 9876msgstr "" 9877 9878#. Tag: para 9879#: reference_raster.xml:4913 9880#, no-c-format 9881msgid "Enhanced: 2.1.0 Addition of ST_Transform(rast, alignto) variant" 9882msgstr "" 9883 9884#. Tag: programlisting 9885#: reference_raster.xml:4919 9886#, fuzzy, no-c-format 9887msgid "" 9888"SELECT ST_Width(mass_stm) As w_before, ST_Width(wgs_84) As w_after,\n" 9889" ST_Height(mass_stm) As h_before, ST_Height(wgs_84) As h_after\n" 9890" FROM\n" 9891" ( SELECT rast As mass_stm, ST_Transform(rast,4326) As wgs_84\n" 9892" , ST_Transform(rast,4326, 'Bilinear') AS wgs_84_bilin\n" 9893" FROM aerials.o_2_boston\n" 9894" WHERE ST_Intersects(rast,\n" 9895" ST_Transform(ST_MakeEnvelope(-71.128, " 9896"42.2392,-71.1277, 42.2397, 4326),26986) )\n" 9897" LIMIT 1) As foo;\n" 9898"\n" 9899" w_before | w_after | h_before | h_after\n" 9900"----------+---------+----------+---------\n" 9901" 200 | 228 | 200 | 170" 9902msgstr "" 9903"SELECT ST_Width(mass_stm) As w_before, ST_Width(wgs_84) As w_after,\n" 9904" ST_Height(mass_stm) As h_before, ST_Height(wgs_84) As h_after\n" 9905" FROM \n" 9906" ( SELECT rast As mass_stm, ST_Transform(rast,4326) As wgs_84\n" 9907" , ST_Transform(rast,4326, 'Bilinear') AS wgs_84_bilin\n" 9908" FROM aerials.o_2_boston \n" 9909" WHERE ST_Intersects(rast,\n" 9910" ST_Transform(ST_MakeEnvelope(-71.128, " 9911"42.2392,-71.1277, 42.2397, 4326),26986) )\n" 9912" LIMIT 1) As foo;\n" 9913" \n" 9914" w_before | w_after | h_before | h_after\n" 9915"----------+---------+----------+---------\n" 9916" 200 | 228 | 200 | 170" 9917 9918#. Tag: para 9919#: reference_raster.xml:4929 9920#, no-c-format 9921msgid "original mass state plane meters (mass_stm)" 9922msgstr "" 9923 9924#. Tag: para 9925#: reference_raster.xml:4938 9926#, no-c-format 9927msgid "After transform to wgs 84 long lat (wgs_84)" 9928msgstr "" 9929 9930#. Tag: para 9931#: reference_raster.xml:4947 9932#, no-c-format 9933msgid "" 9934"After transform to wgs 84 long lat with bilinear algorithm instead of NN " 9935"default (wgs_84_bilin)" 9936msgstr "" 9937 9938#. Tag: para 9939#: reference_raster.xml:4960 9940#, no-c-format 9941msgid "" 9942"The following shows the difference between using ST_Transform(raster, srid) " 9943"and ST_Transform(raster, alignto)" 9944msgstr "" 9945 9946#. Tag: programlisting 9947#: reference_raster.xml:4961 9948#, no-c-format 9949msgid "" 9950"WITH foo AS (\n" 9951" SELECT 0 AS rid, ST_AddBand(ST_MakeEmptyRaster(2, 2, -500000, " 9952"600000, 100, -100, 0, 0, 2163), 1, '16BUI', 1, 0) AS rast UNION ALL\n" 9953" SELECT 1, ST_AddBand(ST_MakeEmptyRaster(2, 2, -499800, 600000, 100, " 9954"-100, 0, 0, 2163), 1, '16BUI', 2, 0) AS rast UNION ALL\n" 9955" SELECT 2, ST_AddBand(ST_MakeEmptyRaster(2, 2, -499600, 600000, 100, " 9956"-100, 0, 0, 2163), 1, '16BUI', 3, 0) AS rast UNION ALL\n" 9957"\n" 9958" SELECT 3, ST_AddBand(ST_MakeEmptyRaster(2, 2, -500000, 599800, 100, " 9959"-100, 0, 0, 2163), 1, '16BUI', 10, 0) AS rast UNION ALL\n" 9960" SELECT 4, ST_AddBand(ST_MakeEmptyRaster(2, 2, -499800, 599800, 100, " 9961"-100, 0, 0, 2163), 1, '16BUI', 20, 0) AS rast UNION ALL\n" 9962" SELECT 5, ST_AddBand(ST_MakeEmptyRaster(2, 2, -499600, 599800, 100, " 9963"-100, 0, 0, 2163), 1, '16BUI', 30, 0) AS rast UNION ALL\n" 9964"\n" 9965" SELECT 6, ST_AddBand(ST_MakeEmptyRaster(2, 2, -500000, 599600, 100, " 9966"-100, 0, 0, 2163), 1, '16BUI', 100, 0) AS rast UNION ALL\n" 9967" SELECT 7, ST_AddBand(ST_MakeEmptyRaster(2, 2, -499800, 599600, 100, " 9968"-100, 0, 0, 2163), 1, '16BUI', 200, 0) AS rast UNION ALL\n" 9969" SELECT 8, ST_AddBand(ST_MakeEmptyRaster(2, 2, -499600, 599600, 100, " 9970"-100, 0, 0, 2163), 1, '16BUI', 300, 0) AS rast\n" 9971"), bar AS (\n" 9972" SELECT\n" 9973" ST_Transform(rast, 4269) AS alignto\n" 9974" FROM foo\n" 9975" LIMIT 1\n" 9976"), baz AS (\n" 9977" SELECT\n" 9978" rid,\n" 9979" rast,\n" 9980" ST_Transform(rast, 4269) AS not_aligned,\n" 9981" ST_Transform(rast, alignto) AS aligned\n" 9982" FROM foo\n" 9983" CROSS JOIN bar\n" 9984")\n" 9985"SELECT\n" 9986" ST_SameAlignment(rast) AS rast,\n" 9987" ST_SameAlignment(not_aligned) AS not_aligned,\n" 9988" ST_SameAlignment(aligned) AS aligned\n" 9989"FROM baz\n" 9990"\n" 9991" rast | not_aligned | aligned\n" 9992"------+-------------+---------\n" 9993" t | f | t" 9994msgstr "" 9995 9996#. Tag: para 9997#: reference_raster.xml:4966 9998#, no-c-format 9999msgid ", <xref linkend=\"RT_ST_SetSRID\"/>" 10000msgstr ", <xref linkend=\"RT_ST_SetSRID\"/>" 10001 10002#. Tag: title 10003#: reference_raster.xml:4972 10004#, no-c-format 10005msgid "Raster Band Editors" 10006msgstr "" 10007 10008#. Tag: refname 10009#: reference_raster.xml:4976 10010#, no-c-format 10011msgid "ST_SetBandNoDataValue" 10012msgstr "" 10013 10014#. Tag: refpurpose 10015#: reference_raster.xml:4977 10016#, no-c-format 10017msgid "" 10018"Sets the value for the given band that represents no data. Band 1 is assumed " 10019"if no band is specified. To mark a band as having no nodata value, set the " 10020"nodata value = NULL." 10021msgstr "" 10022 10023#. Tag: funcsynopsis 10024#: reference_raster.xml:4981 10025#, no-c-format 10026msgid "" 10027"<funcprototype> <funcdef>raster <function>ST_SetBandNoDataValue</function></" 10028"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 10029"paramdef> <paramdef><type>double precision </type> <parameter>nodatavalue</" 10030"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 10031"<function>ST_SetBandNoDataValue</function></funcdef> <paramdef><type>raster " 10032"</type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </" 10033"type> <parameter>band</parameter></paramdef> <paramdef><type>double " 10034"precision </type> <parameter>nodatavalue</parameter></paramdef> <paramdef " 10035"choice=\"opt\"><type>boolean </type> <parameter>forcechecking=false</" 10036"parameter></paramdef> </funcprototype>" 10037msgstr "" 10038"<funcprototype> <funcdef>raster <function>ST_SetBandNoDataValue</function></" 10039"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 10040"paramdef> <paramdef><type>double precision </type> <parameter>nodatavalue</" 10041"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 10042"<function>ST_SetBandNoDataValue</function></funcdef> <paramdef><type>raster " 10043"</type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </" 10044"type> <parameter>band</parameter></paramdef> <paramdef><type>double " 10045"precision </type> <parameter>nodatavalue</parameter></paramdef> <paramdef " 10046"choice=\"opt\"><type>boolean </type> <parameter>forcechecking=false</" 10047"parameter></paramdef> </funcprototype>" 10048 10049#. Tag: para 10050#: reference_raster.xml:5002 10051#, no-c-format 10052msgid "" 10053"Sets the value that represents no data for the band. Band 1 is assumed if " 10054"not specified. This will affect results from <xref linkend=\"RT_ST_Polygon\"/" 10055">, <xref linkend=\"RT_ST_DumpAsPolygons\"/>, and the ST_PixelAs...() " 10056"functions." 10057msgstr "" 10058 10059#. Tag: programlisting 10060#: reference_raster.xml:5008 10061#, no-c-format 10062msgid "" 10063"-- change just first band no data value\n" 10064"UPDATE dummy_rast\n" 10065" SET rast = ST_SetBandNoDataValue(rast,1, 254)\n" 10066"WHERE rid = 2;\n" 10067"\n" 10068"-- change no data band value of bands 1,2,3\n" 10069"UPDATE dummy_rast\n" 10070" SET rast =\n" 10071" ST_SetBandNoDataValue(\n" 10072" ST_SetBandNoDataValue(\n" 10073" ST_SetBandNoDataValue(\n" 10074" rast,1, 254)\n" 10075" ,2,99),\n" 10076" 3,108)\n" 10077" WHERE rid = 2;\n" 10078"\n" 10079"-- wipe out the nodata value this will ensure all pixels are considered for " 10080"all processing functions\n" 10081"UPDATE dummy_rast\n" 10082" SET rast = ST_SetBandNoDataValue(rast,1, NULL)\n" 10083"WHERE rid = 2;" 10084msgstr "" 10085 10086#. Tag: refname 10087#: reference_raster.xml:5020 10088#, no-c-format 10089msgid "ST_SetBandIsNoData" 10090msgstr "ST_SetBandIsNoData" 10091 10092#. Tag: refpurpose 10093#: reference_raster.xml:5021 10094#, no-c-format 10095msgid "Sets the isnodata flag of the band to TRUE." 10096msgstr "" 10097 10098#. Tag: funcprototype 10099#: reference_raster.xml:5026 10100#, no-c-format 10101msgid "" 10102"<funcdef>raster <function>ST_SetBandIsNoData</function></funcdef> " 10103"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10104"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 10105"parameter></paramdef>" 10106msgstr "" 10107 10108#. Tag: para 10109#: reference_raster.xml:5037 10110#, no-c-format 10111msgid "" 10112"Sets the isnodata flag for the band to true. Band 1 is assumed if not " 10113"specified. This function should be called only when the flag is considered " 10114"dirty. That is, when the result calling <xref linkend=\"RT_ST_BandIsNoData\"/" 10115"> is different using TRUE as last argument and without using it" 10116msgstr "" 10117 10118#. Tag: programlisting 10119#: reference_raster.xml:5049 10120#, no-c-format 10121msgid "" 10122"-- Create dummy table with one raster column\n" 10123"create table dummy_rast (rid integer, rast raster);\n" 10124"\n" 10125"-- Add raster with two bands, one pixel/band. In the first band, nodatavalue " 10126"= pixel value = 3.\n" 10127"-- In the second band, nodatavalue = 13, pixel value = 4\n" 10128"insert into dummy_rast values(1,\n" 10129"(\n" 10130"'01' -- little endian (uint8 ndr)\n" 10131"||\n" 10132"'0000' -- version (uint16 0)\n" 10133"||\n" 10134"'0200' -- nBands (uint16 0)\n" 10135"||\n" 10136"'17263529ED684A3F' -- scaleX (float64 0.000805965234044584)\n" 10137"||\n" 10138"'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458)\n" 10139"||\n" 10140"'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098)\n" 10141"||\n" 10142"'718F0E9A27A44840' -- ipY (float64 49.2824585505576)\n" 10143"||\n" 10144"'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707)\n" 10145"||\n" 10146"'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704)\n" 10147"||\n" 10148"'E6100000' -- SRID (int32 4326)\n" 10149"||\n" 10150"'0100' -- width (uint16 1)\n" 10151"||\n" 10152"'0100' -- height (uint16 1)\n" 10153"||\n" 10154"'4' -- hasnodatavalue set to true, isnodata value set to false (when it " 10155"should be true)\n" 10156"||\n" 10157"'2' -- first band type (4BUI)\n" 10158"||\n" 10159"'03' -- novalue==3\n" 10160"||\n" 10161"'03' -- pixel(0,0)==3 (same that nodata)\n" 10162"||\n" 10163"'0' -- hasnodatavalue set to false\n" 10164"||\n" 10165"'5' -- second band type (16BSI)\n" 10166"||\n" 10167"'0D00' -- novalue==13\n" 10168"||\n" 10169"'0400' -- pixel(0,0)==4\n" 10170")::raster\n" 10171");\n" 10172"\n" 10173"select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected " 10174"false\n" 10175"select st_bandisnodata(rast, 1, TRUE) from dummy_rast where rid = 1; -- " 10176"Expected true\n" 10177"\n" 10178"-- The isnodata flag is dirty. We are going to set it to true\n" 10179"update dummy_rast set rast = st_setbandisnodata(rast, 1) where rid = 1;\n" 10180"\n" 10181"\n" 10182"select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected " 10183"true" 10184msgstr "" 10185 10186#. Tag: para 10187#: reference_raster.xml:5055 10188#, no-c-format 10189msgid "" 10190", <xref linkend=\"RT_ST_NumBands\"/>, <xref linkend=" 10191"\"RT_ST_SetBandNoDataValue\"/>, <xref linkend=\"RT_ST_BandIsNoData\"/>" 10192msgstr "" 10193", <xref linkend=\"RT_ST_NumBands\"/>, <xref linkend=" 10194"\"RT_ST_SetBandNoDataValue\"/>, <xref linkend=\"RT_ST_BandIsNoData\"/>" 10195 10196#. Tag: refname 10197#: reference_raster.xml:5064 10198#, fuzzy, no-c-format 10199msgid "ST_SetBandPath" 10200msgstr "ST_BandPath" 10201 10202#. Tag: refpurpose 10203#: reference_raster.xml:5065 10204#, no-c-format 10205msgid "Update the external path and band number of an out-db band" 10206msgstr "" 10207 10208#. Tag: funcprototype 10209#: reference_raster.xml:5070 10210#, fuzzy, no-c-format 10211msgid "" 10212"<funcdef>raster <function>ST_SetBandPath</function></funcdef> " 10213"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10214"<paramdef><type>integer </type> <parameter>band</parameter></paramdef> " 10215"<paramdef><type>text </type> <parameter>outdbpath</parameter></paramdef> " 10216"<paramdef><type>integer </type> <parameter>outdbindex</parameter></paramdef> " 10217"<paramdef choice=\"opt\"><type>boolean </type> <parameter>force=false</" 10218"parameter></paramdef>" 10219msgstr "" 10220"<funcdef>bytea <function>ST_AsGDALRaster</function></funcdef> " 10221"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10222"<paramdef><type>text </type> <parameter>format</parameter></paramdef> " 10223"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 10224"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 10225"<parameter>srid=sameassource</parameter></paramdef>" 10226 10227#. Tag: para 10228#: reference_raster.xml:5084 10229#, no-c-format 10230msgid "" 10231"Updates an out-db band's external raster file path and external band number." 10232msgstr "" 10233 10234#. Tag: para 10235#: reference_raster.xml:5087 10236#, no-c-format 10237msgid "" 10238"If <varname>force</varname> is set to true, no tests are done to ensure " 10239"compatibility (e.g. alignment, pixel support) between the external raster " 10240"file and the PostGIS raster. This mode is intended for file system changes " 10241"where the external raster resides." 10242msgstr "" 10243 10244#. Tag: para 10245#: reference_raster.xml:5093 reference_raster.xml:5146 10246#, no-c-format 10247msgid "" 10248"Internally, this method replaces the PostGIS raster's band at index " 10249"<varname>band</varname> with a new band instead of updating the existing " 10250"path information." 10251msgstr "" 10252 10253#. Tag: programlisting 10254#: reference_raster.xml:5103 10255#, no-c-format 10256msgid "" 10257"WITH foo AS (\n" 10258" SELECT\n" 10259" ST_AddBand(NULL::raster, '/home/pele/devel/geo/postgis-git/" 10260"raster/test/regress/loader/Projected.tif', NULL::int[]) AS rast\n" 10261")\n" 10262"SELECT\n" 10263" 1 AS query,\n" 10264" *\n" 10265"FROM ST_BandMetadata(\n" 10266" (SELECT rast FROM foo),\n" 10267" ARRAY[1,3,2]::int[]\n" 10268")\n" 10269"UNION ALL\n" 10270"SELECT\n" 10271" 2,\n" 10272" *\n" 10273"FROM ST_BandMetadata(\n" 10274" (\n" 10275" SELECT\n" 10276" <emphasis role=\"strong\">ST_SetBandPath(\n" 10277" rast,\n" 10278" 2,\n" 10279" '/home/pele/devel/geo/postgis-git/raster/" 10280"test/regress/loader/Projected2.tif',\n" 10281" 1\n" 10282" )</emphasis> AS rast\n" 10283" FROM foo\n" 10284" ),\n" 10285" ARRAY[1,3,2]::int[]\n" 10286")\n" 10287"ORDER BY 1, 2;\n" 10288"\n" 10289" query | bandnum | pixeltype | nodatavalue | isoutdb " 10290"| " 10291"path | outdbbandnum\n" 10292"-------+---------+-----------+-------------+---------" 10293"+---------------------------------------------------------------------------------" 10294"+--------------\n" 10295" 1 | 1 | 8BUI | | t | /home/pele/devel/geo/" 10296"postgis-git/raster/test/regress/loader/Projected.tif | 1\n" 10297" 1 | 2 | 8BUI | | t | /home/pele/devel/geo/" 10298"postgis-git/raster/test/regress/loader/Projected.tif | 2\n" 10299" 1 | 3 | 8BUI | | t | /home/pele/devel/geo/" 10300"postgis-git/raster/test/regress/loader/Projected.tif | 3\n" 10301" 2 | 1 | 8BUI | | t | /home/pele/devel/geo/" 10302"postgis-git/raster/test/regress/loader/Projected.tif | 1\n" 10303"<emphasis role=\"strong\"> 2 | 2 | 8BUI | | " 10304"t | /home/pele/devel/geo/postgis-git/raster/test/regress/loader/" 10305"Projected2.tif | 1</emphasis>\n" 10306" 2 | 3 | 8BUI | | t | /home/pele/devel/geo/" 10307"postgis-git/raster/test/regress/loader/Projected.tif | 3" 10308msgstr "" 10309 10310#. Tag: para 10311#: reference_raster.xml:5108 10312#, fuzzy, no-c-format 10313msgid ", <xref linkend=\"RT_ST_SetBandIndex\"/>" 10314msgstr ", <xref linkend=\"RT_ST_SetSRID\"/>" 10315 10316#. Tag: refname 10317#: reference_raster.xml:5118 10318#, fuzzy, no-c-format 10319msgid "ST_SetBandIndex" 10320msgstr "ST_SetBandIsNoData" 10321 10322#. Tag: refpurpose 10323#: reference_raster.xml:5119 10324#, no-c-format 10325msgid "Update the external band number of an out-db band" 10326msgstr "" 10327 10328#. Tag: funcprototype 10329#: reference_raster.xml:5124 10330#, fuzzy, no-c-format 10331msgid "" 10332"<funcdef>raster <function>ST_SetBandIndex</function></funcdef> " 10333"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10334"<paramdef><type>integer </type> <parameter>band</parameter></paramdef> " 10335"<paramdef><type>integer </type> <parameter>outdbindex</parameter></paramdef> " 10336"<paramdef choice=\"opt\"><type>boolean </type> <parameter>force=false</" 10337"parameter></paramdef>" 10338msgstr "" 10339"<funcdef>bytea <function>ST_AsGDALRaster</function></funcdef> " 10340"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10341"<paramdef><type>text </type> <parameter>format</parameter></paramdef> " 10342"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 10343"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 10344"<parameter>srid=sameassource</parameter></paramdef>" 10345 10346#. Tag: para 10347#: reference_raster.xml:5137 10348#, no-c-format 10349msgid "" 10350"Updates an out-db band's external band number. This does not touch the " 10351"external raster file associated with the out-db band" 10352msgstr "" 10353 10354#. Tag: para 10355#: reference_raster.xml:5140 10356#, no-c-format 10357msgid "" 10358"If <varname>force</varname> is set to true, no tests are done to ensure " 10359"compatibility (e.g. alignment, pixel support) between the external raster " 10360"file and the PostGIS raster. This mode is intended for where bands are moved " 10361"around in the external raster file." 10362msgstr "" 10363 10364#. Tag: programlisting 10365#: reference_raster.xml:5156 10366#, no-c-format 10367msgid "" 10368"WITH foo AS (\n" 10369" SELECT\n" 10370" ST_AddBand(NULL::raster, '/home/pele/devel/geo/postgis-git/" 10371"raster/test/regress/loader/Projected.tif', NULL::int[]) AS rast\n" 10372")\n" 10373"SELECT\n" 10374" 1 AS query,\n" 10375" *\n" 10376"FROM ST_BandMetadata(\n" 10377" (SELECT rast FROM foo),\n" 10378" ARRAY[1,3,2]::int[]\n" 10379")\n" 10380"UNION ALL\n" 10381"SELECT\n" 10382" 2,\n" 10383" *\n" 10384"FROM ST_BandMetadata(\n" 10385" (\n" 10386" SELECT\n" 10387" <emphasis role=\"strong\">ST_SetBandIndex(\n" 10388" rast,\n" 10389" 2,\n" 10390" 1\n" 10391" )</emphasis> AS rast\n" 10392" FROM foo\n" 10393" ),\n" 10394" ARRAY[1,3,2]::int[]\n" 10395")\n" 10396"ORDER BY 1, 2;\n" 10397"\n" 10398" query | bandnum | pixeltype | nodatavalue | isoutdb " 10399"| " 10400"path | outdbbandnum\n" 10401"-------+---------+-----------+-------------+---------" 10402"+---------------------------------------------------------------------------------" 10403"+--------------\n" 10404" 1 | 1 | 8BUI | | t | /home/pele/devel/geo/" 10405"postgis-git/raster/test/regress/loader/Projected.tif | 1\n" 10406" 1 | 2 | 8BUI | | t | /home/pele/devel/geo/" 10407"postgis-git/raster/test/regress/loader/Projected.tif | 2\n" 10408" 1 | 3 | 8BUI | | t | /home/pele/devel/geo/" 10409"postgis-git/raster/test/regress/loader/Projected.tif | 3\n" 10410" 2 | 1 | 8BUI | | t | /home/pele/devel/geo/" 10411"postgis-git/raster/test/regress/loader/Projected.tif | 1\n" 10412"<emphasis role=\"strong\"> 2 | 2 | 8BUI | | " 10413"t | /home/pele/devel/geo/postgis-git/raster/test/regress/loader/" 10414"Projected.tif | 1</emphasis>\n" 10415" 2 | 3 | 8BUI | | t | /home/pele/devel/geo/" 10416"postgis-git/raster/test/regress/loader/Projected.tif | 3" 10417msgstr "" 10418 10419#. Tag: para 10420#: reference_raster.xml:5161 10421#, fuzzy, no-c-format 10422msgid ", <xref linkend=\"RT_ST_SetBandPath\"/>" 10423msgstr ", <xref linkend=\"RT_ST_SetBandNoDataValue\"/>" 10424 10425#. Tag: title 10426#: reference_raster.xml:5172 10427#, no-c-format 10428msgid "Raster Band Statistics and Analytics" 10429msgstr "" 10430 10431#. Tag: refname 10432#: reference_raster.xml:5176 10433#, no-c-format 10434msgid "ST_Count" 10435msgstr "ST_Count" 10436 10437#. Tag: refpurpose 10438#: reference_raster.xml:5177 10439#, no-c-format 10440msgid "" 10441"Returns the number of pixels in a given band of a raster or raster coverage. " 10442"If no band is specified defaults to band 1. If exclude_nodata_value is set " 10443"to true, will only count pixels that are not equal to the nodata value." 10444msgstr "" 10445 10446#. Tag: funcsynopsis 10447#: reference_raster.xml:5181 10448#, no-c-format 10449msgid "" 10450"<funcprototype> <funcdef>bigint <function>ST_Count</function></funcdef> " 10451"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10452"<paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 10453"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 10454"<parameter>exclude_nodata_value=true</parameter></paramdef> </funcprototype> " 10455"<funcprototype> <funcdef>bigint <function>ST_Count</function></funcdef> " 10456"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10457"<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></" 10458"paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 10459"<function>ST_Count</function></funcdef> <paramdef><type>text </type> " 10460"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 10461"<parameter>rastercolumn</parameter></paramdef> <paramdef choice=\"opt" 10462"\"><type>integer </type> <parameter>nband=1</parameter></paramdef> <paramdef " 10463"choice=\"opt\"><type>boolean </type> <parameter>exclude_nodata_value=true</" 10464"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 10465"<function>ST_Count</function></funcdef> <paramdef><type>text </type> " 10466"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 10467"<parameter>rastercolumn</parameter></paramdef> <paramdef><type>boolean </" 10468"type> <parameter>exclude_nodata_value</parameter></paramdef> </funcprototype>" 10469msgstr "" 10470 10471#. Tag: para 10472#: reference_raster.xml:5212 10473#, no-c-format 10474msgid "" 10475"Returns the number of pixels in a given band of a raster or raster coverage. " 10476"If no band is specified <varname>nband</varname> defaults to 1." 10477msgstr "" 10478 10479#. Tag: para 10480#: reference_raster.xml:5213 10481#, no-c-format 10482msgid "" 10483"If <varname>exclude_nodata_value</varname> is set to true, will only count " 10484"pixels with value not equal to the <varname>nodata</varname> value of the " 10485"raster. Set <varname>exclude_nodata_value</varname> to false to get count " 10486"all pixels" 10487msgstr "" 10488 10489#. Tag: para 10490#: reference_raster.xml:5217 10491#, no-c-format 10492msgid "" 10493"The ST_Count(rastertable, rastercolumn, ...) variants are deprecated as of " 10494"2.2.0. Use <xref linkend=\"RT_ST_CountAgg\"/> instead." 10495msgstr "" 10496 10497#. Tag: programlisting 10498#: reference_raster.xml:5227 10499#, no-c-format 10500msgid "" 10501"--example will count all pixels not 249 and one will count all pixels. --\n" 10502"SELECT rid, ST_Count(ST_SetBandNoDataValue(rast,249)) As exclude_nodata,\n" 10503" ST_Count(ST_SetBandNoDataValue(rast,249),false) As include_nodata\n" 10504" FROM dummy_rast WHERE rid=2;\n" 10505"\n" 10506"rid | exclude_nodata | include_nodata\n" 10507"-----+----------------+----------------\n" 10508" 2 | 23 | 25" 10509msgstr "" 10510 10511#. Tag: para 10512#: reference_raster.xml:5232 reference_raster.xml:5293 10513#, no-c-format 10514msgid "" 10515", <xref linkend=\"RT_ST_SummaryStats\"/>, <xref linkend=" 10516"\"RT_ST_SetBandNoDataValue\"/>" 10517msgstr "" 10518 10519#. Tag: refname 10520#: reference_raster.xml:5242 10521#, no-c-format 10522msgid "ST_CountAgg" 10523msgstr "" 10524 10525#. Tag: refpurpose 10526#: reference_raster.xml:5243 10527#, no-c-format 10528msgid "" 10529"Aggregate. Returns the number of pixels in a given band of a set of rasters. " 10530"If no band is specified defaults to band 1. If exclude_nodata_value is set " 10531"to true, will only count pixels that are not equal to the NODATA value." 10532msgstr "" 10533 10534#. Tag: funcsynopsis 10535#: reference_raster.xml:5249 10536#, no-c-format 10537msgid "" 10538"<funcprototype> <funcdef>bigint <function>ST_CountAgg</function></funcdef> " 10539"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10540"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 10541"<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></" 10542"paramdef> <paramdef><type>double precision </type> " 10543"<parameter>sample_percent</parameter></paramdef> </funcprototype> " 10544"<funcprototype> <funcdef>bigint <function>ST_CountAgg</function></funcdef> " 10545"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 10546"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 10547"<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></" 10548"paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 10549"<function>ST_CountAgg</function></funcdef> <paramdef><type>raster </type> " 10550"<parameter>rast</parameter></paramdef> <paramdef><type>boolean </type> " 10551"<parameter>exclude_nodata_value</parameter></paramdef> </funcprototype>" 10552msgstr "" 10553 10554#. Tag: para 10555#: reference_raster.xml:5277 10556#, no-c-format 10557msgid "" 10558"Returns the number of pixels in a given band of a set of rasters. If no band " 10559"is specified <varname>nband</varname> defaults to 1." 10560msgstr "" 10561 10562#. Tag: para 10563#: reference_raster.xml:5278 10564#, no-c-format 10565msgid "" 10566"If <varname>exclude_nodata_value</varname> is set to true, will only count " 10567"pixels with value not equal to the <varname>NODATA</varname> value of the " 10568"raster. Set <varname>exclude_nodata_value</varname> to false to get count " 10569"all pixels" 10570msgstr "" 10571 10572#. Tag: para 10573#: reference_raster.xml:5281 10574#, no-c-format 10575msgid "" 10576"By default will sample all pixels. To get faster response, set " 10577"<varname>sample_percent</varname> to value between zero (0) and one (1)" 10578msgstr "" 10579 10580#. Tag: programlisting 10581#: reference_raster.xml:5288 10582#, fuzzy, no-c-format 10583msgid "" 10584"WITH foo AS (\n" 10585" SELECT\n" 10586" rast.rast\n" 10587" FROM (\n" 10588" SELECT ST_SetValue(\n" 10589" ST_SetValue(\n" 10590" ST_SetValue(\n" 10591" ST_AddBand(\n" 10592" ST_MakeEmptyRaster(10, 10, " 10593"10, 10, 2, 2, 0, 0,0)\n" 10594" , 1, '64BF', 0, 0\n" 10595" )\n" 10596" , 1, 1, 1, -10\n" 10597" )\n" 10598" , 1, 5, 4, 0\n" 10599" )\n" 10600" , 1, 5, 5, 3.14159\n" 10601" ) AS rast\n" 10602" ) AS rast\n" 10603" FULL JOIN (\n" 10604" SELECT generate_series(1, 10) AS id\n" 10605" ) AS id\n" 10606" ON 1 = 1\n" 10607")\n" 10608"SELECT\n" 10609" ST_CountAgg(rast, 1, TRUE)\n" 10610"FROM foo;\n" 10611"\n" 10612" st_countagg\n" 10613"-------------\n" 10614" 20\n" 10615"(1 row)" 10616msgstr "" 10617"-- un pixel 2x2 ha valore\n" 10618"SELECT\n" 10619" ST_Neighborhood(rast, 2, 2, 1, 1)\n" 10620"FROM (\n" 10621" SELECT\n" 10622" ST_SetValues(\n" 10623" ST_AddBand(\n" 10624" ST_MakeEmptyRaster(5, 5, -2, 2, 1, -1, 0, 0, " 10625"0),\n" 10626" '8BUI'::text, 1, 0\n" 10627" ),\n" 10628" 1, 1, 1, ARRAY[\n" 10629" [0, 1, 1, 1, 1],\n" 10630" [1, 1, 1, 0, 1],\n" 10631" [1, 0, 1, 1, 1],\n" 10632" [1, 1, 1, 1, 0],\n" 10633" [1, 1, 0, 1, 1]\n" 10634" ]::double precision[],\n" 10635" 1\n" 10636" ) AS rast\n" 10637") AS foo\n" 10638"\n" 10639" st_neighborhood \n" 10640"---------------------------------\n" 10641" {{NULL,1,1},{1,1,NULL},{1,1,1}}" 10642 10643#. Tag: refname 10644#: reference_raster.xml:5303 10645#, no-c-format 10646msgid "ST_Histogram" 10647msgstr "ST_Histogram" 10648 10649#. Tag: refpurpose 10650#: reference_raster.xml:5304 10651#, no-c-format 10652msgid "" 10653"Returns a set of record summarizing a raster or raster coverage data " 10654"distribution separate bin ranges. Number of bins are autocomputed if not " 10655"specified." 10656msgstr "" 10657 10658#. Tag: funcsynopsis 10659#: reference_raster.xml:5308 10660#, no-c-format 10661msgid "" 10662"<funcprototype> <funcdef>SETOF record <function>ST_Histogram</function></" 10663"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 10664"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 10665"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 10666"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 10667"\"opt\"><type>integer </type> <parameter>bins=autocomputed</parameter></" 10668"paramdef> <paramdef choice=\"opt\"><type>double precision[] </type> " 10669"<parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 10670"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 10671"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 10672"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 10673"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 10674"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 10675"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 10676"type> <parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 10677"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 10678"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 10679"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 10680"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 10681"parameter></paramdef> <paramdef><type>boolean </type> " 10682"<parameter>exclude_nodata_value</parameter></paramdef> " 10683"<paramdef><type>integer </type> <parameter>bins</parameter></paramdef> " 10684"<paramdef><type>boolean </type> <parameter>right</parameter></paramdef> </" 10685"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 10686"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 10687"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 10688"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 10689"parameter></paramdef> <paramdef><type>boolean </type> <parameter>right</" 10690"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 10691"<function>ST_Histogram</function></funcdef> <paramdef><type>text </type> " 10692"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 10693"<parameter>rastercolumn</parameter></paramdef> <paramdef><type>integer </" 10694"type> <parameter>nband</parameter></paramdef> <paramdef><type>integer </" 10695"type> <parameter>bins</parameter></paramdef> <paramdef><type>boolean </type> " 10696"<parameter>right</parameter></paramdef> </funcprototype> <funcprototype> " 10697"<funcdef>SETOF record <function>ST_Histogram</function></funcdef> " 10698"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 10699"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 10700"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 10701"<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></" 10702"paramdef> <paramdef><type>integer </type> <parameter>bins</parameter></" 10703"paramdef> <paramdef><type>boolean </type> <parameter>right</parameter></" 10704"paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 10705"<function>ST_Histogram</function></funcdef> <paramdef><type>text </type> " 10706"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 10707"<parameter>rastercolumn</parameter></paramdef> <paramdef choice=\"opt" 10708"\"><type>integer </type> <parameter>nband=1</parameter></paramdef> <paramdef " 10709"choice=\"opt\"><type>boolean </type> <parameter>exclude_nodata_value=true</" 10710"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 10711"<parameter>bins=autocomputed</parameter></paramdef> <paramdef choice=\"opt" 10712"\"><type>double precision[] </type> <parameter>width=NULL</parameter></" 10713"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 10714"<parameter>right=false</parameter></paramdef> </funcprototype> " 10715"<funcprototype> <funcdef>SETOF record <function>ST_Histogram</function></" 10716"funcdef> <paramdef><type>text </type> <parameter>rastertable</parameter></" 10717"paramdef> <paramdef><type>text </type> <parameter>rastercolumn</parameter></" 10718"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 10719"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 10720"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 10721"type> <parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 10722"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 10723"funcprototype>" 10724msgstr "" 10725"<funcprototype> <funcdef>SETOF record <function>ST_Histogram</function></" 10726"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 10727"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 10728"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 10729"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 10730"\"opt\"><type>integer </type> <parameter>bins=autocomputed</parameter></" 10731"paramdef> <paramdef choice=\"opt\"><type>double precision[] </type> " 10732"<parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 10733"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 10734"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 10735"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 10736"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 10737"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 10738"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 10739"type> <parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 10740"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 10741"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 10742"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 10743"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 10744"parameter></paramdef> <paramdef><type>boolean </type> " 10745"<parameter>exclude_nodata_value</parameter></paramdef> " 10746"<paramdef><type>integer </type> <parameter>bins</parameter></paramdef> " 10747"<paramdef><type>boolean </type> <parameter>right</parameter></paramdef> </" 10748"funcprototype> <funcprototype> <funcdef>SETOF record <function>ST_Histogram</" 10749"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 10750"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 10751"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 10752"parameter></paramdef> <paramdef><type>boolean </type> <parameter>right</" 10753"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 10754"<function>ST_Histogram</function></funcdef> <paramdef><type>text </type> " 10755"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 10756"<parameter>rastercolumn</parameter></paramdef> <paramdef><type>integer </" 10757"type> <parameter>nband</parameter></paramdef> <paramdef><type>integer </" 10758"type> <parameter>bins</parameter></paramdef> <paramdef><type>boolean </type> " 10759"<parameter>right</parameter></paramdef> </funcprototype> <funcprototype> " 10760"<funcdef>SETOF record <function>ST_Histogram</function></funcdef> " 10761"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 10762"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 10763"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 10764"<paramdef><type>boolean </type> <parameter>exclude_nodata_value</parameter></" 10765"paramdef> <paramdef><type>integer </type> <parameter>bins</parameter></" 10766"paramdef> <paramdef><type>boolean </type> <parameter>right</parameter></" 10767"paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 10768"<function>ST_Histogram</function></funcdef> <paramdef><type>text </type> " 10769"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 10770"<parameter>rastercolumn</parameter></paramdef> <paramdef choice=\"opt" 10771"\"><type>integer </type> <parameter>nband=1</parameter></paramdef> <paramdef " 10772"choice=\"opt\"><type>boolean </type> <parameter>exclude_nodata_value=true</" 10773"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 10774"<parameter>bins=autocomputed</parameter></paramdef> <paramdef choice=\"opt" 10775"\"><type>double precision[] </type> <parameter>width=NULL</parameter></" 10776"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 10777"<parameter>right=false</parameter></paramdef> </funcprototype> " 10778"<funcprototype> <funcdef>SETOF record <function>ST_Histogram</function></" 10779"funcdef> <paramdef><type>text </type> <parameter>rastertable</parameter></" 10780"paramdef> <paramdef><type>text </type> <parameter>rastercolumn</parameter></" 10781"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 10782"parameter></paramdef> <paramdef><type>integer </type> <parameter>bins</" 10783"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 10784"type> <parameter>width=NULL</parameter></paramdef> <paramdef choice=\"opt" 10785"\"><type>boolean </type> <parameter>right=false</parameter></paramdef> </" 10786"funcprototype>" 10787 10788#. Tag: para 10789#: reference_raster.xml:5390 10790#, no-c-format 10791msgid "" 10792"Returns set of records consisting of min, max, count, percent for a given " 10793"raster band for each bin. If no band is specified <varname>nband</varname> " 10794"defaults to 1." 10795msgstr "" 10796 10797#. Tag: para 10798#: reference_raster.xml:5391 10799#, no-c-format 10800msgid "" 10801"By default only considers pixel values not equal to the <varname>nodata</" 10802"varname> value . Set <varname>exclude_nodata_value</varname> to false to get " 10803"count all pixels." 10804msgstr "" 10805 10806#. Tag: term 10807#: reference_raster.xml:5395 10808#, no-c-format 10809msgid "<parameter>width </parameter><type>double precision[]</type>" 10810msgstr "" 10811 10812#. Tag: para 10813#: reference_raster.xml:5396 10814#, no-c-format 10815msgid "" 10816"width: an array indicating the width of each category/bin. If the number of " 10817"bins is greater than the number of widths, the widths are repeated." 10818msgstr "" 10819 10820#. Tag: para 10821#: reference_raster.xml:5397 10822#, no-c-format 10823msgid "" 10824"Example: 9 bins, widths are [a, b, c] will have the output be [a, b, c, a, " 10825"b, c, a, b, c]" 10826msgstr "" 10827 10828#. Tag: term 10829#: reference_raster.xml:5400 10830#, no-c-format 10831msgid "<parameter>bins </parameter><type>integer</type>" 10832msgstr "" 10833 10834#. Tag: para 10835#: reference_raster.xml:5401 10836#, no-c-format 10837msgid "" 10838"Number of breakouts -- this is the number of records you'll get back from " 10839"the function if specified. If not specified then the number of breakouts is " 10840"autocomputed." 10841msgstr "" 10842 10843#. Tag: term 10844#: reference_raster.xml:5405 10845#, no-c-format 10846msgid "<parameter>right </parameter><type>boolean</type>" 10847msgstr "" 10848 10849#. Tag: para 10850#: reference_raster.xml:5406 10851#, no-c-format 10852msgid "" 10853"compute the histogram from the right rather than from the left (default). " 10854"This changes the criteria for evaluating a value x from [a, b) to (a, b]" 10855msgstr "" 10856 10857#. Tag: title 10858#: reference_raster.xml:5413 10859#, no-c-format 10860msgid "" 10861"Example: Single raster tile - compute histograms for bands 1, 2, 3 and " 10862"autocompute bins" 10863msgstr "" 10864 10865#. Tag: programlisting 10866#: reference_raster.xml:5414 10867#, fuzzy, no-c-format 10868msgid "" 10869"SELECT band, (stats).*\n" 10870"FROM (SELECT rid, band, ST_Histogram(rast, band) As stats\n" 10871" FROM dummy_rast CROSS JOIN generate_series(1,3) As band\n" 10872" WHERE rid=2) As foo;\n" 10873"\n" 10874" band | min | max | count | percent\n" 10875"------+-------+-------+-------+---------\n" 10876" 1 | 249 | 250 | 2 | 0.08\n" 10877" 1 | 250 | 251 | 2 | 0.08\n" 10878" 1 | 251 | 252 | 1 | 0.04\n" 10879" 1 | 252 | 253 | 2 | 0.08\n" 10880" 1 | 253 | 254 | 18 | 0.72\n" 10881" 2 | 78 | 113.2 | 11 | 0.44\n" 10882" 2 | 113.2 | 148.4 | 4 | 0.16\n" 10883" 2 | 148.4 | 183.6 | 4 | 0.16\n" 10884" 2 | 183.6 | 218.8 | 1 | 0.04\n" 10885" 2 | 218.8 | 254 | 5 | 0.2\n" 10886" 3 | 62 | 100.4 | 11 | 0.44\n" 10887" 3 | 100.4 | 138.8 | 5 | 0.2\n" 10888" 3 | 138.8 | 177.2 | 4 | 0.16\n" 10889" 3 | 177.2 | 215.6 | 1 | 0.04\n" 10890" 3 | 215.6 | 254 | 4 | 0.16" 10891msgstr "" 10892"SELECT band, (stats).*\n" 10893"FROM (SELECT rid, band, ST_Histogram(rast, band) As stats\n" 10894" FROM dummy_rast CROSS JOIN generate_series(1,3) As band\n" 10895" WHERE rid=2) As foo;\n" 10896" \n" 10897" band | min | max | count | percent\n" 10898"------+-------+-------+-------+---------\n" 10899" 1 | 249 | 250 | 2 | 0.08\n" 10900" 1 | 250 | 251 | 2 | 0.08\n" 10901" 1 | 251 | 252 | 1 | 0.04\n" 10902" 1 | 252 | 253 | 2 | 0.08\n" 10903" 1 | 253 | 254 | 18 | 0.72\n" 10904" 2 | 78 | 113.2 | 11 | 0.44\n" 10905" 2 | 113.2 | 148.4 | 4 | 0.16\n" 10906" 2 | 148.4 | 183.6 | 4 | 0.16\n" 10907" 2 | 183.6 | 218.8 | 1 | 0.04\n" 10908" 2 | 218.8 | 254 | 5 | 0.2\n" 10909" 3 | 62 | 100.4 | 11 | 0.44\n" 10910" 3 | 100.4 | 138.8 | 5 | 0.2\n" 10911" 3 | 138.8 | 177.2 | 4 | 0.16\n" 10912" 3 | 177.2 | 215.6 | 1 | 0.04\n" 10913" 3 | 215.6 | 254 | 4 | 0.16" 10914 10915#. Tag: title 10916#: reference_raster.xml:5418 10917#, no-c-format 10918msgid "Example: Just band 2 but for 6 bins" 10919msgstr "" 10920 10921#. Tag: programlisting 10922#: reference_raster.xml:5419 10923#, no-c-format 10924msgid "" 10925"SELECT (stats).*\n" 10926"FROM (SELECT rid, ST_Histogram(rast, 2,6) As stats\n" 10927" FROM dummy_rast\n" 10928" WHERE rid=2) As foo;\n" 10929"\n" 10930" min | max | count | percent\n" 10931"------------+------------+-------+---------\n" 10932" 78 | 107.333333 | 9 | 0.36\n" 10933" 107.333333 | 136.666667 | 6 | 0.24\n" 10934" 136.666667 | 166 | 0 | 0\n" 10935" 166 | 195.333333 | 4 | 0.16\n" 10936" 195.333333 | 224.666667 | 1 | 0.04\n" 10937" 224.666667 | 254 | 5 | 0.2\n" 10938"(6 rows)\n" 10939"\n" 10940"-- Same as previous but we explicitly control the pixel value range of each " 10941"bin.\n" 10942"SELECT (stats).*\n" 10943"FROM (SELECT rid, ST_Histogram(rast, 2,6,ARRAY[0.5,1,4,100,5]) As stats\n" 10944" FROM dummy_rast\n" 10945" WHERE rid=2) As foo;\n" 10946"\n" 10947" min | max | count | percent\n" 10948"-------+-------+-------+----------\n" 10949" 78 | 78.5 | 1 | 0.08\n" 10950" 78.5 | 79.5 | 1 | 0.04\n" 10951" 79.5 | 83.5 | 0 | 0\n" 10952" 83.5 | 183.5 | 17 | 0.0068\n" 10953" 183.5 | 188.5 | 0 | 0\n" 10954" 188.5 | 254 | 6 | 0.003664\n" 10955"(6 rows)" 10956msgstr "" 10957 10958#. Tag: para 10959#: reference_raster.xml:5424 10960#, no-c-format 10961msgid "" 10962", <xref linkend=\"RT_ST_SummaryStats\"/>, <xref linkend=" 10963"\"RT_ST_SummaryStatsAgg\"/>" 10964msgstr "" 10965 10966#. Tag: refname 10967#: reference_raster.xml:5434 10968#, no-c-format 10969msgid "ST_Quantile" 10970msgstr "ST_Quantile" 10971 10972#. Tag: refpurpose 10973#: reference_raster.xml:5435 10974#, no-c-format 10975msgid "" 10976"<refpurpose>Compute quantiles for a raster or raster table coverage in the " 10977"context of the sample or population. Thus, a value could be examined to be " 10978"at the raster's 25%, 50%, 75% percentile.</refpurpose>" 10979msgstr "" 10980 10981#. Tag: funcsynopsis 10982#: reference_raster.xml:5439 10983#, no-c-format 10984msgid "" 10985"<funcprototype> <funcdef>SETOF record <function>ST_Quantile</function></" 10986"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 10987"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 10988"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 10989"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 10990"\"opt\"><type>double precision[] </type> <parameter>quantiles=NULL</" 10991"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 10992"<function>ST_Quantile</function></funcdef> <paramdef><type>raster </type> " 10993"<parameter>rast</parameter></paramdef> <paramdef><type>double precision[] </" 10994"type> <parameter>quantiles</parameter></paramdef> </funcprototype> " 10995"<funcprototype> <funcdef>SETOF record <function>ST_Quantile</function></" 10996"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 10997"paramdef> <paramdef><type>integer </type> <parameter>nband</parameter></" 10998"paramdef> <paramdef><type>double precision[] </type> <parameter>quantiles</" 10999"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>double " 11000"precision <function>ST_Quantile</function></funcdef> <paramdef><type>raster " 11001"</type> <parameter>rast</parameter></paramdef> <paramdef><type>double " 11002"precision </type> <parameter>quantile</parameter></paramdef> </" 11003"funcprototype> <funcprototype> <funcdef>double precision " 11004"<function>ST_Quantile</function></funcdef> <paramdef><type>raster </type> " 11005"<parameter>rast</parameter></paramdef> <paramdef><type>boolean </type> " 11006"<parameter>exclude_nodata_value</parameter></paramdef> <paramdef choice=\"opt" 11007"\"><type>double precision </type> <parameter>quantile=NULL</parameter></" 11008"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 11009"<function>ST_Quantile</function></funcdef> <paramdef><type>raster </type> " 11010"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11011"<parameter>nband</parameter></paramdef> <paramdef><type>double precision </" 11012"type> <parameter>quantile</parameter></paramdef> </funcprototype> " 11013"<funcprototype> <funcdef>double precision <function>ST_Quantile</function></" 11014"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 11015"paramdef> <paramdef><type>integer </type> <parameter>nband</parameter></" 11016"paramdef> <paramdef><type>boolean </type> <parameter>exclude_nodata_value</" 11017"parameter></paramdef> <paramdef><type>double precision </type> " 11018"<parameter>quantile</parameter></paramdef> </funcprototype> <funcprototype> " 11019"<funcdef>double precision <function>ST_Quantile</function></funcdef> " 11020"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 11021"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11022"<paramdef><type>double precision </type> <parameter>quantile</parameter></" 11023"paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 11024"<function>ST_Quantile</function></funcdef> <paramdef><type>text </type> " 11025"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 11026"<parameter>rastercolumn</parameter></paramdef> <paramdef choice=\"opt" 11027"\"><type>integer </type> <parameter>nband=1</parameter></paramdef> <paramdef " 11028"choice=\"opt\"><type>boolean </type> <parameter>exclude_nodata_value=true</" 11029"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 11030"type> <parameter>quantiles=NULL</parameter></paramdef> </funcprototype> " 11031"<funcprototype> <funcdef>SETOF record <function>ST_Quantile</function></" 11032"funcdef> <paramdef><type>text </type> <parameter>rastertable</parameter></" 11033"paramdef> <paramdef><type>text </type> <parameter>rastercolumn</parameter></" 11034"paramdef> <paramdef><type>integer </type> <parameter>nband</parameter></" 11035"paramdef> <paramdef><type>double precision[] </type> <parameter>quantiles</" 11036"parameter></paramdef> </funcprototype>" 11037msgstr "" 11038 11039#. Tag: para 11040#: reference_raster.xml:5511 11041#, no-c-format 11042msgid "" 11043"<para>Compute quantiles for a raster or raster table coverage in the context " 11044"of the sample or population. Thus, a value could be examined to be at the " 11045"raster's 25%, 50%, 75% percentile.</para>" 11046msgstr "" 11047 11048#. Tag: para 11049#: reference_raster.xml:5512 reference_raster.xml:5804 11050#, no-c-format 11051msgid "" 11052"If <varname>exclude_nodata_value</varname> is set to false, will also count " 11053"pixels with no data." 11054msgstr "" 11055 11056#. Tag: programlisting 11057#: reference_raster.xml:5519 11058#, no-c-format 11059msgid "" 11060"UPDATE dummy_rast SET rast = ST_SetBandNoDataValue(rast,249) WHERE rid=2;\n" 11061"--Example will consider only pixels of band 1 that are not 249 and in named " 11062"quantiles --\n" 11063"\n" 11064"SELECT (pvq).*\n" 11065"FROM (SELECT ST_Quantile(rast, ARRAY[0.25,0.75]) As pvq\n" 11066" FROM dummy_rast WHERE rid=2) As foo\n" 11067" ORDER BY (pvq).quantile;\n" 11068"\n" 11069" quantile | value\n" 11070"----------+-------\n" 11071" 0.25 | 253\n" 11072" 0.75 | 254\n" 11073"\n" 11074"SELECT ST_Quantile(rast, 0.75) As value\n" 11075" FROM dummy_rast WHERE rid=2;\n" 11076"\n" 11077"value\n" 11078"------\n" 11079" 254" 11080msgstr "" 11081 11082#. Tag: programlisting 11083#: reference_raster.xml:5520 11084#, no-c-format 11085msgid "" 11086"--real live example. Quantile of all pixels in band 2 intersecting a " 11087"geometry\n" 11088"SELECT rid, (ST_Quantile(rast,2)).* As pvc\n" 11089" FROM o_4_boston\n" 11090" WHERE ST_Intersects(rast,\n" 11091" ST_GeomFromText('POLYGON((224486 892151,224486 892200,224706 " 11092"892200,224706 892151,224486 892151))',26986)\n" 11093" )\n" 11094"ORDER BY value, quantile,rid\n" 11095";\n" 11096"\n" 11097"\n" 11098" rid | quantile | value\n" 11099"-----+----------+-------\n" 11100" 1 | 0 | 0\n" 11101" 2 | 0 | 0\n" 11102" 14 | 0 | 1\n" 11103" 15 | 0 | 2\n" 11104" 14 | 0.25 | 37\n" 11105" 1 | 0.25 | 42\n" 11106" 15 | 0.25 | 47\n" 11107" 2 | 0.25 | 50\n" 11108" 14 | 0.5 | 56\n" 11109" 1 | 0.5 | 64\n" 11110" 15 | 0.5 | 66\n" 11111" 2 | 0.5 | 77\n" 11112" 14 | 0.75 | 81\n" 11113" 15 | 0.75 | 87\n" 11114" 1 | 0.75 | 94\n" 11115" 2 | 0.75 | 106\n" 11116" 14 | 1 | 199\n" 11117" 1 | 1 | 244\n" 11118" 2 | 1 | 255\n" 11119" 15 | 1 | 255" 11120msgstr "" 11121 11122#. Tag: para 11123#: reference_raster.xml:5525 11124#, no-c-format 11125msgid "" 11126", <xref linkend=\"RT_ST_SummaryStats\"/>, <xref linkend=" 11127"\"RT_ST_SummaryStatsAgg\"/>, <xref linkend=\"RT_ST_SetBandNoDataValue\"/>" 11128msgstr "" 11129 11130#. Tag: refname 11131#: reference_raster.xml:5536 11132#, no-c-format 11133msgid "ST_SummaryStats" 11134msgstr "ST_SummaryStats" 11135 11136#. Tag: refpurpose 11137#: reference_raster.xml:5537 11138#, no-c-format 11139msgid "" 11140"Returns summarystats consisting of count, sum, mean, stddev, min, max for a " 11141"given raster band of a raster or raster coverage. Band 1 is assumed is no " 11142"band is specified." 11143msgstr "" 11144 11145#. Tag: funcsynopsis 11146#: reference_raster.xml:5541 11147#, no-c-format 11148msgid "" 11149"<funcprototype> <funcdef>summarystats <function>ST_SummaryStats</function></" 11150"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 11151"paramdef> <paramdef><type>boolean </type> <parameter>exclude_nodata_value</" 11152"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>summarystats " 11153"<function>ST_SummaryStats</function></funcdef> <paramdef><type>raster </" 11154"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11155"<parameter>nband</parameter></paramdef> <paramdef><type>boolean </type> " 11156"<parameter>exclude_nodata_value</parameter></paramdef> </funcprototype> " 11157"<funcprototype> <funcdef>summarystats <function>ST_SummaryStats</function></" 11158"funcdef> <paramdef><type>text </type> <parameter>rastertable</parameter></" 11159"paramdef> <paramdef><type>text </type> <parameter>rastercolumn</parameter></" 11160"paramdef> <paramdef><type>boolean </type> <parameter>exclude_nodata_value</" 11161"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>summarystats " 11162"<function>ST_SummaryStats</function></funcdef> <paramdef><type>text </type> " 11163"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 11164"<parameter>rastercolumn</parameter></paramdef> <paramdef choice=\"opt" 11165"\"><type>integer </type> <parameter>nband=1</parameter></paramdef> <paramdef " 11166"choice=\"opt\"><type>boolean </type> <parameter>exclude_nodata_value=true</" 11167"parameter></paramdef> </funcprototype>" 11168msgstr "" 11169 11170#. Tag: para 11171#: reference_raster.xml:5577 reference_raster.xml:5656 11172#, no-c-format 11173msgid "" 11174"Returns <xref linkend=\"summarystats\"/> consisting of count, sum, mean, " 11175"stddev, min, max for a given raster band of a raster or raster coverage. If " 11176"no band is specified <varname>nband</varname> defaults to 1." 11177msgstr "" 11178 11179#. Tag: para 11180#: reference_raster.xml:5579 11181#, no-c-format 11182msgid "" 11183"By default only considers pixel values not equal to the <varname>nodata</" 11184"varname> value. Set <varname>exclude_nodata_value</varname> to false to get " 11185"count of all pixels." 11186msgstr "" 11187 11188#. Tag: para 11189#: reference_raster.xml:5581 11190#, no-c-format 11191msgid "" 11192"By default will sample all pixels. To get faster response, set " 11193"<varname>sample_percent</varname> to lower than 1" 11194msgstr "" 11195 11196#. Tag: para 11197#: reference_raster.xml:5586 11198#, no-c-format 11199msgid "" 11200"The ST_SummaryStats(rastertable, rastercolumn, ...) variants are deprecated " 11201"as of 2.2.0. Use <xref linkend=\"RT_ST_SummaryStatsAgg\"/> instead." 11202msgstr "" 11203 11204#. Tag: title 11205#: reference_raster.xml:5594 11206#, no-c-format 11207msgid "Example: Single raster tile" 11208msgstr "" 11209 11210#. Tag: programlisting 11211#: reference_raster.xml:5595 11212#, fuzzy, no-c-format 11213msgid "" 11214"SELECT rid, band, (stats).*\n" 11215"FROM (SELECT rid, band, ST_SummaryStats(rast, band) As stats\n" 11216" FROM dummy_rast CROSS JOIN generate_series(1,3) As band\n" 11217" WHERE rid=2) As foo;\n" 11218"\n" 11219" rid | band | count | sum | mean | stddev | min | max\n" 11220"-----+------+-------+------+------------+-----------+-----+-----\n" 11221" 2 | 1 | 23 | 5821 | 253.086957 | 1.248061 | 250 | 254\n" 11222" 2 | 2 | 25 | 3682 | 147.28 | 59.862188 | 78 | 254\n" 11223" 2 | 3 | 25 | 3290 | 131.6 | 61.647384 | 62 | 254" 11224msgstr "" 11225"SELECT rid, band, (stats).*\n" 11226"FROM (SELECT rid, band, ST_SummaryStats(rast, band) As stats\n" 11227" FROM dummy_rast CROSS JOIN generate_series(1,3) As band\n" 11228" WHERE rid=2) As foo;\n" 11229" \n" 11230" rid | band | count | sum | mean | stddev | min | max\n" 11231"-----+------+-------+------+------------+-----------+-----+-----\n" 11232" 2 | 1 | 23 | 5821 | 253.086957 | 1.248061 | 250 | 254\n" 11233" 2 | 2 | 25 | 3682 | 147.28 | 59.862188 | 78 | 254\n" 11234" 2 | 3 | 25 | 3290 | 131.6 | 61.647384 | 62 | 254" 11235 11236#. Tag: title 11237#: reference_raster.xml:5599 11238#, no-c-format 11239msgid "Example: Summarize pixels that intersect buildings of interest" 11240msgstr "" 11241 11242#. Tag: para 11243#: reference_raster.xml:5600 11244#, no-c-format 11245msgid "" 11246"This example took 574ms on PostGIS windows 64-bit with all of Boston " 11247"Buildings and aerial Tiles (tiles each 150x150 pixels ~ 134,000 tiles), " 11248"~102,000 building records" 11249msgstr "" 11250 11251#. Tag: programlisting 11252#: reference_raster.xml:5602 11253#, no-c-format 11254msgid "" 11255"WITH\n" 11256"-- our features of interest\n" 11257" feat AS (SELECT gid As building_id, geom_26986 As geom FROM buildings AS " 11258"b\n" 11259" WHERE gid IN(100, 103,150)\n" 11260" ),\n" 11261"-- clip band 2 of raster tiles to boundaries of builds\n" 11262"-- then get stats for these clipped regions\n" 11263" b_stats AS\n" 11264" (SELECT building_id, (stats).*\n" 11265"FROM (SELECT building_id, ST_SummaryStats(ST_Clip(rast,2,geom)) As stats\n" 11266" FROM aerials.boston\n" 11267" INNER JOIN feat\n" 11268" ON ST_Intersects(feat.geom,rast)\n" 11269" ) As foo\n" 11270" )\n" 11271"-- finally summarize stats\n" 11272"SELECT building_id, SUM(count) As num_pixels\n" 11273" , MIN(min) As min_pval\n" 11274" , MAX(max) As max_pval\n" 11275" , SUM(mean*count)/SUM(count) As avg_pval\n" 11276" FROM b_stats\n" 11277" WHERE count > 0\n" 11278" GROUP BY building_id\n" 11279" ORDER BY building_id;\n" 11280" building_id | num_pixels | min_pval | max_pval | avg_pval\n" 11281"-------------+------------+----------+----------+------------------\n" 11282" 100 | 1090 | 1 | 255 | 61.0697247706422\n" 11283" 103 | 655 | 7 | 182 | 70.5038167938931\n" 11284" 150 | 895 | 2 | 252 | 185.642458100559" 11285msgstr "" 11286 11287#. Tag: title 11288#: reference_raster.xml:5606 11289#, no-c-format 11290msgid "Example: Raster coverage" 11291msgstr "" 11292 11293#. Tag: programlisting 11294#: reference_raster.xml:5607 11295#, no-c-format 11296msgid "" 11297"-- stats for each band --\n" 11298"SELECT band, (stats).*\n" 11299"FROM (SELECT band, ST_SummaryStats('o_4_boston','rast', band) As stats\n" 11300" FROM generate_series(1,3) As band) As foo;\n" 11301"\n" 11302" band | count | sum | mean | stddev | min | max\n" 11303"------+---------+--------+------------------+------------------+-----+-----\n" 11304" 1 | 8450000 | 725799 | 82.7064349112426 | 45.6800222638537 | 0 | 255\n" 11305" 2 | 8450000 | 700487 | 81.4197705325444 | 44.2161184161765 | 0 | 255\n" 11306" 3 | 8450000 | 575943 | 74.682739408284 | 44.2143885481407 | 0 | 255\n" 11307"\n" 11308"-- For a table -- will get better speed if set sampling to less than 100%\n" 11309"-- Here we set to 25% and get a much faster answer\n" 11310"SELECT band, (stats).*\n" 11311"FROM (SELECT band, ST_SummaryStats('o_4_boston','rast', band,true,0.25) As " 11312"stats\n" 11313" FROM generate_series(1,3) As band) As foo;\n" 11314"\n" 11315" band | count | sum | mean | stddev | min | max\n" 11316"------+---------+--------+------------------+------------------+-----+-----\n" 11317" 1 | 2112500 | 180686 | 82.6890480473373 | 45.6961043857248 | 0 | 255\n" 11318" 2 | 2112500 | 174571 | 81.448503668639 | 44.2252623171821 | 0 | 255\n" 11319" 3 | 2112500 | 144364 | 74.6765884023669 | 44.2014869384578 | 0 | 255" 11320msgstr "" 11321 11322#. Tag: para 11323#: reference_raster.xml:5612 11324#, no-c-format 11325msgid "" 11326", <xref linkend=\"RT_ST_SummaryStatsAgg\"/>, <xref linkend=\"RT_ST_Count\"/" 11327">, <xref linkend=\"RT_ST_Clip\"/>" 11328msgstr "" 11329 11330#. Tag: refname 11331#: reference_raster.xml:5623 11332#, no-c-format 11333msgid "ST_SummaryStatsAgg" 11334msgstr "" 11335 11336#. Tag: refpurpose 11337#: reference_raster.xml:5624 11338#, no-c-format 11339msgid "" 11340"Aggregate. Returns summarystats consisting of count, sum, mean, stddev, min, " 11341"max for a given raster band of a set of raster. Band 1 is assumed is no band " 11342"is specified." 11343msgstr "" 11344 11345#. Tag: funcsynopsis 11346#: reference_raster.xml:5628 11347#, no-c-format 11348msgid "" 11349"<funcprototype> <funcdef>summarystats <function>ST_SummaryStatsAgg</" 11350"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 11351"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 11352"parameter></paramdef> <paramdef><type>boolean </type> " 11353"<parameter>exclude_nodata_value</parameter></paramdef> " 11354"<paramdef><type>double precision </type> <parameter>sample_percent</" 11355"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>summarystats " 11356"<function>ST_SummaryStatsAgg</function></funcdef> <paramdef><type>raster </" 11357"type> <parameter>rast</parameter></paramdef> <paramdef><type>boolean </type> " 11358"<parameter>exclude_nodata_value</parameter></paramdef> " 11359"<paramdef><type>double precision </type> <parameter>sample_percent</" 11360"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>summarystats " 11361"<function>ST_SummaryStatsAgg</function></funcdef> <paramdef><type>raster </" 11362"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11363"<parameter>nband</parameter></paramdef> <paramdef><type>boolean </type> " 11364"<parameter>exclude_nodata_value</parameter></paramdef> </funcprototype>" 11365msgstr "" 11366 11367#. Tag: para 11368#: reference_raster.xml:5658 11369#, no-c-format 11370msgid "" 11371"By default only considers pixel values not equal to the <varname>NODATA</" 11372"varname> value. Set <varname>exclude_nodata_value</varname> to False to get " 11373"count of all pixels." 11374msgstr "" 11375 11376#. Tag: para 11377#: reference_raster.xml:5660 11378#, no-c-format 11379msgid "" 11380"By default will sample all pixels. To get faster response, set " 11381"<varname>sample_percent</varname> to value between 0 and 1" 11382msgstr "" 11383 11384#. Tag: programlisting 11385#: reference_raster.xml:5667 11386#, no-c-format 11387msgid "" 11388"WITH foo AS (\n" 11389" SELECT\n" 11390" rast.rast\n" 11391" FROM (\n" 11392" SELECT ST_SetValue(\n" 11393" ST_SetValue(\n" 11394" ST_SetValue(\n" 11395" ST_AddBand(\n" 11396" ST_MakeEmptyRaster(10, 10, " 11397"10, 10, 2, 2, 0, 0,0)\n" 11398" , 1, '64BF', 0, 0\n" 11399" )\n" 11400" , 1, 1, 1, -10\n" 11401" )\n" 11402" , 1, 5, 4, 0\n" 11403" )\n" 11404" , 1, 5, 5, 3.14159\n" 11405" ) AS rast\n" 11406" ) AS rast\n" 11407" FULL JOIN (\n" 11408" SELECT generate_series(1, 10) AS id\n" 11409" ) AS id\n" 11410" ON 1 = 1\n" 11411")\n" 11412"SELECT\n" 11413" (stats).count,\n" 11414" round((stats).sum::numeric, 3),\n" 11415" round((stats).mean::numeric, 3),\n" 11416" round((stats).stddev::numeric, 3),\n" 11417" round((stats).min::numeric, 3),\n" 11418" round((stats).max::numeric, 3)\n" 11419"FROM (\n" 11420" SELECT\n" 11421" ST_SummaryStatsAgg(rast, 1, TRUE, 1) AS stats\n" 11422" FROM foo\n" 11423") bar;\n" 11424"\n" 11425" count | round | round | round | round | round\n" 11426"-------+---------+--------+-------+---------+-------\n" 11427" 20 | -68.584 | -3.429 | 6.571 | -10.000 | 3.142\n" 11428"(1 row)" 11429msgstr "" 11430 11431#. Tag: para 11432#: reference_raster.xml:5672 11433#, no-c-format 11434msgid "" 11435", <xref linkend=\"RT_ST_SummaryStats\"/>, <xref linkend=\"RT_ST_Count\"/>, " 11436"<xref linkend=\"RT_ST_Clip\"/>" 11437msgstr "" 11438 11439#. Tag: refname 11440#: reference_raster.xml:5683 11441#, no-c-format 11442msgid "ST_ValueCount" 11443msgstr "ST_ValueCount" 11444 11445#. Tag: refpurpose 11446#: reference_raster.xml:5684 11447#, no-c-format 11448msgid "" 11449"Returns a set of records containing a pixel band value and count of the " 11450"number of pixels in a given band of a raster (or a raster coverage) that " 11451"have a given set of values. If no band is specified defaults to band 1. By " 11452"default nodata value pixels are not counted. and all other values in the " 11453"pixel are output and pixel band values are rounded to the nearest integer." 11454msgstr "" 11455 11456#. Tag: funcsynopsis 11457#: reference_raster.xml:5689 11458#, no-c-format 11459msgid "" 11460"<funcprototype> <funcdef>SETOF record <function>ST_ValueCount</function></" 11461"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 11462"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 11463"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 11464"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 11465"\"opt\"><type>double precision[] </type> <parameter>searchvalues=NULL</" 11466"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 11467"type> <parameter>roundto=0</parameter></paramdef> <paramdef><type>double " 11468"precision </type> <parameter>OUT value</parameter></paramdef> " 11469"<paramdef><type>integer </type> <parameter>OUT count</parameter></paramdef> " 11470"</funcprototype> <funcprototype> <funcdef>SETOF record " 11471"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11472"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11473"<parameter>nband</parameter></paramdef> <paramdef><type>double precision[] </" 11474"type> <parameter>searchvalues</parameter></paramdef> <paramdef choice=\"opt" 11475"\"><type>double precision </type> <parameter>roundto=0</parameter></" 11476"paramdef> <paramdef><type>double precision </type> <parameter>OUT value</" 11477"parameter></paramdef> <paramdef><type>integer </type> <parameter>OUT count</" 11478"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 11479"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11480"<parameter>rast</parameter></paramdef> <paramdef><type>double precision[] </" 11481"type> <parameter>searchvalues</parameter></paramdef> <paramdef choice=\"opt" 11482"\"><type>double precision </type> <parameter>roundto=0</parameter></" 11483"paramdef> <paramdef><type>double precision </type> <parameter>OUT value</" 11484"parameter></paramdef> <paramdef><type>integer </type> <parameter>OUT count</" 11485"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 11486"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11487"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 11488"type> <parameter>searchvalue</parameter></paramdef> <paramdef choice=\"opt" 11489"\"><type>double precision </type> <parameter>roundto=0</parameter></" 11490"paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 11491"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11492"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11493"<parameter>nband</parameter></paramdef> <paramdef><type>boolean </type> " 11494"<parameter>exclude_nodata_value</parameter></paramdef> " 11495"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11496"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11497"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11498"<funcdef>bigint <function>ST_ValueCount</function></funcdef> " 11499"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 11500"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11501"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11502"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11503"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11504"<funcdef>SETOF record <function>ST_ValueCount</function></funcdef> " 11505"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11506"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11507"<paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 11508"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 11509"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 11510"\"opt\"><type>double precision[] </type> <parameter>searchvalues=NULL</" 11511"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 11512"type> <parameter>roundto=0</parameter></paramdef> <paramdef><type>double " 11513"precision </type> <parameter>OUT value</parameter></paramdef> " 11514"<paramdef><type>integer </type> <parameter>OUT count</parameter></paramdef> " 11515"</funcprototype> <funcprototype> <funcdef>SETOF record " 11516"<function>ST_ValueCount</function></funcdef> <paramdef><type>text </type> " 11517"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 11518"<parameter>rastercolumn</parameter></paramdef> <paramdef><type>double " 11519"precision[] </type> <parameter>searchvalues</parameter></paramdef> <paramdef " 11520"choice=\"opt\"><type>double precision </type> <parameter>roundto=0</" 11521"parameter></paramdef> <paramdef><type>double precision </type> " 11522"<parameter>OUT value</parameter></paramdef> <paramdef><type>integer </type> " 11523"<parameter>OUT count</parameter></paramdef> </funcprototype> <funcprototype> " 11524"<funcdef>SETOF record <function>ST_ValueCount</function></funcdef> " 11525"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11526"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11527"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11528"<paramdef><type>double precision[] </type> <parameter>searchvalues</" 11529"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 11530"type> <parameter>roundto=0</parameter></paramdef> <paramdef><type>double " 11531"precision </type> <parameter>OUT value</parameter></paramdef> " 11532"<paramdef><type>integer </type> <parameter>OUT count</parameter></paramdef> " 11533"</funcprototype> <funcprototype> <funcdef>bigint<function>ST_ValueCount</" 11534"function></funcdef> <paramdef><type>text </type> <parameter>rastertable</" 11535"parameter></paramdef> <paramdef><type>text </type> <parameter>rastercolumn</" 11536"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 11537"parameter></paramdef> <paramdef><type>boolean </type> " 11538"<parameter>exclude_nodata_value</parameter></paramdef> " 11539"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11540"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11541"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11542"<funcdef>bigint <function>ST_ValueCount</function></funcdef> " 11543"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11544"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11545"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11546"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11547"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11548"<funcdef>bigint <function>ST_ValueCount</function></funcdef> " 11549"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11550"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11551"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11552"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11553"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11554"<parameter>roundto=0</parameter></paramdef> </funcprototype>" 11555msgstr "" 11556"<funcprototype> <funcdef>SETOF record <function>ST_ValueCount</function></" 11557"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 11558"paramdef> <paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 11559"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 11560"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 11561"\"opt\"><type>double precision[] </type> <parameter>searchvalues=NULL</" 11562"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 11563"type> <parameter>roundto=0</parameter></paramdef> <paramdef><type>double " 11564"precision </type> <parameter>OUT value</parameter></paramdef> " 11565"<paramdef><type>integer </type> <parameter>OUT count</parameter></paramdef> " 11566"</funcprototype> <funcprototype> <funcdef>SETOF record " 11567"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11568"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11569"<parameter>nband</parameter></paramdef> <paramdef><type>double precision[] </" 11570"type> <parameter>searchvalues</parameter></paramdef> <paramdef choice=\"opt" 11571"\"><type>double precision </type> <parameter>roundto=0</parameter></" 11572"paramdef> <paramdef><type>double precision </type> <parameter>OUT value</" 11573"parameter></paramdef> <paramdef><type>integer </type> <parameter>OUT count</" 11574"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>SETOF record " 11575"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11576"<parameter>rast</parameter></paramdef> <paramdef><type>double precision[] </" 11577"type> <parameter>searchvalues</parameter></paramdef> <paramdef choice=\"opt" 11578"\"><type>double precision </type> <parameter>roundto=0</parameter></" 11579"paramdef> <paramdef><type>double precision </type> <parameter>OUT value</" 11580"parameter></paramdef> <paramdef><type>integer </type> <parameter>OUT count</" 11581"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 11582"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11583"<parameter>rast</parameter></paramdef> <paramdef><type>double precision </" 11584"type> <parameter>searchvalue</parameter></paramdef> <paramdef choice=\"opt" 11585"\"><type>double precision </type> <parameter>roundto=0</parameter></" 11586"paramdef> </funcprototype> <funcprototype> <funcdef>bigint " 11587"<function>ST_ValueCount</function></funcdef> <paramdef><type>raster </type> " 11588"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 11589"<parameter>nband</parameter></paramdef> <paramdef><type>boolean </type> " 11590"<parameter>exclude_nodata_value</parameter></paramdef> " 11591"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11592"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11593"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11594"<funcdef>bigint <function>ST_ValueCount</function></funcdef> " 11595"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 11596"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11597"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11598"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11599"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11600"<funcdef>SETOF record <function>ST_ValueCount</function></funcdef> " 11601"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11602"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11603"<paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 11604"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 11605"<parameter>exclude_nodata_value=true</parameter></paramdef> <paramdef choice=" 11606"\"opt\"><type>double precision[] </type> <parameter>searchvalues=NULL</" 11607"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 11608"type> <parameter>roundto=0</parameter></paramdef> <paramdef><type>double " 11609"precision </type> <parameter>OUT value</parameter></paramdef> " 11610"<paramdef><type>integer </type> <parameter>OUT count</parameter></paramdef> " 11611"</funcprototype> <funcprototype> <funcdef>SETOF record " 11612"<function>ST_ValueCount</function></funcdef> <paramdef><type>text </type> " 11613"<parameter>rastertable</parameter></paramdef> <paramdef><type>text </type> " 11614"<parameter>rastercolumn</parameter></paramdef> <paramdef><type>double " 11615"precision[] </type> <parameter>searchvalues</parameter></paramdef> <paramdef " 11616"choice=\"opt\"><type>double precision </type> <parameter>roundto=0</" 11617"parameter></paramdef> <paramdef><type>double precision </type> " 11618"<parameter>OUT value</parameter></paramdef> <paramdef><type>integer </type> " 11619"<parameter>OUT count</parameter></paramdef> </funcprototype> <funcprototype> " 11620"<funcdef>SETOF record <function>ST_ValueCount</function></funcdef> " 11621"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11622"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11623"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11624"<paramdef><type>double precision[] </type> <parameter>searchvalues</" 11625"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 11626"type> <parameter>roundto=0</parameter></paramdef> <paramdef><type>double " 11627"precision </type> <parameter>OUT value</parameter></paramdef> " 11628"<paramdef><type>integer </type> <parameter>OUT count</parameter></paramdef> " 11629"</funcprototype> <funcprototype> <funcdef>bigint<function>ST_ValueCount</" 11630"function></funcdef> <paramdef><type>text </type> <parameter>rastertable</" 11631"parameter></paramdef> <paramdef><type>text </type> <parameter>rastercolumn</" 11632"parameter></paramdef> <paramdef><type>integer </type> <parameter>nband</" 11633"parameter></paramdef> <paramdef><type>boolean </type> " 11634"<parameter>exclude_nodata_value</parameter></paramdef> " 11635"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11636"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11637"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11638"<funcdef>bigint <function>ST_ValueCount</function></funcdef> " 11639"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11640"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11641"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11642"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11643"<parameter>roundto=0</parameter></paramdef> </funcprototype> <funcprototype> " 11644"<funcdef>bigint <function>ST_ValueCount</function></funcdef> " 11645"<paramdef><type>text </type> <parameter>rastertable</parameter></paramdef> " 11646"<paramdef><type>text </type> <parameter>rastercolumn</parameter></paramdef> " 11647"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 11648"<paramdef><type>double precision </type> <parameter>searchvalue</parameter></" 11649"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 11650"<parameter>roundto=0</parameter></paramdef> </funcprototype>" 11651 11652#. Tag: para 11653#: reference_raster.xml:5802 11654#, no-c-format 11655msgid "" 11656"Returns a set of records with columns <varname>value</varname> " 11657"<varname>count</varname> which contain the pixel band value and count of " 11658"pixels in the raster tile or raster coverage of selected band." 11659msgstr "" 11660 11661#. Tag: para 11662#: reference_raster.xml:5803 11663#, no-c-format 11664msgid "" 11665"If no band is specified <varname>nband</varname> defaults to 1. If no " 11666"<varname>searchvalues</varname> are specified, will return all pixel values " 11667"found in the raster or raster coverage. If one searchvalue is given, will " 11668"return an integer instead of records denoting the count of pixels having " 11669"that pixel band value" 11670msgstr "" 11671 11672#. Tag: programlisting 11673#: reference_raster.xml:5811 11674#, no-c-format 11675msgid "" 11676"UPDATE dummy_rast SET rast = ST_SetBandNoDataValue(rast,249) WHERE rid=2;\n" 11677"--Example will count only pixels of band 1 that are not 249. --\n" 11678"\n" 11679"SELECT (pvc).*\n" 11680"FROM (SELECT ST_ValueCount(rast) As pvc\n" 11681" FROM dummy_rast WHERE rid=2) As foo\n" 11682" ORDER BY (pvc).value;\n" 11683"\n" 11684" value | count\n" 11685"-------+-------\n" 11686" 250 | 2\n" 11687" 251 | 1\n" 11688" 252 | 2\n" 11689" 253 | 6\n" 11690" 254 | 12\n" 11691"\n" 11692"-- Example will coount all pixels of band 1 including 249 --\n" 11693"SELECT (pvc).*\n" 11694"FROM (SELECT ST_ValueCount(rast,1,false) As pvc\n" 11695" FROM dummy_rast WHERE rid=2) As foo\n" 11696" ORDER BY (pvc).value;\n" 11697"\n" 11698" value | count\n" 11699"-------+-------\n" 11700" 249 | 2\n" 11701" 250 | 2\n" 11702" 251 | 1\n" 11703" 252 | 2\n" 11704" 253 | 6\n" 11705" 254 | 12\n" 11706"\n" 11707"-- Example will count only non-nodata value pixels of band 2\n" 11708"SELECT (pvc).*\n" 11709"FROM (SELECT ST_ValueCount(rast,2) As pvc\n" 11710" FROM dummy_rast WHERE rid=2) As foo\n" 11711" ORDER BY (pvc).value;\n" 11712" value | count\n" 11713"-------+-------\n" 11714" 78 | 1\n" 11715" 79 | 1\n" 11716" 88 | 1\n" 11717" 89 | 1\n" 11718" 96 | 1\n" 11719" 97 | 1\n" 11720" 98 | 1\n" 11721" 99 | 2\n" 11722" 112 | 2\n" 11723":" 11724msgstr "" 11725 11726#. Tag: programlisting 11727#: reference_raster.xml:5812 11728#, no-c-format 11729msgid "" 11730"--real live example. Count all the pixels in an aerial raster tile band 2 " 11731"intersecting a geometry\n" 11732"-- and return only the pixel band values that have a count > 500\n" 11733"SELECT (pvc).value, SUM((pvc).count) As total\n" 11734"FROM (SELECT ST_ValueCount(rast,2) As pvc\n" 11735" FROM o_4_boston\n" 11736" WHERE ST_Intersects(rast,\n" 11737" ST_GeomFromText('POLYGON((224486 892151,224486 892200,224706 " 11738"892200,224706 892151,224486 892151))',26986)\n" 11739" )\n" 11740" ) As foo\n" 11741" GROUP BY (pvc).value\n" 11742" HAVING SUM((pvc).count) > 500\n" 11743" ORDER BY (pvc).value;\n" 11744"\n" 11745" value | total\n" 11746"-------+-----\n" 11747" 51 | 502\n" 11748" 54 | 521" 11749msgstr "" 11750 11751#. Tag: programlisting 11752#: reference_raster.xml:5814 11753#, no-c-format 11754msgid "" 11755"-- Just return count of pixels in each raster tile that have value of 100 of " 11756"tiles that intersect a specific geometry --\n" 11757"SELECT rid, ST_ValueCount(rast,2,100) As count\n" 11758" FROM o_4_boston\n" 11759" WHERE ST_Intersects(rast,\n" 11760" ST_GeomFromText('POLYGON((224486 892151,224486 892200,224706 " 11761"892200,224706 892151,224486 892151))',26986)\n" 11762" ) ;\n" 11763"\n" 11764" rid | count\n" 11765"-----+-------\n" 11766" 1 | 56\n" 11767" 2 | 95\n" 11768" 14 | 37\n" 11769" 15 | 64" 11770msgstr "" 11771 11772#. Tag: para 11773#: reference_raster.xml:5819 11774#, no-c-format 11775msgid ", <xref linkend=\"RT_ST_SetBandNoDataValue\"/>" 11776msgstr ", <xref linkend=\"RT_ST_SetBandNoDataValue\"/>" 11777 11778#. Tag: title 11779#: reference_raster.xml:5825 11780#, no-c-format 11781msgid "Raster Inputs" 11782msgstr "" 11783 11784#. Tag: refname 11785#: reference_raster.xml:5828 11786#, fuzzy, no-c-format 11787msgid "ST_RastFromWKB" 11788msgstr "ST_AsRaster" 11789 11790#. Tag: refpurpose 11791#: reference_raster.xml:5829 11792#, no-c-format 11793msgid "Return a raster value from a Well-Known Binary (WKB) raster." 11794msgstr "" 11795 11796#. Tag: funcprototype 11797#: reference_raster.xml:5834 11798#, fuzzy, no-c-format 11799msgid "" 11800"<funcdef>raster <function>ST_RastFromWKB</function></funcdef> " 11801"<paramdef><type>bytea </type> <parameter>wkb</parameter></paramdef>" 11802msgstr "" 11803"<funcdef>raster <function>ST_Union</function></funcdef> " 11804"<paramdef><type>setof raster </type> <parameter>rast</parameter></paramdef>" 11805 11806#. Tag: para 11807#: reference_raster.xml:5844 11808#, no-c-format 11809msgid "Given a Well-Known Binary (WKB) raster, return a raster." 11810msgstr "" 11811 11812#. Tag: programlisting 11813#: reference_raster.xml:5854 11814#, no-c-format 11815msgid "" 11816"SELECT (ST_Metadata(\n" 11817" ST_RastFromWKB(\n" 11818" '\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000@" 11819"\\000\\000\\000\\000\\000\\000\\010@\\000\\000\\000\\000\\000\\000\\340?" 11820"\\000\\000\\000\\000\\000\\000\\340?" 11821"\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\012\\000\\000\\000\\012\\000\\024\\000'::" 11822"bytea\n" 11823" )\n" 11824")).* AS metadata;\n" 11825"\n" 11826" upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy " 11827"| srid | numbands\n" 11828"------------+------------+-------+--------+--------+--------+-------+-------" 11829"+------+----------\n" 11830" 0.5 | 0.5 | 10 | 20 | 2 | 3 | 0 | 0 " 11831"| 10 | 0" 11832msgstr "" 11833 11834#. Tag: para 11835#: reference_raster.xml:5860 11836#, fuzzy, no-c-format 11837msgid "" 11838", <xref linkend=\"RT_ST_RastFromHexWKB\"/>, <xref linkend=\"RT_ST_AsBinary\"/" 11839">, <xref linkend=\"RT_ST_AsHexWKB\"/>" 11840msgstr "" 11841", <xref linkend=\"RT_ST_Value\"/>, <xref linkend=\"RT_ST_Polygon\"/>, <xref " 11842"linkend=\"RT_ST_ValueCount\"/>" 11843 11844#. Tag: refname 11845#: reference_raster.xml:5871 11846#, no-c-format 11847msgid "ST_RastFromHexWKB" 11848msgstr "" 11849 11850#. Tag: refpurpose 11851#: reference_raster.xml:5872 11852#, no-c-format 11853msgid "" 11854"Return a raster value from a Hex representation of Well-Known Binary (WKB) " 11855"raster." 11856msgstr "" 11857 11858#. Tag: funcprototype 11859#: reference_raster.xml:5877 11860#, fuzzy, no-c-format 11861msgid "" 11862"<funcdef>raster <function>ST_RastFromHexWKB</function></funcdef> " 11863"<paramdef><type>text </type> <parameter>wkb</parameter></paramdef>" 11864msgstr "" 11865"<funcdef>raster <function>ST_Union</function></funcdef> " 11866"<paramdef><type>setof raster </type> <parameter>rast</parameter></paramdef>" 11867 11868#. Tag: para 11869#: reference_raster.xml:5887 11870#, no-c-format 11871msgid "" 11872"Given a Well-Known Binary (WKB) raster in Hex representation, return a " 11873"raster." 11874msgstr "" 11875 11876#. Tag: programlisting 11877#: reference_raster.xml:5897 11878#, fuzzy, no-c-format 11879msgid "" 11880"SELECT (ST_Metadata(\n" 11881" ST_RastFromHexWKB(\n" 11882" '010000000000000000000000400000000000000840000000000000E03F000000000000E03F000000000000000000000000000000000A0000000A001400'\n" 11883" )\n" 11884")).* AS metadata;\n" 11885"\n" 11886" upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy " 11887"| srid | numbands\n" 11888"------------+------------+-------+--------+--------+--------+-------+-------" 11889"+------+----------\n" 11890" 0.5 | 0.5 | 10 | 20 | 2 | 3 | 0 | 0 " 11891"| 10 | 0" 11892msgstr "" 11893"SELECT rid, (foo.md).* \n" 11894" FROM (SELECT rid, ST_MetaData(rast) As md\n" 11895"FROM dummy_rast) As foo;\n" 11896"\n" 11897" rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | " 11898"skewy | srid | numbands\n" 11899" ----+------------+------------+-------+--------+--------+-----------+-------" 11900"+-------+------+-------\n" 11901" 1 | 0.5 | 0.5 | 10 | 20 | 2 | 3 " 11902"| 0 | 0 | 0 | 0\n" 11903" 2 | 3427927.75 | 5793244 | 5 | 5 | 0.05 | -0.05 " 11904"| 0 | 0 | 0 | 3" 11905 11906#. Tag: para 11907#: reference_raster.xml:5903 11908#, fuzzy, no-c-format 11909msgid "" 11910", <xref linkend=\"RT_ST_RastFromWKB\"/>, <xref linkend=\"RT_ST_AsBinary\"/>, " 11911"<xref linkend=\"RT_ST_AsHexWKB\"/>" 11912msgstr "" 11913", <xref linkend=\"RT_ST_Contains\"/>, <xref linkend=\"RT_ST_DWithin\"/>, " 11914"<xref linkend=\"RT_ST_DFullyWithin\"/>" 11915 11916#. Tag: title 11917#: reference_raster.xml:5915 11918#, no-c-format 11919msgid "Raster Outputs" 11920msgstr "" 11921 11922#. Tag: refname 11923#: reference_raster.xml:5919 11924#, fuzzy, no-c-format 11925msgid "ST_AsBinary/ST_AsWKB" 11926msgstr "ST_AsBinary" 11927 11928#. Tag: refpurpose 11929#: reference_raster.xml:5920 11930#, no-c-format 11931msgid "Return the Well-Known Binary (WKB) representation of the raster." 11932msgstr "" 11933 11934#. Tag: funcsynopsis 11935#: reference_raster.xml:5924 11936#, fuzzy, no-c-format 11937msgid "" 11938"<funcprototype> <funcdef>bytea <function>ST_AsBinary</function></funcdef> " 11939"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 11940"<paramdef choice=\"opt\"><type>boolean </type> <parameter>outasin=FALSE</" 11941"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 11942"<function>ST_AsWKB</function></funcdef> <paramdef><type>raster </type> " 11943"<parameter>rast</parameter></paramdef> <paramdef choice=\"opt" 11944"\"><type>boolean </type> <parameter>outasin=FALSE</parameter></paramdef> </" 11945"funcprototype>" 11946msgstr "" 11947"<funcprototype> <funcdef>boolean <function>ST_BandIsNoData</function></" 11948"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 11949"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 11950"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 11951"<parameter>forceChecking=true</parameter></paramdef> </funcprototype> " 11952"<funcprototype> <funcdef>boolean <function>ST_BandIsNoData</function></" 11953"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 11954"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 11955"<parameter>forceChecking=true</parameter></paramdef> </funcprototype>" 11956 11957#. Tag: para 11958#: reference_raster.xml:5941 11959#, no-c-format 11960msgid "" 11961"Returns the Binary representation of the raster. If <varname>outasin</" 11962"varname> is TRUE, out-db bands are treated as in-db. Refer to raster/doc/" 11963"RFC2-WellKnownBinaryFormat located in the PostGIS source folder for details " 11964"of the representation." 11965msgstr "" 11966 11967#. Tag: para 11968#: reference_raster.xml:5946 11969#, no-c-format 11970msgid "" 11971"This is useful in binary cursors to pull data out of the database without " 11972"converting it to a string representation." 11973msgstr "" 11974 11975#. Tag: para 11976#: reference_raster.xml:5951 11977#, no-c-format 11978msgid "" 11979"By default, WKB output contains the external file path for out-db bands. If " 11980"the client does not have access to the raster file underlying an out-db " 11981"band, set <varname>outasin</varname> to TRUE." 11982msgstr "" 11983 11984#. Tag: para 11985#: reference_raster.xml:5955 11986#, no-c-format 11987msgid "Enhanced: 2.1.0 Addition of <varname>outasin</varname>" 11988msgstr "" 11989 11990#. Tag: para 11991#: reference_raster.xml:5956 11992#, no-c-format 11993msgid "Enhanced: 2.5.0 Addition of <varname>ST_AsWKB</varname>" 11994msgstr "" 11995 11996#. Tag: programlisting 11997#: reference_raster.xml:5962 11998#, no-c-format 11999msgid "" 12000"SELECT ST_AsBinary(rast) As rastbin FROM dummy_rast WHERE rid=1;\n" 12001"\n" 12002" rastbin\n" 12003"---------------------------------------------------------------------------------\n" 12004"\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000@" 12005"\\000\\000\\000\\000\\000\\000\\010@\\000\\000\\000\\000\\000\\000\\340?" 12006"\\000\\000\\000\\000\\000\\000\\340?" 12007"\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\012\\000\\000\\000\\012\\000\\024\\000" 12008msgstr "" 12009 12010#. Tag: para 12011#: reference_raster.xml:5968 12012#, fuzzy, no-c-format 12013msgid ", <xref linkend=\"RT_ST_AsHexWKB\"/>" 12014msgstr ", <xref linkend=\"RT_ST_Value\"/>" 12015 12016#. Tag: refname 12017#: reference_raster.xml:5977 12018#, fuzzy, no-c-format 12019msgid "ST_AsHexWKB" 12020msgstr "ST_Aspect" 12021 12022#. Tag: refpurpose 12023#: reference_raster.xml:5978 12024#, no-c-format 12025msgid "Return the Well-Known Binary (WKB) in Hex representation of the raster." 12026msgstr "" 12027 12028#. Tag: funcprototype 12029#: reference_raster.xml:5983 12030#, fuzzy, no-c-format 12031msgid "" 12032"<funcdef>bytea <function>ST_AsHexWKB</function></funcdef> " 12033"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12034"<paramdef choice=\"opt\"><type>boolean </type> <parameter>outasin=FALSE</" 12035"parameter></paramdef>" 12036msgstr "" 12037"<funcdef>text <function>ST_GeoReference</function></funcdef> " 12038"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12039"<paramdef choice=\"opt\"><type>text </type> <parameter>format=GDAL</" 12040"parameter></paramdef>" 12041 12042#. Tag: para 12043#: reference_raster.xml:5994 12044#, no-c-format 12045msgid "" 12046"Returns the Binary representation in Hex representation of the raster. If " 12047"<varname>outasin</varname> is TRUE, out-db bands are treated as in-db. Refer " 12048"to raster/doc/RFC2-WellKnownBinaryFormat located in the PostGIS source " 12049"folder for details of the representation." 12050msgstr "" 12051 12052#. Tag: para 12053#: reference_raster.xml:6000 12054#, no-c-format 12055msgid "" 12056"By default, Hex WKB output contains the external file path for out-db bands. " 12057"If the client does not have access to the raster file underlying an out-db " 12058"band, set <varname>outasin</varname> to TRUE." 12059msgstr "" 12060 12061#. Tag: programlisting 12062#: reference_raster.xml:6010 12063#, no-c-format 12064msgid "" 12065"SELECT ST_AsHexWKB(rast) As rastbin FROM dummy_rast WHERE rid=1;\n" 12066"\n" 12067" st_ashexwkb\n" 12068"----------------------------------------------------------------------------------------------------------------------------\n" 12069" 010000000000000000000000400000000000000840000000000000E03F000000000000E03F000000000000000000000000000000000A0000000A001400" 12070msgstr "" 12071 12072#. Tag: para 12073#: reference_raster.xml:6016 12074#, fuzzy, no-c-format 12075msgid ", <xref linkend=\"RT_ST_AsBinary\"/>" 12076msgstr ", <xref linkend=\"RT_ST_Disjoint\"/>" 12077 12078#. Tag: refname 12079#: reference_raster.xml:6026 12080#, no-c-format 12081msgid "ST_AsGDALRaster" 12082msgstr "ST_AsGDALRaster" 12083 12084#. Tag: refpurpose 12085#: reference_raster.xml:6027 12086#, no-c-format 12087msgid "" 12088"Return the raster tile in the designated GDAL Raster format. Raster formats " 12089"are one of those supported by your compiled library. Use ST_GDALDrivers() to " 12090"get a list of formats supported by your library." 12091msgstr "" 12092 12093#. Tag: funcprototype 12094#: reference_raster.xml:6032 12095#, no-c-format 12096msgid "" 12097"<funcdef>bytea <function>ST_AsGDALRaster</function></funcdef> " 12098"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12099"<paramdef><type>text </type> <parameter>format</parameter></paramdef> " 12100"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12101"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 12102"<parameter>srid=sameassource</parameter></paramdef>" 12103msgstr "" 12104"<funcdef>bytea <function>ST_AsGDALRaster</function></funcdef> " 12105"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12106"<paramdef><type>text </type> <parameter>format</parameter></paramdef> " 12107"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12108"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 12109"<parameter>srid=sameassource</parameter></paramdef>" 12110 12111#. Tag: para 12112#: reference_raster.xml:6046 12113#, no-c-format 12114msgid "" 12115"Returns the raster tile in the designated format. Arguments are itemized " 12116"below:" 12117msgstr "" 12118 12119#. Tag: para 12120#: reference_raster.xml:6049 12121#, no-c-format 12122msgid "" 12123"<varname>format</varname> format to output. This is dependent on the drivers " 12124"compiled in your libgdal library. Generally available are 'JPEG', 'GTIff', " 12125"'PNG'. Use <xref linkend=\"RT_ST_GDALDrivers\"/> to get a list of formats " 12126"supported by your library." 12127msgstr "" 12128 12129#. Tag: para 12130#: reference_raster.xml:6054 12131#, no-c-format 12132msgid "" 12133"<varname>options</varname> text array of GDAL options. Valid options are " 12134"dependent on the format. Refer to <ulink url=\"http://www.gdal.org/" 12135"frmt_various.html\">GDAL Raster format options</ulink> for more details." 12136msgstr "" 12137 12138#. Tag: para 12139#: reference_raster.xml:6059 12140#, no-c-format 12141msgid "" 12142"<varname>srs</varname> The proj4text or srtext (from spatial_ref_sys) to " 12143"embed in the image" 12144msgstr "" 12145 12146#. Tag: title 12147#: reference_raster.xml:6069 12148#, no-c-format 12149msgid "JPEG Output Example, multiple tiles as single raster" 12150msgstr "" 12151 12152#. Tag: programlisting 12153#: reference_raster.xml:6071 12154#, no-c-format 12155msgid "" 12156"<![CDATA[SELECT ST_AsGDALRaster(ST_Union(rast), 'JPEG', ARRAY['QUALITY=50']) " 12157"As rastjpg\n" 12158"FROM dummy_rast\n" 12159"WHERE rast && ST_MakeEnvelope(10, 10, 11, 11);]]>" 12160msgstr "" 12161 12162#. Tag: title 12163#: reference_raster.xml:6076 12164#, no-c-format 12165msgid "Using PostgreSQL Large Object Support to export raster" 12166msgstr "" 12167 12168#. Tag: para 12169#: reference_raster.xml:6077 12170#, no-c-format 12171msgid "" 12172"One way to export raster into another format is using <ulink url=\"https://" 12173"www.postgresql.org/docs/current/static/lo-funcs.html\">PostgreSQL large " 12174"object export functions</ulink>. We'lll repeat the prior example but also " 12175"exporting. Note for this you'll need to have super user access to db since " 12176"it uses server side lo functions. It will also export to path on server " 12177"network. If you need export locally, use the psql equivalent lo_ functions " 12178"which export to the local file system instead of the server file system." 12179msgstr "" 12180 12181#. Tag: programlisting 12182#: reference_raster.xml:6081 12183#, no-c-format 12184msgid "" 12185"<![CDATA[DROP TABLE IF EXISTS tmp_out ;\n" 12186"\n" 12187"CREATE TABLE tmp_out AS\n" 12188"SELECT lo_from_bytea(0,\n" 12189" ST_AsGDALRaster(ST_Union(rast), 'JPEG', ARRAY['QUALITY=50'])\n" 12190" ) AS loid\n" 12191" FROM dummy_rast\n" 12192"WHERE rast && ST_MakeEnvelope(10, 10, 11, 11);\n" 12193"\n" 12194"SELECT lo_export(loid, '/tmp/dummy.jpg')\n" 12195" FROM tmp_out;\n" 12196"\n" 12197"SELECT lo_unlink(loid)\n" 12198" FROM tmp_out;]]>" 12199msgstr "" 12200 12201#. Tag: title 12202#: reference_raster.xml:6085 12203#, no-c-format 12204msgid "GTIFF Output Examples" 12205msgstr "Esempio di uscita GTIFF" 12206 12207#. Tag: programlisting 12208#: reference_raster.xml:6087 12209#, fuzzy, no-c-format 12210msgid "" 12211"SELECT ST_AsGDALRaster(rast, 'GTiff') As rastjpg\n" 12212"FROM dummy_rast WHERE rid=2;\n" 12213"\n" 12214"-- Out GeoTiff with jpeg compression, 90% quality\n" 12215"SELECT ST_AsGDALRaster(rast, 'GTiff',\n" 12216" ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'],\n" 12217" 4269) As rasttiff\n" 12218"FROM dummy_rast WHERE rid=2;" 12219msgstr "" 12220"SELECT ST_AsGDALRaster(rast, 'GTiff') As rastjpg\n" 12221"FROM dummy_rast WHERE rid=2;\n" 12222"\n" 12223"-- Producit GeoTiff con compressione JPEG e qualità 90%\n" 12224"SELECT ST_AsGDALRaster(rast, 'GTiff', \n" 12225" ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], \n" 12226" 4269) As rasttiff\n" 12227"FROM dummy_rast WHERE rid=2;" 12228 12229#. Tag: para 12230#: reference_raster.xml:6094 12231#, no-c-format 12232msgid ", <xref linkend=\"RT_ST_GDALDrivers\"/>, <xref linkend=\"RT_ST_SRID\"/>" 12233msgstr "" 12234", <xref linkend=\"RT_ST_GDALDrivers\"/>, <xref linkend=\"RT_ST_SRID\"/>" 12235 12236#. Tag: refname 12237#: reference_raster.xml:6100 12238#, no-c-format 12239msgid "ST_AsJPEG" 12240msgstr "ST_AsJPEG" 12241 12242#. Tag: refpurpose 12243#: reference_raster.xml:6101 12244#, no-c-format 12245msgid "" 12246"Return the raster tile selected bands as a single Joint Photographic Exports " 12247"Group (JPEG) image (byte array). If no band is specified and 1 or more than " 12248"3 bands, then only the first band is used. If only 3 bands then all 3 bands " 12249"are used and mapped to RGB." 12250msgstr "" 12251 12252#. Tag: funcsynopsis 12253#: reference_raster.xml:6105 12254#, no-c-format 12255msgid "" 12256"<funcprototype> <funcdef>bytea <function>ST_AsJPEG</function></funcdef> " 12257"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12258"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12259"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12260"<function>ST_AsJPEG</function></funcdef> <paramdef><type>raster </type> " 12261"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 12262"<parameter>nband</parameter></paramdef> <paramdef><type>integer </type> " 12263"<parameter>quality</parameter></paramdef> </funcprototype> <funcprototype> " 12264"<funcdef>bytea <function>ST_AsJPEG</function></funcdef> " 12265"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12266"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 12267"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12268"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12269"<function>ST_AsJPEG</function></funcdef> <paramdef><type>raster </type> " 12270"<parameter>rast</parameter></paramdef> <paramdef><type>integer[] </type> " 12271"<parameter>nbands</parameter></paramdef> <paramdef choice=\"opt" 12272"\"><type>text[] </type> <parameter>options=NULL</parameter></paramdef> </" 12273"funcprototype> <funcprototype> <funcdef>bytea <function>ST_AsJPEG</" 12274"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 12275"parameter></paramdef> <paramdef><type>integer[] </type> <parameter>nbands</" 12276"parameter></paramdef> <paramdef><type>integer </type> <parameter>quality</" 12277"parameter></paramdef> </funcprototype>" 12278msgstr "" 12279"<funcprototype> <funcdef>bytea <function>ST_AsJPEG</function></funcdef> " 12280"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12281"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12282"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12283"<function>ST_AsJPEG</function></funcdef> <paramdef><type>raster </type> " 12284"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 12285"<parameter>nband</parameter></paramdef> <paramdef><type>integer </type> " 12286"<parameter>quality</parameter></paramdef> </funcprototype> <funcprototype> " 12287"<funcdef>bytea <function>ST_AsJPEG</function></funcdef> " 12288"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12289"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 12290"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12291"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12292"<function>ST_AsJPEG</function></funcdef> <paramdef><type>raster </type> " 12293"<parameter>rast</parameter></paramdef> <paramdef><type>integer[] </type> " 12294"<parameter>nbands</parameter></paramdef> <paramdef choice=\"opt" 12295"\"><type>text[] </type> <parameter>options=NULL</parameter></paramdef> </" 12296"funcprototype> <funcprototype> <funcdef>bytea <function>ST_AsJPEG</" 12297"function></funcdef> <paramdef><type>raster </type> <parameter>rast</" 12298"parameter></paramdef> <paramdef><type>integer[] </type> <parameter>nbands</" 12299"parameter></paramdef> <paramdef><type>integer </type> <parameter>quality</" 12300"parameter></paramdef> </funcprototype>" 12301 12302#. Tag: para 12303#: reference_raster.xml:6141 12304#, no-c-format 12305msgid "" 12306"Returns the selected bands of the raster as a single Joint Photographic " 12307"Exports Group Image (JPEG). Use <xref linkend=\"RT_ST_AsGDALRaster\"/> if " 12308"you need to export as less common raster types. If no band is specified and " 12309"1 or more than 3 bands, then only the first band is used. If 3 bands then " 12310"all 3 bands are used. There are many variants of the function with many " 12311"options. These are itemized below:" 12312msgstr "" 12313 12314#. Tag: para 12315#: reference_raster.xml:6144 reference_raster.xml:6235 12316#, no-c-format 12317msgid "<varname>nband</varname> is for single band exports." 12318msgstr "" 12319 12320#. Tag: para 12321#: reference_raster.xml:6149 12322#, no-c-format 12323msgid "" 12324"<varname>nbands</varname> is an array of bands to export (note that max is 3 " 12325"for JPEG) and the order of the bands is RGB. e.g ARRAY[3,2,1] means map band " 12326"3 to Red, band 2 to green and band 1 to blue" 12327msgstr "" 12328 12329#. Tag: para 12330#: reference_raster.xml:6154 12331#, no-c-format 12332msgid "" 12333"<varname>quality</varname> number from 0 to 100. The higher the number the " 12334"crisper the image." 12335msgstr "" 12336 12337#. Tag: para 12338#: reference_raster.xml:6159 12339#, no-c-format 12340msgid "" 12341"<varname>options</varname> text Array of GDAL options as defined for JPEG " 12342"(look at create_options for JPEG <xref linkend=\"RT_ST_GDALDrivers\"/>). For " 12343"JPEG valid ones are <varname>PROGRESSIVE</varname> ON or OFF and " 12344"<varname>QUALITY</varname> a range from 0 to 100 and default to 75. Refer to " 12345"<ulink url=\"http://www.gdal.org/frmt_various.html\">GDAL Raster format " 12346"options</ulink> for more details." 12347msgstr "" 12348 12349#. Tag: title 12350#: reference_raster.xml:6176 12351#, no-c-format 12352msgid "Examples: Output" 12353msgstr "" 12354 12355#. Tag: programlisting 12356#: reference_raster.xml:6178 12357#, no-c-format 12358msgid "" 12359"-- output first 3 bands 75% quality\n" 12360"SELECT ST_AsJPEG(rast) As rastjpg\n" 12361" FROM dummy_rast WHERE rid=2;\n" 12362"\n" 12363"-- output only first band as 90% quality\n" 12364"SELECT ST_AsJPEG(rast,1,90) As rastjpg\n" 12365" FROM dummy_rast WHERE rid=2;\n" 12366"\n" 12367"-- output first 3 bands (but make band 2 Red, band 1 green, and band 3 blue, " 12368"progressive and 90% quality\n" 12369"SELECT ST_AsJPEG(rast,ARRAY[2,1,3],ARRAY['QUALITY=90','PROGRESSIVE=ON']) As " 12370"rastjpg\n" 12371" FROM dummy_rast WHERE rid=2;" 12372msgstr "" 12373 12374#. Tag: para 12375#: reference_raster.xml:6185 12376#, no-c-format 12377msgid "" 12378", <xref linkend=\"RT_ST_GDALDrivers\"/>, <xref linkend=\"RT_ST_AsGDALRaster" 12379"\"/>, <xref linkend=\"RT_ST_AsPNG\"/>, <xref linkend=\"RT_ST_AsTIFF\"/>" 12380msgstr "" 12381", <xref linkend=\"RT_ST_GDALDrivers\"/>, <xref linkend=\"RT_ST_AsGDALRaster" 12382"\"/>, <xref linkend=\"RT_ST_AsPNG\"/>, <xref linkend=\"RT_ST_AsTIFF\"/>" 12383 12384#. Tag: refname 12385#: reference_raster.xml:6191 12386#, no-c-format 12387msgid "ST_AsPNG" 12388msgstr "ST_AsPNG" 12389 12390#. Tag: refpurpose 12391#: reference_raster.xml:6192 12392#, no-c-format 12393msgid "" 12394"Return the raster tile selected bands as a single portable network graphics " 12395"(PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are " 12396"specified, then all bands are used. If more 2 or more than 4 bands and no " 12397"bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA " 12398"space." 12399msgstr "" 12400 12401#. Tag: funcsynopsis 12402#: reference_raster.xml:6196 12403#, no-c-format 12404msgid "" 12405"<funcprototype> <funcdef>bytea <function>ST_AsPNG</function></funcdef> " 12406"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12407"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12408"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12409"<function>ST_AsPNG</function></funcdef> <paramdef><type>raster </type> " 12410"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 12411"<parameter>nband</parameter></paramdef> <paramdef><type>integer </type> " 12412"<parameter>compression</parameter></paramdef> </funcprototype> " 12413"<funcprototype> <funcdef>bytea <function>ST_AsPNG</function></funcdef> " 12414"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12415"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 12416"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12417"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12418"<function>ST_AsPNG</function></funcdef> <paramdef><type>raster </type> " 12419"<parameter>rast</parameter></paramdef> <paramdef><type>integer[] </type> " 12420"<parameter>nbands</parameter></paramdef> <paramdef><type>integer </type> " 12421"<parameter>compression</parameter></paramdef> </funcprototype> " 12422"<funcprototype> <funcdef>bytea <function>ST_AsPNG</function></funcdef> " 12423"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12424"<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef> " 12425"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12426"parameter></paramdef> </funcprototype>" 12427msgstr "" 12428"<funcprototype> <funcdef>bytea <function>ST_AsPNG</function></funcdef> " 12429"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12430"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12431"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12432"<function>ST_AsPNG</function></funcdef> <paramdef><type>raster </type> " 12433"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 12434"<parameter>nband</parameter></paramdef> <paramdef><type>integer </type> " 12435"<parameter>compression</parameter></paramdef> </funcprototype> " 12436"<funcprototype> <funcdef>bytea <function>ST_AsPNG</function></funcdef> " 12437"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12438"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 12439"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12440"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bytea " 12441"<function>ST_AsPNG</function></funcdef> <paramdef><type>raster </type> " 12442"<parameter>rast</parameter></paramdef> <paramdef><type>integer[] </type> " 12443"<parameter>nbands</parameter></paramdef> <paramdef><type>integer </type> " 12444"<parameter>compression</parameter></paramdef> </funcprototype> " 12445"<funcprototype> <funcdef>bytea <function>ST_AsPNG</function></funcdef> " 12446"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12447"<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef> " 12448"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 12449"parameter></paramdef> </funcprototype>" 12450 12451#. Tag: para 12452#: reference_raster.xml:6232 12453#, no-c-format 12454msgid "" 12455"Returns the selected bands of the raster as a single Portable Network " 12456"Graphics Image (PNG). Use <xref linkend=\"RT_ST_AsGDALRaster\"/> if you need " 12457"to export as less common raster types. If no band is specified, then the " 12458"first 3 bands are exported. There are many variants of the function with " 12459"many options. If no <varname>srid</varname> is specified then then srid of " 12460"the raster is used. These are itemized below:" 12461msgstr "" 12462 12463#. Tag: para 12464#: reference_raster.xml:6240 12465#, no-c-format 12466msgid "" 12467"<varname>nbands</varname> is an array of bands to export (note that max is 4 " 12468"for PNG) and the order of the bands is RGBA. e.g ARRAY[3,2,1] means map band " 12469"3 to Red, band 2 to green and band 1 to blue" 12470msgstr "" 12471 12472#. Tag: para 12473#: reference_raster.xml:6245 12474#, no-c-format 12475msgid "" 12476"<varname>compression</varname> number from 1 to 9. The higher the number the " 12477"greater the compression." 12478msgstr "" 12479 12480#. Tag: para 12481#: reference_raster.xml:6250 12482#, no-c-format 12483msgid "" 12484"<varname>options</varname> text Array of GDAL options as defined for PNG " 12485"(look at create_options for PNG of <xref linkend=\"RT_ST_GDALDrivers\"/>). " 12486"For PNG valid one is only ZLEVEL (amount of time to spend on compression -- " 12487"default 6) e.g. ARRAY['ZLEVEL=9']. WORLDFILE is not allowed since the " 12488"function would have to output two outputs. Refer to <ulink url=\"http://www." 12489"gdal.org/frmt_various.html\">GDAL Raster format options</ulink> for more " 12490"details." 12491msgstr "" 12492 12493#. Tag: programlisting 12494#: reference_raster.xml:6269 12495#, no-c-format 12496msgid "" 12497"SELECT ST_AsPNG(rast) As rastpng\n" 12498"FROM dummy_rast WHERE rid=2;\n" 12499"\n" 12500"-- export the first 3 bands and map band 3 to Red, band 1 to Green, band 2 " 12501"to blue\n" 12502"SELECT ST_AsPNG(rast, ARRAY[3,1,2]) As rastpng\n" 12503"FROM dummy_rast WHERE rid=2;" 12504msgstr "" 12505"SELECT ST_AsPNG(rast) As rastpng\n" 12506"FROM dummy_rast WHERE rid=2;\n" 12507"\n" 12508"-- esporta le prime tre bande e assegna la banda 3 al rosso, la banda 1 al " 12509"verde e la banda 2 al blu\n" 12510"SELECT ST_AsPNG(rast, ARRAY[3,1,2]) As rastpng\n" 12511"FROM dummy_rast WHERE rid=2;" 12512 12513#. Tag: para 12514#: reference_raster.xml:6276 12515#, no-c-format 12516msgid "" 12517", <xref linkend=\"RT_ST_ColorMap\"/>, <xref linkend=\"RT_ST_GDALDrivers\"/>, " 12518"<xref linkend=\"RT_Raster_Applications\"/>" 12519msgstr "" 12520 12521#. Tag: refname 12522#: reference_raster.xml:6282 12523#, no-c-format 12524msgid "ST_AsTIFF" 12525msgstr "ST_AsTIFF" 12526 12527#. Tag: refpurpose 12528#: reference_raster.xml:6283 12529#, no-c-format 12530msgid "" 12531"Return the raster selected bands as a single TIFF image (byte array). If no " 12532"band is specified or any of specified bands does not exist in the raster, " 12533"then will try to use all bands." 12534msgstr "" 12535 12536#. Tag: funcsynopsis 12537#: reference_raster.xml:6287 12538#, no-c-format 12539msgid "" 12540"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12541"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12542"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=''</" 12543"parameter></paramdef> <paramdef><type>integer </type> " 12544"<parameter>srid=sameassource</parameter></paramdef> </funcprototype> " 12545"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12546"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12547"<paramdef choice=\"opt\"><type>text </type> <parameter>compression=''</" 12548"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 12549"<parameter>srid=sameassource</parameter></paramdef> </funcprototype> " 12550"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12551"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12552"<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef> " 12553"<paramdef choice=\"opt\"><type>text </type> <parameter>compression=''</" 12554"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 12555"<parameter>srid=sameassource</parameter></paramdef> </funcprototype> " 12556"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12557"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12558"<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef> " 12559"<paramdef><type>text[] </type> <parameter>options</parameter></paramdef> " 12560"<paramdef><type>integer </type> <parameter>srid=sameassource</parameter></" 12561"paramdef> </funcprototype>" 12562msgstr "" 12563"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12564"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12565"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=''</" 12566"parameter></paramdef> <paramdef><type>integer </type> " 12567"<parameter>srid=sameassource</parameter></paramdef> </funcprototype> " 12568"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12569"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12570"<paramdef choice=\"opt\"><type>text </type> <parameter>compression=''</" 12571"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 12572"<parameter>srid=sameassource</parameter></paramdef> </funcprototype> " 12573"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12574"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12575"<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef> " 12576"<paramdef choice=\"opt\"><type>text </type> <parameter>compression=''</" 12577"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 12578"<parameter>srid=sameassource</parameter></paramdef> </funcprototype> " 12579"<funcprototype> <funcdef>bytea <function>ST_AsTIFF</function></funcdef> " 12580"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12581"<paramdef><type>integer[] </type> <parameter>nbands</parameter></paramdef> " 12582"<paramdef><type>text[] </type> <parameter>options</parameter></paramdef> " 12583"<paramdef><type>integer </type> <parameter>srid=sameassource</parameter></" 12584"paramdef> </funcprototype>" 12585 12586#. Tag: para 12587#: reference_raster.xml:6320 12588#, no-c-format 12589msgid "" 12590"Returns the selected bands of the raster as a single Tagged Image File " 12591"Format (TIFF). If no band is specified, will try to use all bands. This is a " 12592"wrapper around <xref linkend=\"RT_ST_AsGDALRaster\"/>. Use <xref linkend=" 12593"\"RT_ST_AsGDALRaster\"/> if you need to export as less common raster types. " 12594"There are many variants of the function with many options. If no spatial " 12595"reference SRS text is present, the spatial reference of the raster is used. " 12596"These are itemized below:" 12597msgstr "" 12598 12599#. Tag: para 12600#: reference_raster.xml:6323 12601#, no-c-format 12602msgid "" 12603"<varname>nbands</varname> is an array of bands to export (note that max is 3 " 12604"for PNG) and the order of the bands is RGB. e.g ARRAY[3,2,1] means map band " 12605"3 to Red, band 2 to green and band 1 to blue" 12606msgstr "" 12607 12608#. Tag: para 12609#: reference_raster.xml:6328 12610#, no-c-format 12611msgid "" 12612"<varname>compression</varname> Compression expression -- JPEG90 (or some " 12613"other percent), LZW, JPEG, DEFLATE9." 12614msgstr "" 12615 12616#. Tag: para 12617#: reference_raster.xml:6333 12618#, no-c-format 12619msgid "" 12620"<varname>options</varname> text Array of GDAL create options as defined for " 12621"GTiff (look at create_options for GTiff of <xref linkend=\"RT_ST_GDALDrivers" 12622"\"/>). or refer to <ulink url=\"http://www.gdal.org/frmt_various.html\">GDAL " 12623"Raster format options</ulink> for more details." 12624msgstr "" 12625 12626#. Tag: para 12627#: reference_raster.xml:6338 12628#, no-c-format 12629msgid "" 12630"<varname>srid</varname> srid of spatial_ref_sys of the raster. This is used " 12631"to populate the georeference information" 12632msgstr "" 12633 12634#. Tag: title 12635#: reference_raster.xml:6347 12636#, no-c-format 12637msgid "Examples: Use jpeg compression 90%" 12638msgstr "" 12639 12640#. Tag: programlisting 12641#: reference_raster.xml:6349 12642#, no-c-format 12643msgid "" 12644"SELECT ST_AsTIFF(rast, 'JPEG90') As rasttiff\n" 12645"FROM dummy_rast WHERE rid=2;" 12646msgstr "" 12647 12648#. Tag: para 12649#: reference_raster.xml:6356 12650#, no-c-format 12651msgid "" 12652", <xref linkend=\"RT_ST_AsGDALRaster\"/>, <xref linkend=\"RT_ST_SRID\"/>" 12653msgstr "" 12654", <xref linkend=\"RT_ST_AsGDALRaster\"/>, <xref linkend=\"RT_ST_SRID\"/>" 12655 12656#. Tag: title 12657#: reference_raster.xml:6362 12658#, no-c-format 12659msgid "Raster Processing" 12660msgstr "" 12661 12662#. Tag: title 12663#: reference_raster.xml:6365 12664#, no-c-format 12665msgid "Map Algebra" 12666msgstr "" 12667 12668#. Tag: refname 12669#: reference_raster.xml:6369 12670#, no-c-format 12671msgid "ST_Clip" 12672msgstr "ST_Clip" 12673 12674#. Tag: refpurpose 12675#: reference_raster.xml:6370 12676#, no-c-format 12677msgid "" 12678"Returns the raster clipped by the input geometry. If band number not is " 12679"specified, all bands are processed. If <varname>crop</varname> is not " 12680"specified or TRUE, the output raster is cropped." 12681msgstr "" 12682 12683#. Tag: funcsynopsis 12684#: reference_raster.xml:6374 12685#, no-c-format 12686msgid "" 12687"<funcprototype> <funcdef>raster <function>ST_Clip</function></funcdef> " 12688"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12689"<paramdef><type>integer[] </type> <parameter>nband</parameter></paramdef> " 12690"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 12691"<paramdef choice=\"opt\"><type>double precision[] </type> " 12692"<parameter>nodataval=NULL</parameter></paramdef> <paramdef choice=\"opt" 12693"\"><type>boolean </type> <parameter>crop=TRUE</parameter></paramdef> </" 12694"funcprototype> <funcprototype> <funcdef>raster <function>ST_Clip</function></" 12695"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 12696"paramdef> <paramdef><type>integer </type> <parameter>nband</parameter></" 12697"paramdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 12698"paramdef> <paramdef><type>double precision </type> <parameter>nodataval</" 12699"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 12700"<parameter>crop=TRUE</parameter></paramdef> </funcprototype> <funcprototype> " 12701"<funcdef>raster <function>ST_Clip</function></funcdef> " 12702"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12703"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 12704"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 12705"<paramdef><type>boolean </type> <parameter>crop</parameter></paramdef> </" 12706"funcprototype> <funcprototype> <funcdef>raster <function>ST_Clip</function></" 12707"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 12708"paramdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 12709"paramdef> <paramdef choice=\"opt\"><type>double precision[] </type> " 12710"<parameter>nodataval=NULL</parameter></paramdef> <paramdef choice=\"opt" 12711"\"><type>boolean </type> <parameter>crop=TRUE</parameter></paramdef> </" 12712"funcprototype> <funcprototype> <funcdef>raster <function>ST_Clip</function></" 12713"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 12714"paramdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 12715"paramdef> <paramdef><type>double precision </type> <parameter>nodataval</" 12716"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 12717"<parameter>crop=TRUE</parameter></paramdef> </funcprototype> <funcprototype> " 12718"<funcdef>raster <function>ST_Clip</function></funcdef> " 12719"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12720"<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef> " 12721"<paramdef><type>boolean </type> <parameter>crop</parameter></paramdef> </" 12722"funcprototype>" 12723msgstr "" 12724 12725#. Tag: para 12726#: reference_raster.xml:6431 12727#, no-c-format 12728msgid "" 12729"Returns a raster that is clipped by the input geometry <varname>geom</" 12730"varname>. If band index is not specified, all bands are processed." 12731msgstr "" 12732 12733#. Tag: para 12734#: reference_raster.xml:6435 12735#, no-c-format 12736msgid "" 12737"Rasters resulting from ST_Clip must have a nodata value assigned for areas " 12738"clipped, one for each band. If none are provided and the input raster do not " 12739"have a nodata value defined, nodata values of the resulting raster are set " 12740"to ST_MinPossibleValue(ST_BandPixelType(rast, band)). When the number of " 12741"nodata value in the array is smaller than the number of band, the last one " 12742"in the array is used for the remaining bands. If the number of nodata value " 12743"is greater than the number of band, the extra nodata values are ignored. All " 12744"variants accepting an array of nodata values also accept a single value " 12745"which will be assigned to each band." 12746msgstr "" 12747 12748#. Tag: para 12749#: reference_raster.xml:6439 12750#, no-c-format 12751msgid "" 12752"If <varname>crop</varname> is not specified, true is assumed meaning the " 12753"output raster is cropped to the intersection of the <varname>geom</" 12754"varname>and <varname>rast</varname> extents. If <varname>crop</varname> is " 12755"set to false, the new raster gets the same extent as <varname>rast</varname>." 12756msgstr "" 12757 12758#. Tag: para 12759#: reference_raster.xml:6445 12760#, no-c-format 12761msgid "Enhanced: 2.1.0 Rewritten in C" 12762msgstr "" 12763 12764#. Tag: para 12765#: reference_raster.xml:6447 12766#, no-c-format 12767msgid "" 12768"Examples here use Massachusetts aerial data available on MassGIS site <ulink " 12769"url=\"http://www.mass.gov/mgis/colororthos2008.htm\">MassGIS Aerial Orthos</" 12770"ulink>. Coordinates are in Massachusetts State Plane Meters." 12771msgstr "" 12772 12773#. Tag: title 12774#: reference_raster.xml:6453 12775#, no-c-format 12776msgid "Examples: 1 band clipping" 12777msgstr "" 12778 12779#. Tag: programlisting 12780#: reference_raster.xml:6455 12781#, no-c-format 12782msgid "" 12783"-- Clip the first band of an aerial tile by a 20 meter buffer.\n" 12784"SELECT ST_Clip(rast, 1,\n" 12785" ST_Buffer(ST_Centroid(ST_Envelope(rast)),20)\n" 12786" ) from aerials.boston\n" 12787"WHERE rid = 4;" 12788msgstr "" 12789 12790#. Tag: programlisting 12791#: reference_raster.xml:6457 12792#, no-c-format 12793msgid "" 12794"-- Demonstrate effect of crop on final dimensions of raster\n" 12795"-- Note how final extent is clipped to that of the geometry\n" 12796"-- if crop = true\n" 12797"SELECT ST_XMax(ST_Envelope(ST_Clip(rast, 1, clipper, true))) As " 12798"xmax_w_trim,\n" 12799" ST_XMax(clipper) As xmax_clipper,\n" 12800" ST_XMax(ST_Envelope(ST_Clip(rast, 1, clipper, false))) As " 12801"xmax_wo_trim,\n" 12802" ST_XMax(ST_Envelope(rast)) As xmax_rast_orig\n" 12803"FROM (SELECT rast, ST_Buffer(ST_Centroid(ST_Envelope(rast)),6) As clipper\n" 12804" FROM aerials.boston\n" 12805"WHERE rid = 6) As foo;\n" 12806"\n" 12807" xmax_w_trim | xmax_clipper | xmax_wo_trim | xmax_rast_orig\n" 12808"------------------+------------------+------------------+------------------\n" 12809" 230657.436173996 | 230657.436173996 | 230666.436173996 | 230666.436173996" 12810msgstr "" 12811 12812#. Tag: para 12813#: reference_raster.xml:6471 reference_raster.xml:6514 12814#: reference_raster.xml:6557 12815#, no-c-format 12816msgid "Full raster tile before clipping" 12817msgstr "" 12818 12819#. Tag: para 12820#: reference_raster.xml:6485 reference_raster.xml:6571 12821#, no-c-format 12822msgid "After Clipping" 12823msgstr "" 12824 12825#. Tag: title 12826#: reference_raster.xml:6498 12827#, no-c-format 12828msgid "" 12829"Examples: 1 band clipping with no crop and add back other bands unchanged" 12830msgstr "" 12831 12832#. Tag: programlisting 12833#: reference_raster.xml:6500 12834#, no-c-format 12835msgid "" 12836"-- Same example as before, but we need to set crop to false to be able to " 12837"use ST_AddBand\n" 12838"-- because ST_AddBand requires all bands be the same Width and height\n" 12839"SELECT ST_AddBand(ST_Clip(rast, 1,\n" 12840" ST_Buffer(ST_Centroid(ST_Envelope(rast)),20),false\n" 12841" ), ARRAY[ST_Band(rast,2),ST_Band(rast,3)] ) from aerials.boston\n" 12842"WHERE rid = 6;" 12843msgstr "" 12844 12845#. Tag: para 12846#: reference_raster.xml:6528 12847#, no-c-format 12848msgid "After Clipping - surreal" 12849msgstr "" 12850 12851#. Tag: title 12852#: reference_raster.xml:6541 12853#, no-c-format 12854msgid "Examples: Clip all bands" 12855msgstr "" 12856 12857#. Tag: programlisting 12858#: reference_raster.xml:6543 12859#, no-c-format 12860msgid "" 12861"-- Clip all bands of an aerial tile by a 20 meter buffer.\n" 12862"-- Only difference is we don't specify a specific band to clip\n" 12863"-- so all bands are clipped\n" 12864"SELECT ST_Clip(rast,\n" 12865" ST_Buffer(ST_Centroid(ST_Envelope(rast)), 20),\n" 12866" false\n" 12867" ) from aerials.boston\n" 12868"WHERE rid = 4;" 12869msgstr "" 12870 12871#. Tag: para 12872#: reference_raster.xml:6586 12873#, no-c-format 12874msgid "" 12875", <xref linkend=\"RT_ST_MapAlgebra\"/>, <xref linkend=\"RT_ST_Intersection\"/" 12876">" 12877msgstr "" 12878 12879#. Tag: refname 12880#: reference_raster.xml:6596 12881#, no-c-format 12882msgid "ST_ColorMap" 12883msgstr "" 12884 12885#. Tag: refpurpose 12886#: reference_raster.xml:6597 12887#, no-c-format 12888msgid "" 12889"Creates a new raster of up to four 8BUI bands (grayscale, RGB, RGBA) from " 12890"the source raster and a specified band. Band 1 is assumed if not specified." 12891msgstr "" 12892 12893#. Tag: funcprototype 12894#: reference_raster.xml:6602 12895#, no-c-format 12896msgid "" 12897"<funcdef>raster <function>ST_ColorMap</function></funcdef> " 12898"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12899"<paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 12900"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 12901"<parameter>colormap=grayscale</parameter></paramdef> <paramdef choice=\"opt" 12902"\"><type>text </type> <parameter>method=INTERPOLATE</parameter></paramdef>" 12903msgstr "" 12904 12905#. Tag: funcprototype 12906#: reference_raster.xml:6612 12907#, no-c-format 12908msgid "" 12909"<funcdef>raster <function>ST_ColorMap</function></funcdef> " 12910"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 12911"<paramdef><type>text </type> <parameter>colormap</parameter></paramdef> " 12912"<paramdef choice=\"opt\"><type>text </type> <parameter>method=INTERPOLATE</" 12913"parameter></paramdef>" 12914msgstr "" 12915 12916#. Tag: para 12917#: reference_raster.xml:6624 12918#, no-c-format 12919msgid "" 12920"Apply a <varname>colormap</varname> to the band at <varname>nband</varname> " 12921"of <varname>rast</varname> resulting a new raster comprised of up to four " 12922"8BUI bands. The number of 8BUI bands in the new raster is determined by the " 12923"number of color components defined in <varname>colormap</varname>." 12924msgstr "" 12925 12926#. Tag: para 12927#: reference_raster.xml:6628 12928#, no-c-format 12929msgid "If <varname>nband</varname> is not specified, then band 1 is assumed." 12930msgstr "" 12931 12932#. Tag: para 12933#: reference_raster.xml:6630 12934#, no-c-format 12935msgid "" 12936"<varname>colormap</varname> can be a keyword of a pre-defined colormap or a " 12937"set of lines defining the value and the color components." 12938msgstr "" 12939 12940#. Tag: para 12941#: reference_raster.xml:6634 12942#, no-c-format 12943msgid "Valid pre-defined <varname>colormap</varname> keyword:" 12944msgstr "" 12945 12946#. Tag: para 12947#: reference_raster.xml:6640 12948#, no-c-format 12949msgid "" 12950"<varname>grayscale</varname> or <varname>greyscale</varname> for a one 8BUI " 12951"band raster of shades of gray." 12952msgstr "" 12953 12954#. Tag: para 12955#: reference_raster.xml:6645 12956#, no-c-format 12957msgid "" 12958"<varname>pseudocolor</varname> for a four 8BUI (RGBA) band raster with " 12959"colors going from blue to green to red." 12960msgstr "" 12961 12962#. Tag: para 12963#: reference_raster.xml:6650 12964#, no-c-format 12965msgid "" 12966"<varname>fire</varname> for a four 8BUI (RGBA) band raster with colors going " 12967"from black to red to pale yellow." 12968msgstr "" 12969 12970#. Tag: para 12971#: reference_raster.xml:6655 12972#, no-c-format 12973msgid "" 12974"<varname>bluered</varname> for a four 8BUI (RGBA) band raster with colors " 12975"going from blue to pale white to red." 12976msgstr "" 12977 12978#. Tag: para 12979#: reference_raster.xml:6661 12980#, no-c-format 12981msgid "" 12982"Users can pass a set of entries (one per line) to <varname>colormap</" 12983"varname> to specify custom colormaps. Each entry generally consists of five " 12984"values: the pixel value and corresponding Red, Green, Blue, Alpha components " 12985"(color components between 0 and 255). Percent values can be used instead of " 12986"pixel values where 0% and 100% are the minimum and maximum values found in " 12987"the raster band. Values can be separated with commas (','), tabs, colons " 12988"(':') and/or spaces. The pixel value can be set to <emphasis>nv</emphasis>, " 12989"<emphasis>null</emphasis> or <emphasis>nodata</emphasis> for the NODATA " 12990"value. An example is provided below." 12991msgstr "" 12992 12993#. Tag: programlisting 12994#: reference_raster.xml:6665 12995#, no-c-format 12996msgid "" 12997"5 0 0 0 255\n" 12998"4 100:50 55 255\n" 12999"1 150,100 150 255\n" 13000"0% 255 255 255 255\n" 13001"nv 0 0 0 0" 13002msgstr "" 13003 13004#. Tag: para 13005#: reference_raster.xml:6667 13006#, no-c-format 13007msgid "" 13008"The syntax of <varname>colormap</varname> is similar to that of the color-" 13009"relief mode of GDAL <ulink url=\"http://www.gdal.org/gdaldem." 13010"html#gdaldem_color_relief\">gdaldem</ulink>." 13011msgstr "" 13012 13013#. Tag: para 13014#: reference_raster.xml:6671 13015#, no-c-format 13016msgid "Valid keywords for <varname>method</varname>:" 13017msgstr "" 13018 13019#. Tag: para 13020#: reference_raster.xml:6677 13021#, no-c-format 13022msgid "" 13023"<varname>INTERPOLATE</varname> to use linear interpolation to smoothly blend " 13024"the colors between the given pixel values" 13025msgstr "" 13026 13027#. Tag: para 13028#: reference_raster.xml:6682 13029#, no-c-format 13030msgid "" 13031"<varname>EXACT</varname> to strictly match only those pixels values found in " 13032"the colormap. Pixels whose value does not match a colormap entry will be set " 13033"to 0 0 0 0 (RGBA)" 13034msgstr "" 13035 13036#. Tag: para 13037#: reference_raster.xml:6687 13038#, no-c-format 13039msgid "" 13040"<varname>NEAREST</varname> to use the colormap entry whose value is closest " 13041"to the pixel value" 13042msgstr "" 13043 13044#. Tag: para 13045#: reference_raster.xml:6694 13046#, no-c-format 13047msgid "" 13048"A great reference for colormaps is <ulink url=\"http://www.colorbrewer2.org" 13049"\">ColorBrewer</ulink>." 13050msgstr "" 13051 13052#. Tag: para 13053#: reference_raster.xml:6699 13054#, no-c-format 13055msgid "" 13056"The resulting bands of new raster will have no NODATA value set. Use <xref " 13057"linkend=\"RT_ST_SetBandNoDataValue\"/> to set a NODATA value if one is " 13058"needed." 13059msgstr "" 13060 13061#. Tag: para 13062#: reference_raster.xml:6709 13063#, no-c-format 13064msgid "This is a junk table to play with" 13065msgstr "" 13066 13067#. Tag: programlisting 13068#: reference_raster.xml:6711 13069#, no-c-format 13070msgid "" 13071"-- setup test raster table --\n" 13072"DROP TABLE IF EXISTS funky_shapes;\n" 13073"CREATE TABLE funky_shapes(rast raster);\n" 13074"\n" 13075"INSERT INTO funky_shapes(rast)\n" 13076"WITH ref AS (\n" 13077" SELECT ST_MakeEmptyRaster( 200, 200, 0, 200, 1, -1, 0, 0) AS rast\n" 13078")\n" 13079"SELECT\n" 13080" ST_Union(rast)\n" 13081"FROM (\n" 13082" SELECT\n" 13083" ST_AsRaster(\n" 13084" ST_Rotate(\n" 13085" ST_Buffer(\n" 13086" ST_GeomFromText('LINESTRING(0 2,50 " 13087"50,150 150,125 50)'),\n" 13088" i*2\n" 13089" ),\n" 13090" pi() * i * 0.125, ST_Point(50,50)\n" 13091" ),\n" 13092" ref.rast, '8BUI'::text, i * 5\n" 13093" ) AS rast\n" 13094" FROM ref\n" 13095" CROSS JOIN generate_series(1, 10, 3) AS i\n" 13096") AS shapes;" 13097msgstr "" 13098 13099#. Tag: programlisting 13100#: reference_raster.xml:6713 13101#, no-c-format 13102msgid "" 13103"SELECT\n" 13104" ST_NumBands(rast) As n_orig,\n" 13105" ST_NumBands(ST_ColorMap(rast,1, 'greyscale')) As ngrey,\n" 13106" ST_NumBands(ST_ColorMap(rast,1, 'pseudocolor')) As npseudo,\n" 13107" ST_NumBands(ST_ColorMap(rast,1, 'fire')) As nfire,\n" 13108" ST_NumBands(ST_ColorMap(rast,1, 'bluered')) As nbluered,\n" 13109" ST_NumBands(ST_ColorMap(rast,1, '\n" 13110"100% 255 0 0\n" 13111" 80% 160 0 0\n" 13112" 50% 130 0 0\n" 13113" 30% 30 0 0\n" 13114" 20% 60 0 0\n" 13115" 0% 0 0 0\n" 13116" nv 255 255 255\n" 13117" ')) As nred\n" 13118"FROM funky_shapes;" 13119msgstr "" 13120 13121#. Tag: screen 13122#: reference_raster.xml:6715 13123#, no-c-format 13124msgid "" 13125"n_orig | ngrey | npseudo | nfire | nbluered | nred\n" 13126"--------+-------+---------+-------+----------+------\n" 13127" 1 | 1 | 4 | 4 | 4 | 3" 13128msgstr "" 13129 13130#. Tag: title 13131#: reference_raster.xml:6719 13132#, no-c-format 13133msgid "Examples: Compare different color map looks using ST_AsPNG" 13134msgstr "" 13135 13136#. Tag: programlisting 13137#: reference_raster.xml:6720 13138#, no-c-format 13139msgid "" 13140"SELECT\n" 13141" ST_AsPNG(rast) As orig_png,\n" 13142" ST_AsPNG(ST_ColorMap(rast,1,'greyscale')) As grey_png,\n" 13143" ST_AsPNG(ST_ColorMap(rast,1, 'pseudocolor')) As pseudo_png,\n" 13144" ST_AsPNG(ST_ColorMap(rast,1, 'nfire')) As fire_png,\n" 13145" ST_AsPNG(ST_ColorMap(rast,1, 'bluered')) As bluered_png,\n" 13146" ST_AsPNG(ST_ColorMap(rast,1, '\n" 13147"100% 255 0 0\n" 13148" 80% 160 0 0\n" 13149" 50% 130 0 0\n" 13150" 30% 30 0 0\n" 13151" 20% 60 0 0\n" 13152" 0% 0 0 0\n" 13153" nv 255 255 255\n" 13154" ')) As red_png\n" 13155"FROM funky_shapes;" 13156msgstr "" 13157 13158#. Tag: para 13159#: reference_raster.xml:6734 13160#, no-c-format 13161msgid "orig_png" 13162msgstr "" 13163 13164#. Tag: para 13165#: reference_raster.xml:6748 13166#, no-c-format 13167msgid "grey_png" 13168msgstr "" 13169 13170#. Tag: para 13171#: reference_raster.xml:6762 13172#, no-c-format 13173msgid "pseudo_png" 13174msgstr "" 13175 13176#. Tag: para 13177#: reference_raster.xml:6778 13178#, no-c-format 13179msgid "fire_png" 13180msgstr "" 13181 13182#. Tag: para 13183#: reference_raster.xml:6792 13184#, no-c-format 13185msgid "bluered_png" 13186msgstr "" 13187 13188#. Tag: para 13189#: reference_raster.xml:6806 13190#, no-c-format 13191msgid "red_png" 13192msgstr "" 13193 13194#. Tag: para 13195#: reference_raster.xml:6820 13196#, fuzzy, no-c-format 13197msgid "" 13198", <xref linkend=\"RT_ST_AsRaster\"/> <xref linkend=\"RT_ST_MapAlgebra\"/>, " 13199"<xref linkend=\"RT_ST_Grayscale\"/> <xref linkend=\"RT_ST_NumBands\"/>, " 13200"<xref linkend=\"RT_ST_Reclass\"/>, <xref linkend=\"RT_ST_SetBandNoDataValue" 13201"\"/>, <xref linkend=\"RT_ST_Union\"/>" 13202msgstr "" 13203", <xref linkend=\"RT_ST_Min4ma\"/>, <xref linkend=\"RT_ST_Max4ma\"/>, <xref " 13204"linkend=\"RT_ST_Sum4ma\"/>, <xref linkend=\"RT_ST_Mean4ma\"/>, <xref linkend=" 13205"\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref linkend=" 13206"\"RT_ST_StdDev4ma\"/>" 13207 13208#. Tag: refname 13209#: reference_raster.xml:6835 13210#, fuzzy, no-c-format 13211msgid "ST_Grayscale" 13212msgstr "ST_Rescale" 13213 13214#. Tag: refpurpose 13215#: reference_raster.xml:6836 13216#, no-c-format 13217msgid "" 13218"Creates a new one-8BUI band raster from the source raster and specified " 13219"bands representing Red, Green and Blue" 13220msgstr "" 13221 13222#. Tag: funcprototype 13223#: reference_raster.xml:6841 13224#, fuzzy, no-c-format 13225msgid "" 13226"<funcdef>(1) raster <function>ST_Grayscale</function></funcdef> " 13227"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13228"<paramdef choice=\"opt\"><type>integer </type> <parameter>redband=1</" 13229"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13230"<parameter>greenband=2</parameter></paramdef> <paramdef choice=\"opt" 13231"\"><type>integer </type> <parameter>blueband=3</parameter></paramdef> " 13232"<paramdef choice=\"opt\"><type>text </type> " 13233"<parameter>extenttype=INTERSECTION</parameter></paramdef>" 13234msgstr "" 13235"<funcdef>bytea <function>ST_AsGDALRaster</function></funcdef> " 13236"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13237"<paramdef><type>text </type> <parameter>format</parameter></paramdef> " 13238"<paramdef choice=\"opt\"><type>text[] </type> <parameter>options=NULL</" 13239"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13240"<parameter>srid=sameassource</parameter></paramdef>" 13241 13242#. Tag: funcprototype 13243#: reference_raster.xml:6852 13244#, fuzzy, no-c-format 13245msgid "" 13246"<funcdef>(2) raster <function>ST_Grayscale</function></funcdef> " 13247"<paramdef><type>rastbandarg[] </type> <parameter>rastbandargset</parameter></" 13248"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13249"<parameter>extenttype=INTERSECTION</parameter></paramdef>" 13250msgstr "" 13251"<funcdef>text <function>ST_GeoReference</function></funcdef> " 13252"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13253"<paramdef choice=\"opt\"><type>text </type> <parameter>format=GDAL</" 13254"parameter></paramdef>" 13255 13256#. Tag: para 13257#: reference_raster.xml:6863 13258#, no-c-format 13259msgid "" 13260"Create a raster with one 8BUI band given three input bands (from one or more " 13261"rasters). Any input band whose pixel type is not 8BUI will be reclassified " 13262"using <xref linkend=\"RT_ST_Reclass\"/>." 13263msgstr "" 13264 13265#. Tag: para 13266#: reference_raster.xml:6868 13267#, no-c-format 13268msgid "" 13269"This function is not like <xref linkend=\"RT_ST_ColorMap\"/> with the " 13270"<varname>grayscale</varname> keyword as ST_ColorMap operates on only one " 13271"band while this function expects three bands for RGB. This function applies " 13272"the following equation for converting RGB to Grayscale: 0.2989 * RED + " 13273"0.5870 * GREEN + 0.1140 * BLUE" 13274msgstr "" 13275 13276#. Tag: programlisting 13277#: reference_raster.xml:6880 13278#, no-c-format 13279msgid "" 13280"SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';\n" 13281"SET postgis.enable_outdb_rasters = True;\n" 13282"\n" 13283"WITH apple AS (\n" 13284" SELECT ST_AddBand(\n" 13285" ST_MakeEmptyRaster(350, 246, 0, 0, 1, -1, 0, 0, 0),\n" 13286" '/tmp/apple.png'::text,\n" 13287" NULL::int[]\n" 13288" ) AS rast\n" 13289")\n" 13290"SELECT\n" 13291" ST_AsPNG(rast) AS original_png,\n" 13292" ST_AsPNG(ST_Grayscale(rast)) AS grayscale_png\n" 13293"FROM apple;" 13294msgstr "" 13295 13296#. Tag: para 13297#: reference_raster.xml:6894 13298#, no-c-format 13299msgid "original_png" 13300msgstr "" 13301 13302#. Tag: para 13303#: reference_raster.xml:6908 13304#, no-c-format 13305msgid "grayscale_png" 13306msgstr "" 13307 13308#. Tag: programlisting 13309#: reference_raster.xml:6924 13310#, no-c-format 13311msgid "" 13312"SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';\n" 13313"SET postgis.enable_outdb_rasters = True;\n" 13314"\n" 13315"WITH apple AS (\n" 13316" SELECT ST_AddBand(\n" 13317" ST_MakeEmptyRaster(350, 246, 0, 0, 1, -1, 0, 0, 0),\n" 13318" '/tmp/apple.png'::text,\n" 13319" NULL::int[]\n" 13320" ) AS rast\n" 13321")\n" 13322"SELECT\n" 13323" ST_AsPNG(rast) AS original_png,\n" 13324" ST_AsPNG(ST_Grayscale(\n" 13325" ARRAY[\n" 13326" ROW(rast, 1)::rastbandarg, -- red\n" 13327" ROW(rast, 2)::rastbandarg, -- green\n" 13328" ROW(rast, 3)::rastbandarg, -- blue\n" 13329" ]::rastbandarg[]\n" 13330" )) AS grayscale_png\n" 13331"FROM apple;" 13332msgstr "" 13333 13334#. Tag: para 13335#: reference_raster.xml:6929 13336#, fuzzy, no-c-format 13337msgid ", <xref linkend=\"RT_ST_Reclass\"/>, <xref linkend=\"RT_ST_ColorMap\"/>" 13338msgstr ", <xref linkend=\"RT_ST_ScaleX\"/>, <xref linkend=\"RT_ST_ScaleY\"/>" 13339 13340#. Tag: refname 13341#: reference_raster.xml:6940 13342#, no-c-format 13343msgid "ST_Intersection" 13344msgstr "ST_Intersection" 13345 13346#. Tag: refpurpose 13347#: reference_raster.xml:6941 13348#, no-c-format 13349msgid "" 13350"<refpurpose>Returns a raster or a set of geometry-pixelvalue pairs " 13351"representing the shared portion of two rasters or the geometrical " 13352"intersection of a vectorization of the raster and a geometry.</refpurpose>" 13353msgstr "" 13354 13355#. Tag: funcsynopsis 13356#: reference_raster.xml:6945 13357#, fuzzy, no-c-format 13358msgid "" 13359"<funcprototype> <funcdef>setof geomval <function>ST_Intersection</function></" 13360"funcdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 13361"paramdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 13362"paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13363"<parameter>band_num=1</parameter></paramdef> </funcprototype> " 13364"<funcprototype> <funcdef>setof geomval <function>ST_Intersection</function></" 13365"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 13366"paramdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 13367"paramdef> </funcprototype> <funcprototype> <funcdef>setof geomval " 13368"<function>ST_Intersection</function></funcdef> <paramdef><type>raster </" 13369"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 13370"<parameter>band</parameter></paramdef> <paramdef><type>geometry </type> " 13371"<parameter>geomin</parameter></paramdef> </funcprototype> <funcprototype> " 13372"<funcdef>raster <function>ST_Intersection</function></funcdef> " 13373"<paramdef><type>raster </type> <parameter>rast1</parameter></paramdef> " 13374"<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef> " 13375"<paramdef><type>double precision[] </type> <parameter>nodataval</parameter></" 13376"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 13377"<function>ST_Intersection</function></funcdef> <paramdef><type>raster </" 13378"type> <parameter>rast1</parameter></paramdef> <paramdef><type>raster </type> " 13379"<parameter>rast2</parameter></paramdef> <paramdef choice=\"opt\"><type>text " 13380"</type> <parameter>returnband</parameter></paramdef> <paramdef choice=\"opt" 13381"\"><type>double precision[] </type> <parameter>nodataval</parameter></" 13382"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 13383"<function>ST_Intersection</function></funcdef> <paramdef><type>raster </" 13384"type> <parameter>rast1</parameter></paramdef> <paramdef><type>integer </" 13385"type> <parameter>band1</parameter></paramdef> <paramdef><type>raster </type> " 13386"<parameter>rast2</parameter></paramdef> <paramdef><type>integer </type> " 13387"<parameter>band2</parameter></paramdef> <paramdef><type>double precision[] </" 13388"type> <parameter>nodataval</parameter></paramdef> </funcprototype> " 13389"<funcprototype> <funcdef>raster <function>ST_Intersection</function></" 13390"funcdef> <paramdef><type>raster </type> <parameter>rast1</parameter></" 13391"paramdef> <paramdef><type>integer </type> <parameter>band1</parameter></" 13392"paramdef> <paramdef><type>raster </type> <parameter>rast2</parameter></" 13393"paramdef> <paramdef><type>integer </type> <parameter>band2</parameter></" 13394"paramdef> <paramdef choice=\"opt\"><type>text </type> <parameter>returnband</" 13395"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision[] </" 13396"type> <parameter>nodataval</parameter></paramdef> </funcprototype>" 13397msgstr "" 13398"<funcprototype> <funcdef>setof geomval <function>ST_Intersection</function></" 13399"funcdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 13400"paramdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 13401"paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13402"<parameter>band_num=1</parameter></paramdef> </funcprototype> " 13403"<funcprototype> <funcdef>setof geomval <function>ST_Intersection</function></" 13404"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 13405"paramdef> <paramdef><type>geometry </type> <parameter>geom</parameter></" 13406"paramdef> </funcprototype> <funcprototype> <funcdef>setof geomval " 13407"<function>ST_Intersection</function></funcdef> <paramdef><type>raster </" 13408"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 13409"<parameter>band_num</parameter></paramdef> <paramdef><type>geometry </type> " 13410"<parameter>geom</parameter></paramdef> </funcprototype> <funcprototype> " 13411"<funcdef>raster <function>ST_Intersection</function></funcdef> " 13412"<paramdef><type>raster </type> <parameter>rast1</parameter></paramdef> " 13413"<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef> " 13414"<paramdef><type>double precision[] </type> <parameter>nodataval</parameter></" 13415"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 13416"<function>ST_Intersection</function></funcdef> <paramdef><type>raster </" 13417"type> <parameter>rast1</parameter></paramdef> <paramdef><type>raster </type> " 13418"<parameter>rast2</parameter></paramdef> <paramdef choice=\"opt\"><type>text " 13419"</type> <parameter>returnband='BOTH'</parameter></paramdef> <paramdef choice=" 13420"\"opt\"><type>double precision[] </type> <parameter>nodataval=NULL</" 13421"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 13422"<function>ST_Intersection</function></funcdef> <paramdef><type>raster </" 13423"type> <parameter>rast1</parameter></paramdef> <paramdef><type>integer </" 13424"type> <parameter>band_num1</parameter></paramdef> <paramdef><type>raster </" 13425"type> <parameter>rast2</parameter></paramdef> <paramdef><type>integer </" 13426"type> <parameter>band_num2</parameter></paramdef> <paramdef><type>double " 13427"precision[] </type> <parameter>nodataval</parameter></paramdef> </" 13428"funcprototype> <funcprototype> <funcdef>raster <function>ST_Intersection</" 13429"function></funcdef> <paramdef><type>raster </type> <parameter>rast1</" 13430"parameter></paramdef> <paramdef><type>integer </type> <parameter>band_num1</" 13431"parameter></paramdef> <paramdef><type>raster </type> <parameter>rast2</" 13432"parameter></paramdef> <paramdef><type>integer </type> <parameter>band_num2</" 13433"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 13434"<parameter>returnband='BOTH'</parameter></paramdef> <paramdef choice=\"opt" 13435"\"><type>double precision[] </type> <parameter>nodataval=NULL</parameter></" 13436"paramdef> </funcprototype>" 13437 13438#. Tag: para 13439#: reference_raster.xml:7005 13440#, no-c-format 13441msgid "" 13442"<para>Returns a raster or a set of geometry-pixelvalue pairs representing " 13443"the shared portion of two rasters or the geometrical intersection of a " 13444"vectorization of the raster and a geometry.</para>" 13445msgstr "" 13446 13447#. Tag: para 13448#: reference_raster.xml:7009 13449#, no-c-format 13450msgid "" 13451"The first three variants, returning a setof geomval, works in vector space. " 13452"The raster is first vectorized (using <xref linkend=\"RT_ST_DumpAsPolygons\"/" 13453">) into a set of geomval rows and those rows are then intersected with the " 13454"geometry using the <xref linkend=\"ST_Intersection\"/> (geometry, geometry) " 13455"PostGIS function. Geometries intersecting only with a nodata value area of a " 13456"raster returns an empty geometry. They are normally excluded from the " 13457"results by the proper usage of <xref linkend=\"RT_ST_Intersects\"/> in the " 13458"WHERE clause." 13459msgstr "" 13460 13461#. Tag: para 13462#: reference_raster.xml:7013 13463#, no-c-format 13464msgid "" 13465"You can access the geometry and the value parts of the resulting set of " 13466"geomval by surrounding them with parenthesis and adding '.geom' or '.val' at " 13467"the end of the expression. e.g. (ST_Intersection(rast, geom)).geom" 13468msgstr "" 13469 13470#. Tag: para 13471#: reference_raster.xml:7017 13472#, no-c-format 13473msgid "" 13474"The other variants, returning a raster, works in raster space. They are " 13475"using the two rasters version of ST_MapAlgebraExpr to perform the " 13476"intersection." 13477msgstr "" 13478 13479#. Tag: para 13480#: reference_raster.xml:7021 13481#, no-c-format 13482msgid "" 13483"The extent of the resulting raster corresponds to the geometrical " 13484"intersection of the two raster extents. The resulting raster includes " 13485"'BAND1', 'BAND2' or 'BOTH' bands, following what is passed as the " 13486"<varname>returnband</varname> parameter. Nodata value areas present in any " 13487"band results in nodata value areas in every bands of the result. In other " 13488"words, any pixel intersecting with a nodata value pixel becomes a nodata " 13489"value pixel in the result." 13490msgstr "" 13491 13492#. Tag: para 13493#: reference_raster.xml:7025 13494#, no-c-format 13495msgid "" 13496"Rasters resulting from ST_Intersection must have a nodata value assigned for " 13497"areas not intersecting. You can define or replace the nodata value for any " 13498"resulting band by providing a <varname>nodataval[]</varname> array of one or " 13499"two nodata values depending if you request 'BAND1', 'BAND2' or 'BOTH' bands. " 13500"The first value in the array replace the nodata value in the first band and " 13501"the second value replace the nodata value in the second band. If one input " 13502"band do not have a nodata value defined and none are provided as an array, " 13503"one is chosen using the ST_MinPossibleValue function. All variant accepting " 13504"an array of nodata value can also accept a single value which will be " 13505"assigned to each requested band." 13506msgstr "" 13507 13508#. Tag: para 13509#: reference_raster.xml:7029 13510#, no-c-format 13511msgid "" 13512"In all variants, if no band number is specified band 1 is assumed. If you " 13513"need an intersection between a raster and geometry that returns a raster, " 13514"refer to <xref linkend=\"RT_ST_Clip\"/>." 13515msgstr "" 13516 13517#. Tag: para 13518#: reference_raster.xml:7034 13519#, no-c-format 13520msgid "" 13521"To get more control on the resulting extent or on what to return when " 13522"encountering a nodata value, use the two rasters version of <xref linkend=" 13523"\"RT_ST_MapAlgebraExpr2\"/>." 13524msgstr "" 13525 13526#. Tag: para 13527#: reference_raster.xml:7040 13528#, no-c-format 13529msgid "" 13530"To compute the intersection of a raster band with a geometry in raster " 13531"space, use <xref linkend=\"RT_ST_Clip\"/>. ST_Clip works on multiple bands " 13532"rasters and does not return a band corresponding to the rasterized geometry." 13533msgstr "" 13534 13535#. Tag: para 13536#: reference_raster.xml:7046 13537#, no-c-format 13538msgid "" 13539"ST_Intersection should be used in conjunction with <xref linkend=" 13540"\"RT_ST_Intersects\"/> and an index on the raster column and/or the geometry " 13541"column." 13542msgstr "" 13543 13544#. Tag: para 13545#: reference_raster.xml:7051 13546#, no-c-format 13547msgid "" 13548"Enhanced: 2.0.0 - Intersection in the raster space was introduced. In " 13549"earlier pre-2.0.0 versions, only intersection performed in vector space were " 13550"supported." 13551msgstr "" 13552 13553#. Tag: title 13554#: reference_raster.xml:7057 13555#, no-c-format 13556msgid "Examples: Geometry, Raster -- resulting in geometry vals" 13557msgstr "" 13558 13559#. Tag: programlisting 13560#: reference_raster.xml:7059 13561#, no-c-format 13562msgid "" 13563"SELECT\n" 13564" foo.rid,\n" 13565" foo.gid,\n" 13566" ST_AsText((foo.geomval).geom) As geomwkt,\n" 13567" (foo.geomval).val\n" 13568"FROM (\n" 13569" SELECT\n" 13570" A.rid,\n" 13571" g.gid,\n" 13572" ST_Intersection(A.rast, g.geom) As geomval\n" 13573" FROM dummy_rast AS A\n" 13574" CROSS JOIN (\n" 13575" VALUES\n" 13576" (1, ST_Point(3427928, 5793243.85) ),\n" 13577" (2, ST_GeomFromText('LINESTRING(3427927.85 " 13578"5793243.75,3427927.8 5793243.75,3427927.8 5793243.8)')),\n" 13579" (3, ST_GeomFromText('LINESTRING(1 2, 3 4)'))\n" 13580" ) As g(gid,geom)\n" 13581" WHERE A.rid = 2\n" 13582") As foo;\n" 13583"\n" 13584" rid | gid | " 13585"geomwkt " 13586"| val\n" 13587"-----+-----" 13588"+---------------------------------------------------------------------------------------------\n" 13589" 2 | 1 | POINT(3427928 " 13590"5793243.85) " 13591"| 249\n" 13592" 2 | 1 | POINT(3427928 " 13593"5793243.85) " 13594"| 253\n" 13595" 2 | 2 | POINT(3427927.85 " 13596"5793243.75) | " 13597"254\n" 13598" 2 | 2 | POINT(3427927.8 " 13599"5793243.8) " 13600"| 251\n" 13601" 2 | 2 | POINT(3427927.8 " 13602"5793243.8) " 13603"| 253\n" 13604" 2 | 2 | LINESTRING(3427927.8 5793243.75,3427927.8 5793243.8) | " 13605"252\n" 13606" 2 | 2 | MULTILINESTRING((3427927.8 5793243.8,3427927.8 5793243.75),...) " 13607"| 250\n" 13608" 2 | 3 | GEOMETRYCOLLECTION EMPTY" 13609msgstr "" 13610 13611#. Tag: para 13612#: reference_raster.xml:7064 13613#, no-c-format 13614msgid "" 13615", <xref linkend=\"RT_ST_Intersects\"/>, <xref linkend=" 13616"\"RT_ST_MapAlgebraExpr2\"/>, <xref linkend=\"RT_ST_Clip\"/>, <xref linkend=" 13617"\"ST_AsText\"/>" 13618msgstr "" 13619", <xref linkend=\"RT_ST_Intersects\"/>, <xref linkend=" 13620"\"RT_ST_MapAlgebraExpr2\"/>, <xref linkend=\"RT_ST_Clip\"/>, <xref linkend=" 13621"\"ST_AsText\"/>" 13622 13623#. Tag: refname 13624#: reference_raster.xml:7076 13625#, no-c-format 13626msgid "ST_MapAlgebra (callback function version)" 13627msgstr "" 13628 13629#. Tag: refpurpose 13630#: reference_raster.xml:7077 13631#, no-c-format 13632msgid "" 13633"Callback function version - Returns a one-band raster given one or more " 13634"input rasters, band indexes and one user-specified callback function." 13635msgstr "" 13636 13637#. Tag: funcsynopsis 13638#: reference_raster.xml:7083 13639#, fuzzy, no-c-format 13640msgid "" 13641"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13642"<paramdef><type>rastbandarg[] </type> <parameter>rastbandargset</parameter></" 13643"paramdef> <paramdef><type>regprocedure </type> <parameter>callbackfunc</" 13644"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 13645"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13646"\"><type>text </type> <parameter>extenttype=INTERSECTION</parameter></" 13647"paramdef> <paramdef choice=\"opt\"><type>raster </type> " 13648"<parameter>customextent=NULL</parameter></paramdef> <paramdef choice=\"opt" 13649"\"><type>integer </type> <parameter>distancex=0</parameter></paramdef> " 13650"<paramdef choice=\"opt\"><type>integer </type> <parameter>distancey=0</" 13651"parameter></paramdef> <paramdef choice=\"opt\"><type>text[] </type> " 13652"<parameter>VARIADIC userargs=NULL</parameter></paramdef> </funcprototype> " 13653"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13654"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13655"<paramdef><type>integer[] </type> <parameter>nband</parameter></paramdef> " 13656"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13657"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13658"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13659"\"><type>text </type> <parameter>extenttype=FIRST</parameter></paramdef> " 13660"<paramdef choice=\"opt\"><type>raster </type> <parameter>customextent=NULL</" 13661"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13662"<parameter>distancex=0</parameter></paramdef> <paramdef choice=\"opt" 13663"\"><type>integer </type> <parameter>distancey=0</parameter></paramdef> " 13664"<paramdef choice=\"opt\"><type>text[] </type> <parameter>VARIADIC " 13665"userargs=NULL</parameter></paramdef> </funcprototype> <funcprototype> " 13666"<funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13667"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13668"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 13669"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13670"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13671"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13672"\"><type>text </type> <parameter>extenttype=FIRST</parameter></paramdef> " 13673"<paramdef choice=\"opt\"><type>raster </type> <parameter>customextent=NULL</" 13674"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13675"<parameter>distancex=0</parameter></paramdef> <paramdef choice=\"opt" 13676"\"><type>integer </type> <parameter>distancey=0</parameter></paramdef> " 13677"<paramdef choice=\"opt\"><type>text[] </type> <parameter>VARIADIC " 13678"userargs=NULL</parameter></paramdef> </funcprototype> <funcprototype> " 13679"<funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13680"<paramdef><type>raster </type> <parameter>rast1</parameter></paramdef> " 13681"<paramdef><type>integer </type> <parameter>nband1</parameter></paramdef> " 13682"<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef> " 13683"<paramdef><type>integer </type> <parameter>nband2</parameter></paramdef> " 13684"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13685"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13686"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13687"\"><type>text </type> <parameter>extenttype=INTERSECTION</parameter></" 13688"paramdef> <paramdef choice=\"opt\"><type>raster </type> " 13689"<parameter>customextent=NULL</parameter></paramdef> <paramdef choice=\"opt" 13690"\"><type>integer </type> <parameter>distancex=0</parameter></paramdef> " 13691"<paramdef choice=\"opt\"><type>integer </type> <parameter>distancey=0</" 13692"parameter></paramdef> <paramdef choice=\"opt\"><type>text[] </type> " 13693"<parameter>VARIADIC userargs=NULL</parameter></paramdef> </funcprototype> " 13694"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13695"<paramdef><type>nband</type> <parameter>integer</parameter></paramdef> " 13696"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13697"paramdef> <paramdef><type>float8[] </type> <parameter>mask</parameter></" 13698"paramdef> <paramdef><type>boolean </type> <parameter>weighted</parameter></" 13699"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13700"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13701"\"><type>text </type> <parameter>extenttype=INTERSECTION</parameter></" 13702"paramdef> <paramdef choice=\"opt\"><type>raster </type> " 13703"<parameter>customextent=NULL</parameter></paramdef> <paramdef choice=\"opt" 13704"\"><type>text[] </type> <parameter>VARIADIC userargs=NULL</parameter></" 13705"paramdef> </funcprototype>" 13706msgstr "" 13707"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13708"<paramdef><type>rastbandarg[] </type> <parameter>rastbandargset</parameter></" 13709"paramdef> <paramdef><type>regprocedure </type> <parameter>callbackfunc</" 13710"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 13711"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13712"\"><type>text </type> <parameter>extenttype=INTERSECTION</parameter></" 13713"paramdef> <paramdef choice=\"opt\"><type>raster </type> " 13714"<parameter>customextent=NULL</parameter></paramdef> <paramdef choice=\"opt" 13715"\"><type>integer </type> <parameter>distancex=0</parameter></paramdef> " 13716"<paramdef choice=\"opt\"><type>integer </type> <parameter>distancey=0</" 13717"parameter></paramdef> <paramdef choice=\"opt\"><type>text[] </type> " 13718"<parameter>VARIADIC userargs=NULL</parameter></paramdef> </funcprototype> " 13719"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13720"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13721"<paramdef><type>integer[] </type> <parameter>nband</parameter></paramdef> " 13722"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13723"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13724"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13725"\"><type>text </type> <parameter>extenttype=FIRST</parameter></paramdef> " 13726"<paramdef choice=\"opt\"><type>raster </type> <parameter>customextent=NULL</" 13727"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13728"<parameter>distancex=0</parameter></paramdef> <paramdef choice=\"opt" 13729"\"><type>integer </type> <parameter>distancey=0</parameter></paramdef> " 13730"<paramdef choice=\"opt\"><type>text[] </type> <parameter>VARIADIC " 13731"userargs=NULL</parameter></paramdef> </funcprototype> <funcprototype> " 13732"<funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13733"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 13734"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 13735"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13736"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13737"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13738"\"><type>text </type> <parameter>extenttype=FIRST</parameter></paramdef> " 13739"<paramdef choice=\"opt\"><type>raster </type> <parameter>customextent=NULL</" 13740"parameter></paramdef> <paramdef choice=\"opt\"><type>integer </type> " 13741"<parameter>distancex=0</parameter></paramdef> <paramdef choice=\"opt" 13742"\"><type>integer </type> <parameter>distancey=0</parameter></paramdef> " 13743"<paramdef choice=\"opt\"><type>text[] </type> <parameter>VARIADIC " 13744"userargs=NULL</parameter></paramdef> </funcprototype> <funcprototype> " 13745"<funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 13746"<paramdef><type>raster </type> <parameter>rast1</parameter></paramdef> " 13747"<paramdef><type>integer </type> <parameter>nband1</parameter></paramdef> " 13748"<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef> " 13749"<paramdef><type>integer </type> <parameter>nband2</parameter></paramdef> " 13750"<paramdef><type>regprocedure </type> <parameter>callbackfunc</parameter></" 13751"paramdef> <paramdef choice=\"opt\"><type>text </type> " 13752"<parameter>pixeltype=NULL</parameter></paramdef> <paramdef choice=\"opt" 13753"\"><type>text </type> <parameter>extenttype=INTERSECTION</parameter></" 13754"paramdef> <paramdef choice=\"opt\"><type>raster </type> " 13755"<parameter>customextent=NULL</parameter></paramdef> <paramdef choice=\"opt" 13756"\"><type>integer </type> <parameter>distancex=0</parameter></paramdef> " 13757"<paramdef choice=\"opt\"><type>integer </type> <parameter>distancey=0</" 13758"parameter></paramdef> <paramdef choice=\"opt\"><type>text[] </type> " 13759"<parameter>VARIADIC userargs=NULL</parameter></paramdef> </funcprototype>" 13760 13761#. Tag: para 13762#: reference_raster.xml:7155 13763#, no-c-format 13764msgid "" 13765"Returns a one-band raster given one or more input rasters, band indexes and " 13766"one user-specified callback function." 13767msgstr "" 13768 13769#. Tag: term 13770#: reference_raster.xml:7161 13771#, no-c-format 13772msgid "rast,rast1,rast2, rastbandargset" 13773msgstr "" 13774 13775#. Tag: para 13776#: reference_raster.xml:7163 13777#, no-c-format 13778msgid "Rasters on which the map algebra process is evaluated." 13779msgstr "" 13780 13781#. Tag: para 13782#: reference_raster.xml:7164 13783#, no-c-format 13784msgid "" 13785"<varname>rastbandargset</varname> allows the use of a map algebra operation " 13786"on many rasters and/or many bands. See example Variant 1." 13787msgstr "" 13788 13789#. Tag: term 13790#: reference_raster.xml:7169 13791#, no-c-format 13792msgid "nband, nband1, nband2" 13793msgstr "" 13794 13795#. Tag: para 13796#: reference_raster.xml:7171 13797#, no-c-format 13798msgid "" 13799"Band numbers of the raster to be evaluated. nband can be an integer or " 13800"integer[] denoting the bands. nband1 is band on rast1 and nband2 is band on " 13801"rast2 for hte 2 raster/2band case." 13802msgstr "" 13803 13804#. Tag: term 13805#: reference_raster.xml:7177 13806#, no-c-format 13807msgid "callbackfunc" 13808msgstr "" 13809 13810#. Tag: para 13811#: reference_raster.xml:7179 13812#, no-c-format 13813msgid "" 13814"The <varname>callbackfunc</varname> parameter must be the name and signature " 13815"of an SQL or PL/pgSQL function, cast to a regprocedure. An example PL/pgSQL " 13816"function example is: <programlisting>\n" 13817"CREATE OR REPLACE FUNCTION sample_callbackfunc(value double precision[][][], " 13818"position integer[][], VARIADIC userargs text[])\n" 13819" RETURNS double precision\n" 13820" AS $$\n" 13821" BEGIN\n" 13822" RETURN 0;\n" 13823" END;\n" 13824" $$ LANGUAGE 'plpgsql' IMMUTABLE;\n" 13825" </" 13826"programlisting> The <varname>callbackfunc</varname> must have three " 13827"arguments: a 3-dimension double precision array, a 2-dimension integer array " 13828"and a variadic 1-dimension text array. The first argument <varname>value</" 13829"varname> is the set of values (as double precision) from all input rasters. " 13830"The three dimensions (where indexes are 1-based) are: raster #, row y, " 13831"column x. The second argument <varname>position</varname> is the set of " 13832"pixel positions from the output raster and input rasters. The outer " 13833"dimension (where indexes are 0-based) is the raster #. The position at outer " 13834"dimension index 0 is the output raster's pixel position. For each outer " 13835"dimension, there are two elements in the inner dimension for X and Y. The " 13836"third argument <varname>userargs</varname> is for passing through any user-" 13837"specified arguments." 13838msgstr "" 13839 13840#. Tag: para 13841#: reference_raster.xml:7186 13842#, no-c-format 13843msgid "" 13844"Passing a <type>regprocedure</type> argument to a SQL function requires the " 13845"full function signature to be passed, then cast to a <type>regprocedure</" 13846"type> type. To pass the above example PL/pgSQL function as an argument, the " 13847"SQL for the argument is: <programlisting>\n" 13848"'sample_callbackfunc(double precision[], integer[], text[])'::regprocedure\n" 13849" </" 13850"programlisting> Note that the argument contains the name of the function, " 13851"the types of the function arguments, quotes around the name and argument " 13852"types, and a cast to a <type>regprocedure</type>." 13853msgstr "" 13854 13855#. Tag: term 13856#: reference_raster.xml:7198 13857#, no-c-format 13858msgid "mask" 13859msgstr "" 13860 13861#. Tag: para 13862#: reference_raster.xml:7200 13863#, no-c-format 13864msgid "" 13865"An n-dimensional array (matrix) of numbers used to filter what cells get " 13866"passed to map algebra call-back function. 0 means a neighbor cell value " 13867"should be treated as no-data and 1 means value should be treated as data. If " 13868"weight is set to true, then the values, are used as multipliers to multiple " 13869"the pixel value of that value in the neighborhood position." 13870msgstr "" 13871 13872#. Tag: term 13873#: reference_raster.xml:7207 13874#, no-c-format 13875msgid "weighted" 13876msgstr "" 13877 13878#. Tag: para 13879#: reference_raster.xml:7209 13880#, no-c-format 13881msgid "" 13882"boolean (true/false) to denote if a mask value should be weighted " 13883"(multiplied by original value) or not (only applies to proto that takes a " 13884"mask)." 13885msgstr "" 13886 13887#. Tag: term 13888#: reference_raster.xml:7216 reference_raster.xml:7541 13889#: reference_raster.xml:7836 reference_raster.xml:8390 13890#, no-c-format 13891msgid "pixeltype" 13892msgstr "pixeltype" 13893 13894#. Tag: para 13895#: reference_raster.xml:7218 13896#, no-c-format 13897msgid "" 13898"If <varname>pixeltype</varname> is passed in, the one band of the new raster " 13899"will be of that pixeltype. If pixeltype is passed NULL or left out, the new " 13900"raster band will have the same pixeltype as the specified band of the first " 13901"raster (for extent types: INTERSECTION, UNION, FIRST, CUSTOM) or the " 13902"specified band of the appropriate raster (for extent types: SECOND, LAST). " 13903"If in doubt, always specify <varname>pixeltype</varname>." 13904msgstr "" 13905 13906#. Tag: para 13907#: reference_raster.xml:7221 13908#, no-c-format 13909msgid "" 13910"The resulting pixel type of the output raster must be one listed in <xref " 13911"linkend=\"RT_ST_BandPixelType\"/> or left out or set to NULL." 13912msgstr "" 13913 13914#. Tag: term 13915#: reference_raster.xml:7228 reference_raster.xml:7549 13916#: reference_raster.xml:7845 13917#, no-c-format 13918msgid "extenttype" 13919msgstr "" 13920 13921#. Tag: para 13922#: reference_raster.xml:7230 13923#, no-c-format 13924msgid "" 13925"Possible values are INTERSECTION (default), UNION, FIRST (default for one " 13926"raster variants), SECOND, LAST, CUSTOM." 13927msgstr "" 13928 13929#. Tag: term 13930#: reference_raster.xml:7237 13931#, no-c-format 13932msgid "customextent" 13933msgstr "" 13934 13935#. Tag: para 13936#: reference_raster.xml:7239 13937#, no-c-format 13938msgid "" 13939"If <varname>extentype</varname> is CUSTOM, a raster must be provided for " 13940"<varname>customextent</varname>. See example 4 of Variant 1." 13941msgstr "" 13942 13943#. Tag: term 13944#: reference_raster.xml:7246 13945#, no-c-format 13946msgid "distancex" 13947msgstr "" 13948 13949#. Tag: para 13950#: reference_raster.xml:7248 13951#, no-c-format 13952msgid "" 13953"The distance in pixels from the reference cell in x direction. So width of " 13954"resulting matrix would be <code>2*distancex + 1</code>.If not specified only " 13955"the reference cell is considered (neighborhood of 0)." 13956msgstr "" 13957 13958#. Tag: term 13959#: reference_raster.xml:7255 13960#, no-c-format 13961msgid "distancey" 13962msgstr "" 13963 13964#. Tag: para 13965#: reference_raster.xml:7257 13966#, no-c-format 13967msgid "" 13968"The distance in pixels from reference cell in y direction. Height of " 13969"resulting matrix would be <code>2*distancey + 1</code> .If not specified " 13970"only the reference cell is considered (neighborhood of 0)." 13971msgstr "" 13972 13973#. Tag: term 13974#: reference_raster.xml:7264 13975#, no-c-format 13976msgid "userargs" 13977msgstr "" 13978 13979#. Tag: para 13980#: reference_raster.xml:7266 13981#, no-c-format 13982msgid "" 13983"The third argument to the <varname>callbackfunc</varname> is a " 13984"<type>variadic text</type> array. All trailing text arguments are passed " 13985"through to the specified <varname>callbackfunc</varname>, and are contained " 13986"in the <varname>userargs</varname> argument." 13987msgstr "" 13988 13989#. Tag: para 13990#: reference_raster.xml:7274 reference_raster.xml:8165 13991#: reference_raster.xml:8284 13992#, no-c-format 13993msgid "" 13994"For more information about the VARIADIC keyword, please refer to the " 13995"PostgreSQL documentation and the \"SQL Functions with Variable Numbers of " 13996"Arguments\" section of <ulink url=\"http://www.postgresql.org/docs/current/" 13997"static/xfunc-sql.html\">Query Language (SQL) Functions</ulink>." 13998msgstr "" 13999 14000#. Tag: para 14001#: reference_raster.xml:7280 14002#, no-c-format 14003msgid "" 14004"The <type>text[]</type> argument to the <varname>callbackfunc</varname> is " 14005"required, regardless of whether you choose to pass any arguments to the " 14006"callback function for processing or not." 14007msgstr "" 14008 14009#. Tag: para 14010#: reference_raster.xml:7285 14011#, no-c-format 14012msgid "" 14013"Variant 1 accepts an array of <varname>rastbandarg</varname> allowing the " 14014"use of a map algebra operation on many rasters and/or many bands. See " 14015"example Variant 1." 14016msgstr "" 14017 14018#. Tag: para 14019#: reference_raster.xml:7289 14020#, no-c-format 14021msgid "" 14022"Variants 2 and 3 operate upon one or more bands of one raster. See example " 14023"Variant 2 and 3." 14024msgstr "" 14025 14026#. Tag: para 14027#: reference_raster.xml:7293 14028#, no-c-format 14029msgid "" 14030"Variant 4 operate upon two rasters with one band per raster. See example " 14031"Variant 4." 14032msgstr "" 14033 14034#. Tag: para 14035#: reference_raster.xml:7297 14036#, no-c-format 14037msgid "Availability: 2.2.0: Ability to add a mask" 14038msgstr "" 14039 14040#. Tag: para 14041#: reference_raster.xml:7305 reference_raster.xml:7327 14042#, no-c-format 14043msgid "One raster, one band" 14044msgstr "" 14045 14046#. Tag: programlisting 14047#: reference_raster.xml:7306 14048#, no-c-format 14049msgid "" 14050"WITH foo AS (\n" 14051" SELECT 1 AS rid, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, " 14052"0, 0), 1, '16BUI', 1, 0) AS rast\n" 14053")\n" 14054"SELECT\n" 14055" ST_MapAlgebra(\n" 14056" ARRAY[ROW(rast, 1)]::rastbandarg[],\n" 14057" 'sample_callbackfunc(double precision[], int[], text[])'::" 14058"regprocedure\n" 14059" ) AS rast\n" 14060"FROM foo" 14061msgstr "" 14062 14063#. Tag: para 14064#: reference_raster.xml:7308 reference_raster.xml:7324 14065#, no-c-format 14066msgid "One raster, several bands" 14067msgstr "" 14068 14069#. Tag: programlisting 14070#: reference_raster.xml:7309 14071#, no-c-format 14072msgid "" 14073"WITH foo AS (\n" 14074" SELECT 1 AS rid, " 14075"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, " 14076"0), 1, '16BUI', 1, 0), 2, '8BUI', 10, 0), 3, '32BUI', 100, 0) AS rast\n" 14077")\n" 14078"SELECT\n" 14079" ST_MapAlgebra(\n" 14080" ARRAY[ROW(rast, 3), ROW(rast, 1), ROW(rast, 3), ROW(rast, " 14081"2)]::rastbandarg[],\n" 14082" 'sample_callbackfunc(double precision[], int[], text[])'::" 14083"regprocedure\n" 14084" ) AS rast\n" 14085"FROM foo" 14086msgstr "" 14087 14088#. Tag: para 14089#: reference_raster.xml:7311 14090#, no-c-format 14091msgid "Several rasters, several bands" 14092msgstr "" 14093 14094#. Tag: programlisting 14095#: reference_raster.xml:7312 14096#, no-c-format 14097msgid "" 14098"WITH foo AS (\n" 14099" SELECT 1 AS rid, " 14100"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, " 14101"0), 1, '16BUI', 1, 0), 2, '8BUI', 10, 0), 3, '32BUI', 100, 0) AS rast UNION " 14102"ALL\n" 14103" SELECT 2 AS rid, " 14104"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 1, 1, -1, 0, 0, " 14105"0), 1, '16BUI', 2, 0), 2, '8BUI', 20, 0), 3, '32BUI', 300, 0) AS rast\n" 14106")\n" 14107"SELECT\n" 14108" ST_MapAlgebra(\n" 14109" ARRAY[ROW(t1.rast, 3), ROW(t2.rast, 1), ROW(t2.rast, 3), " 14110"ROW(t1.rast, 2)]::rastbandarg[],\n" 14111" 'sample_callbackfunc(double precision[], int[], text[])'::" 14112"regprocedure\n" 14113" ) AS rast\n" 14114"FROM foo t1\n" 14115"CROSS JOIN foo t2\n" 14116"WHERE t1.rid = 1\n" 14117" AND t2.rid = 2" 14118msgstr "" 14119 14120#. Tag: para 14121#: reference_raster.xml:7314 14122#, no-c-format 14123msgid "" 14124"Complete example of tiles of a coverage with neighborhood. This query only " 14125"works with PostgreSQL 9.1 or higher." 14126msgstr "" 14127 14128#. Tag: programlisting 14129#: reference_raster.xml:7315 14130#, no-c-format 14131msgid "" 14132"WITH foo AS (\n" 14133" SELECT 0 AS rid, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, " 14134"0, 0), 1, '16BUI', 1, 0) AS rast UNION ALL\n" 14135" SELECT 1, ST_AddBand(ST_MakeEmptyRaster(2, 2, 2, 0, 1, -1, 0, 0, 0), " 14136"1, '16BUI', 2, 0) AS rast UNION ALL\n" 14137" SELECT 2, ST_AddBand(ST_MakeEmptyRaster(2, 2, 4, 0, 1, -1, 0, 0, 0), " 14138"1, '16BUI', 3, 0) AS rast UNION ALL\n" 14139"\n" 14140" SELECT 3, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, -2, 1, -1, 0, 0, " 14141"0), 1, '16BUI', 10, 0) AS rast UNION ALL\n" 14142" SELECT 4, ST_AddBand(ST_MakeEmptyRaster(2, 2, 2, -2, 1, -1, 0, 0, " 14143"0), 1, '16BUI', 20, 0) AS rast UNION ALL\n" 14144" SELECT 5, ST_AddBand(ST_MakeEmptyRaster(2, 2, 4, -2, 1, -1, 0, 0, " 14145"0), 1, '16BUI', 30, 0) AS rast UNION ALL\n" 14146"\n" 14147" SELECT 6, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, -4, 1, -1, 0, 0, " 14148"0), 1, '16BUI', 100, 0) AS rast UNION ALL\n" 14149" SELECT 7, ST_AddBand(ST_MakeEmptyRaster(2, 2, 2, -4, 1, -1, 0, 0, " 14150"0), 1, '16BUI', 200, 0) AS rast UNION ALL\n" 14151" SELECT 8, ST_AddBand(ST_MakeEmptyRaster(2, 2, 4, -4, 1, -1, 0, 0, " 14152"0), 1, '16BUI', 300, 0) AS rast\n" 14153")\n" 14154"SELECT\n" 14155" t1.rid,\n" 14156" ST_MapAlgebra(\n" 14157" ARRAY[ROW(ST_Union(t2.rast), 1)]::rastbandarg[],\n" 14158" 'sample_callbackfunc(double precision[], int[], text[])'::" 14159"regprocedure,\n" 14160" '32BUI',\n" 14161" 'CUSTOM', t1.rast,\n" 14162" 1, 1\n" 14163" ) AS rast\n" 14164"FROM foo t1\n" 14165"CROSS JOIN foo t2\n" 14166"WHERE t1.rid = 4\n" 14167" AND t2.rid BETWEEN 0 AND 8\n" 14168" AND ST_Intersects(t1.rast, t2.rast)\n" 14169"GROUP BY t1.rid, t1.rast" 14170msgstr "" 14171 14172#. Tag: para 14173#: reference_raster.xml:7317 14174#, no-c-format 14175msgid "" 14176"Example like the prior one for tiles of a coverage with neighborhood but " 14177"works with PostgreSQL 9.0." 14178msgstr "" 14179 14180#. Tag: programlisting 14181#: reference_raster.xml:7318 14182#, no-c-format 14183msgid "" 14184"WITH src AS (\n" 14185" SELECT 0 AS rid, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, " 14186"0, 0), 1, '16BUI', 1, 0) AS rast UNION ALL\n" 14187" SELECT 1, ST_AddBand(ST_MakeEmptyRaster(2, 2, 2, 0, 1, -1, 0, 0, 0), " 14188"1, '16BUI', 2, 0) AS rast UNION ALL\n" 14189" SELECT 2, ST_AddBand(ST_MakeEmptyRaster(2, 2, 4, 0, 1, -1, 0, 0, 0), " 14190"1, '16BUI', 3, 0) AS rast UNION ALL\n" 14191"\n" 14192" SELECT 3, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, -2, 1, -1, 0, 0, " 14193"0), 1, '16BUI', 10, 0) AS rast UNION ALL\n" 14194" SELECT 4, ST_AddBand(ST_MakeEmptyRaster(2, 2, 2, -2, 1, -1, 0, 0, " 14195"0), 1, '16BUI', 20, 0) AS rast UNION ALL\n" 14196" SELECT 5, ST_AddBand(ST_MakeEmptyRaster(2, 2, 4, -2, 1, -1, 0, 0, " 14197"0), 1, '16BUI', 30, 0) AS rast UNION ALL\n" 14198"\n" 14199" SELECT 6, ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, -4, 1, -1, 0, 0, " 14200"0), 1, '16BUI', 100, 0) AS rast UNION ALL\n" 14201" SELECT 7, ST_AddBand(ST_MakeEmptyRaster(2, 2, 2, -4, 1, -1, 0, 0, " 14202"0), 1, '16BUI', 200, 0) AS rast UNION ALL\n" 14203" SELECT 8, ST_AddBand(ST_MakeEmptyRaster(2, 2, 4, -4, 1, -1, 0, 0, " 14204"0), 1, '16BUI', 300, 0) AS rast\n" 14205")\n" 14206"WITH foo AS (\n" 14207" SELECT\n" 14208" t1.rid,\n" 14209" ST_Union(t2.rast) AS rast\n" 14210" FROM src t1\n" 14211" JOIN src t2\n" 14212" ON ST_Intersects(t1.rast, t2.rast)\n" 14213" AND t2.rid BETWEEN 0 AND 8\n" 14214" WHERE t1.rid = 4\n" 14215" GROUP BY t1.rid\n" 14216"), bar AS (\n" 14217" SELECT\n" 14218" t1.rid,\n" 14219" ST_MapAlgebra(\n" 14220" ARRAY[ROW(t2.rast, 1)]::rastbandarg[],\n" 14221" 'raster_nmapalgebra_test(double precision[], int[], " 14222"text[])'::regprocedure,\n" 14223" '32BUI',\n" 14224" 'CUSTOM', t1.rast,\n" 14225" 1, 1\n" 14226" ) AS rast\n" 14227" FROM src t1\n" 14228" JOIN foo t2\n" 14229" ON t1.rid = t2.rid\n" 14230")\n" 14231"SELECT\n" 14232" rid,\n" 14233" (ST_Metadata(rast)),\n" 14234" (ST_BandMetadata(rast, 1)),\n" 14235" ST_Value(rast, 1, 1, 1)\n" 14236"FROM bar;" 14237msgstr "" 14238 14239#. Tag: title 14240#: reference_raster.xml:7322 14241#, no-c-format 14242msgid "Examples: Variants 2 and 3" 14243msgstr "" 14244 14245#. Tag: programlisting 14246#: reference_raster.xml:7325 14247#, no-c-format 14248msgid "" 14249"WITH foo AS (\n" 14250" SELECT 1 AS rid, " 14251"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, " 14252"0), 1, '16BUI', 1, 0), 2, '8BUI', 10, 0), 3, '32BUI', 100, 0) AS rast\n" 14253")\n" 14254"SELECT\n" 14255" ST_MapAlgebra(\n" 14256" rast, ARRAY[3, 1, 3, 2]::integer[],\n" 14257" 'sample_callbackfunc(double precision[], int[], text[])'::" 14258"regprocedure\n" 14259" ) AS rast\n" 14260"FROM foo" 14261msgstr "" 14262 14263#. Tag: programlisting 14264#: reference_raster.xml:7328 14265#, no-c-format 14266msgid "" 14267"WITH foo AS (\n" 14268" SELECT 1 AS rid, " 14269"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, " 14270"0), 1, '16BUI', 1, 0), 2, '8BUI', 10, 0), 3, '32BUI', 100, 0) AS rast\n" 14271")\n" 14272"SELECT\n" 14273" ST_MapAlgebra(\n" 14274" rast, 2,\n" 14275" 'sample_callbackfunc(double precision[], int[], text[])'::" 14276"regprocedure\n" 14277" ) AS rast\n" 14278"FROM foo" 14279msgstr "" 14280 14281#. Tag: title 14282#: reference_raster.xml:7332 14283#, no-c-format 14284msgid "Examples: Variant 4" 14285msgstr "" 14286 14287#. Tag: para 14288#: reference_raster.xml:7334 14289#, no-c-format 14290msgid "Two rasters, two bands" 14291msgstr "" 14292 14293#. Tag: programlisting 14294#: reference_raster.xml:7335 14295#, no-c-format 14296msgid "" 14297"WITH foo AS (\n" 14298" SELECT 1 AS rid, " 14299"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, " 14300"0), 1, '16BUI', 1, 0), 2, '8BUI', 10, 0), 3, '32BUI', 100, 0) AS rast UNION " 14301"ALL\n" 14302" SELECT 2 AS rid, " 14303"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 1, 1, -1, 0, 0, " 14304"0), 1, '16BUI', 2, 0), 2, '8BUI', 20, 0), 3, '32BUI', 300, 0) AS rast\n" 14305")\n" 14306"SELECT\n" 14307" ST_MapAlgebra(\n" 14308" t1.rast, 2,\n" 14309" t2.rast, 1,\n" 14310" 'sample_callbackfunc(double precision[], int[], text[])'::" 14311"regprocedure\n" 14312" ) AS rast\n" 14313"FROM foo t1\n" 14314"CROSS JOIN foo t2\n" 14315"WHERE t1.rid = 1\n" 14316" AND t2.rid = 2" 14317msgstr "" 14318 14319#. Tag: title 14320#: reference_raster.xml:7340 14321#, no-c-format 14322msgid "Examples: Using Masks" 14323msgstr "" 14324 14325#. Tag: programlisting 14326#: reference_raster.xml:7341 14327#, no-c-format 14328msgid "" 14329"WITH foo AS (SELECT\n" 14330" ST_SetBandNoDataValue(\n" 14331"ST_SetValue(ST_SetValue(ST_AsRaster(\n" 14332" ST_Buffer(\n" 14333" ST_GeomFromText('LINESTRING(50 50,100 90,100 50)'), " 14334"5,'join=bevel'),\n" 14335" 200,200,ARRAY['8BUI'], ARRAY[100], ARRAY[0]), " 14336"ST_Buffer('POINT(70 70)'::geometry,10,'quad_segs=1') ,50),\n" 14337" 'LINESTRING(20 20, 100 100, 150 98)'::geometry,1),0) AS rast )\n" 14338"SELECT 'original' AS title, rast\n" 14339"FROM foo\n" 14340"UNION ALL\n" 14341"SELECT 'no mask mean value' AS title, " 14342"ST_MapAlgebra(rast,1,'ST_mean4ma(double precision[], int[], text[])'::" 14343"regprocedure) AS rast\n" 14344"FROM foo\n" 14345"UNION ALL\n" 14346"SELECT 'mask only consider neighbors, exclude center' AS title, " 14347"ST_MapAlgebra(rast,1,'ST_mean4ma(double precision[], int[], text[])'::" 14348"regprocedure,\n" 14349" '{{1,1,1}, {1,0,1}, {1,1,1}}'::double precision[], false) As rast\n" 14350"FROM foo\n" 14351"\n" 14352"UNION ALL\n" 14353"SELECT 'mask weighted only consider neighbors, exclude center multi otehr " 14354"pixel values by 2' AS title, ST_MapAlgebra(rast,1,'ST_mean4ma(double " 14355"precision[], int[], text[])'::regprocedure,\n" 14356" '{{2,2,2}, {2,0,2}, {2,2,2}}'::double precision[], true) As rast\n" 14357"FROM foo;" 14358msgstr "" 14359 14360#. Tag: para 14361#: reference_raster.xml:7355 14362#, no-c-format 14363msgid "original" 14364msgstr "" 14365 14366#. Tag: para 14367#: reference_raster.xml:7369 14368#, no-c-format 14369msgid "no mask mean value (same as having all 1s in mask matrix)" 14370msgstr "" 14371 14372#. Tag: para 14373#: reference_raster.xml:7385 14374#, no-c-format 14375msgid "mask only consider neighbors, exclude center" 14376msgstr "" 14377 14378#. Tag: para 14379#: reference_raster.xml:7399 14380#, no-c-format 14381msgid "" 14382"mask weighted only consider neighbors, exclude center multi other pixel " 14383"values by 2" 14384msgstr "" 14385 14386#. Tag: para 14387#: reference_raster.xml:7416 14388#, no-c-format 14389msgid "" 14390", <xref linkend=\"RT_ST_Union\"/>, <xref linkend=\"RT_ST_MapAlgebra_expr\"/>" 14391msgstr "" 14392 14393#. Tag: refname 14394#: reference_raster.xml:7427 14395#, fuzzy, no-c-format 14396msgid "ST_MapAlgebra (expression version)" 14397msgstr "ST_MapAlgebraExpr" 14398 14399#. Tag: refpurpose 14400#: reference_raster.xml:7428 14401#, no-c-format 14402msgid "" 14403"<refpurpose>Expression version - Returns a one-band raster given one or two " 14404"input rasters, band indexes and one or more user-specified SQL expressions.</" 14405"refpurpose>" 14406msgstr "" 14407 14408#. Tag: funcsynopsis 14409#: reference_raster.xml:7434 14410#, no-c-format 14411msgid "" 14412"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 14413"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 14414"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 14415"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 14416"<paramdef><type>text </type> <parameter>expression</parameter></paramdef> " 14417"<paramdef choice=\"opt\"><type>double precision </type> " 14418"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 14419"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 14420"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 14421"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 14422"<paramdef><type>text </type> <parameter>expression</parameter></paramdef> " 14423"<paramdef choice=\"opt\"><type>double precision </type> " 14424"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 14425"<funcprototype> <funcdef>raster <function>ST_MapAlgebra</function></funcdef> " 14426"<paramdef><type>raster </type> <parameter>rast1</parameter></paramdef> " 14427"<paramdef><type>integer </type> <parameter>nband1</parameter></paramdef> " 14428"<paramdef><type>raster </type> <parameter>rast2</parameter></paramdef> " 14429"<paramdef><type>integer </type> <parameter>nband2</parameter></paramdef> " 14430"<paramdef><type>text </type> <parameter>expression</parameter></paramdef> " 14431"<paramdef choice=\"opt\"><type>text </type> <parameter>pixeltype=NULL</" 14432"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 14433"<parameter>extenttype=INTERSECTION</parameter></paramdef> <paramdef choice=" 14434"\"opt\"><type>text </type> <parameter>nodata1expr=NULL</parameter></" 14435"paramdef> <paramdef choice=\"opt\"><type>text </type> " 14436"<parameter>nodata2expr=NULL</parameter></paramdef> <paramdef choice=\"opt" 14437"\"><type>double precision </type> <parameter>nodatanodataval=NULL</" 14438"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 14439"<function>ST_MapAlgebra</function></funcdef> <paramdef><type>raster </type> " 14440"<parameter>rast1</parameter></paramdef> <paramdef><type>raster </type> " 14441"<parameter>rast2</parameter></paramdef> <paramdef><type>text </type> " 14442"<parameter>expression</parameter></paramdef> <paramdef choice=\"opt" 14443"\"><type>text </type> <parameter>pixeltype=NULL</parameter></paramdef> " 14444"<paramdef choice=\"opt\"><type>text </type> " 14445"<parameter>extenttype=INTERSECTION</parameter></paramdef> <paramdef choice=" 14446"\"opt\"><type>text </type> <parameter>nodata1expr=NULL</parameter></" 14447"paramdef> <paramdef choice=\"opt\"><type>text </type> " 14448"<parameter>nodata2expr=NULL</parameter></paramdef> <paramdef choice=\"opt" 14449"\"><type>double precision </type> <parameter>nodatanodataval=NULL</" 14450"parameter></paramdef> </funcprototype>" 14451msgstr "" 14452 14453#. Tag: para 14454#: reference_raster.xml:7485 14455#, no-c-format 14456msgid "" 14457"<para>Expression version - Returns a one-band raster given one or two input " 14458"rasters, band indexes and one or more user-specified SQL expressions.</para>" 14459msgstr "" 14460 14461#. Tag: title 14462#: reference_raster.xml:7493 14463#, no-c-format 14464msgid "Description: Variants 1 and 2 (one raster)" 14465msgstr "" 14466 14467#. Tag: para 14468#: reference_raster.xml:7495 14469#, no-c-format 14470msgid "" 14471"Creates a new one band raster formed by applying a valid PostgreSQL " 14472"algebraic operation defined by the <varname>expression</varname> on the " 14473"input raster (<varname>rast</varname>). If <varname>nband</varname> is not " 14474"provided, band 1 is assumed. The new raster will have the same georeference, " 14475"width, and height as the original raster but will only have one band." 14476msgstr "" 14477 14478#. Tag: para 14479#: reference_raster.xml:7499 reference_raster.xml:7701 14480#: reference_raster.xml:8149 14481#, no-c-format 14482msgid "" 14483"If <varname>pixeltype</varname> is passed in, then the new raster will have " 14484"a band of that pixeltype. If pixeltype is passed NULL, then the new raster " 14485"band will have the same pixeltype as the input <varname>rast</varname> band." 14486msgstr "" 14487 14488#. Tag: para 14489#: reference_raster.xml:7504 14490#, no-c-format 14491msgid "Keywords permitted for <varname>expression</varname>" 14492msgstr "" 14493 14494#. Tag: para 14495#: reference_raster.xml:7507 14496#, no-c-format 14497msgid "<varname>[rast]</varname> - Pixel value of the pixel of interest" 14498msgstr "" 14499 14500#. Tag: para 14501#: reference_raster.xml:7510 14502#, no-c-format 14503msgid "<varname>[rast.val]</varname> - Pixel value of the pixel of interest" 14504msgstr "" 14505 14506#. Tag: para 14507#: reference_raster.xml:7513 14508#, no-c-format 14509msgid "" 14510"<varname>[rast.x]</varname> - 1-based pixel column of the pixel of interest" 14511msgstr "" 14512 14513#. Tag: para 14514#: reference_raster.xml:7516 14515#, no-c-format 14516msgid "" 14517"<varname>[rast.y]</varname> - 1-based pixel row of the pixel of interest" 14518msgstr "" 14519 14520#. Tag: title 14521#: reference_raster.xml:7525 14522#, no-c-format 14523msgid "Description: Variants 3 and 4 (two raster)" 14524msgstr "" 14525 14526#. Tag: para 14527#: reference_raster.xml:7527 reference_raster.xml:7821 14528#, no-c-format 14529msgid "" 14530"Creates a new one band raster formed by applying a valid PostgreSQL " 14531"algebraic operation to the two bands defined by the <varname>expression</" 14532"varname> on the two input raster bands <varname>rast1</varname>, " 14533"(<varname>rast2</varname>). If no <varname>band1</varname>, <varname>band2</" 14534"varname> is specified band 1 is assumed. The resulting raster will be " 14535"aligned (scale, skew and pixel corners) on the grid defined by the first " 14536"raster. The resulting raster will have the extent defined by the " 14537"<varname>extenttype</varname> parameter." 14538msgstr "" 14539 14540#. Tag: term 14541#: reference_raster.xml:7533 reference_raster.xml:7827 14542#, no-c-format 14543msgid "expression" 14544msgstr "espressione" 14545 14546#. Tag: para 14547#: reference_raster.xml:7535 reference_raster.xml:7829 14548#, no-c-format 14549msgid "" 14550"A PostgreSQL algebraic expression involving the two rasters and PostgreSQL " 14551"defined functions/operators that will define the pixel value when pixels " 14552"intersect. e.g. (([rast1] + [rast2])/2.0)::integer" 14553msgstr "" 14554 14555#. Tag: para 14556#: reference_raster.xml:7543 reference_raster.xml:7838 14557#, no-c-format 14558msgid "" 14559"The resulting pixel type of the output raster. Must be one listed in <xref " 14560"linkend=\"RT_ST_BandPixelType\"/>, left out or set to NULL. If not passed in " 14561"or set to NULL, will default to the pixeltype of the first raster." 14562msgstr "" 14563 14564#. Tag: para 14565#: reference_raster.xml:7551 reference_raster.xml:7847 14566#, no-c-format 14567msgid "Controls the extent of resulting raster" 14568msgstr "" 14569 14570#. Tag: para 14571#: reference_raster.xml:7557 reference_raster.xml:7850 14572#, no-c-format 14573msgid "" 14574"<varname>INTERSECTION</varname> - The extent of the new raster is the " 14575"intersection of the two rasters. This is the default." 14576msgstr "" 14577 14578#. Tag: para 14579#: reference_raster.xml:7562 reference_raster.xml:7855 14580#, no-c-format 14581msgid "" 14582"<varname>UNION</varname> - The extent of the new raster is the union of the " 14583"two rasters." 14584msgstr "" 14585 14586#. Tag: para 14587#: reference_raster.xml:7567 reference_raster.xml:7860 14588#, no-c-format 14589msgid "" 14590"<varname>FIRST</varname> - The extent of the new raster is the same as the " 14591"one of the first raster." 14592msgstr "" 14593 14594#. Tag: para 14595#: reference_raster.xml:7572 reference_raster.xml:7865 14596#, no-c-format 14597msgid "" 14598"<varname>SECOND</varname> - The extent of the new raster is the same as the " 14599"one of the second raster." 14600msgstr "" 14601 14602#. Tag: term 14603#: reference_raster.xml:7580 reference_raster.xml:7874 14604#, no-c-format 14605msgid "nodata1expr" 14606msgstr "" 14607 14608#. Tag: para 14609#: reference_raster.xml:7582 reference_raster.xml:7876 14610#, no-c-format 14611msgid "" 14612"An algebraic expression involving only <varname>rast2</varname> or a " 14613"constant that defines what to return when pixels of <varname>rast1</varname> " 14614"are nodata values and spatially corresponding rast2 pixels have values." 14615msgstr "" 14616 14617#. Tag: term 14618#: reference_raster.xml:7588 reference_raster.xml:7883 14619#, no-c-format 14620msgid "nodata2expr" 14621msgstr "" 14622 14623#. Tag: para 14624#: reference_raster.xml:7590 reference_raster.xml:7885 14625#, no-c-format 14626msgid "" 14627"An algebraic expression involving only <varname>rast1</varname> or a " 14628"constant that defines what to return when pixels of <varname>rast2</varname> " 14629"are nodata values and spatially corresponding rast1 pixels have values." 14630msgstr "" 14631 14632#. Tag: term 14633#: reference_raster.xml:7596 reference_raster.xml:7892 14634#, no-c-format 14635msgid "nodatanodataval" 14636msgstr "" 14637 14638#. Tag: para 14639#: reference_raster.xml:7598 reference_raster.xml:7894 14640#, no-c-format 14641msgid "" 14642"A numeric constant to return when spatially corresponding rast1 and rast2 " 14643"pixels are both nodata values." 14644msgstr "" 14645 14646#. Tag: para 14647#: reference_raster.xml:7606 14648#, no-c-format 14649msgid "" 14650"Keywords permitted in <varname>expression</varname>, <varname>nodata1expr</" 14651"varname> and <varname>nodata2expr</varname>" 14652msgstr "" 14653 14654#. Tag: para 14655#: reference_raster.xml:7609 14656#, no-c-format 14657msgid "" 14658"<varname>[rast1]</varname> - Pixel value of the pixel of interest from " 14659"<varname>rast1</varname>" 14660msgstr "" 14661 14662#. Tag: para 14663#: reference_raster.xml:7612 14664#, no-c-format 14665msgid "" 14666"<varname>[rast1.val]</varname> - Pixel value of the pixel of interest from " 14667"<varname>rast1</varname>" 14668msgstr "" 14669 14670#. Tag: para 14671#: reference_raster.xml:7615 14672#, no-c-format 14673msgid "" 14674"<varname>[rast1.x]</varname> - 1-based pixel column of the pixel of interest " 14675"from <varname>rast1</varname>" 14676msgstr "" 14677 14678#. Tag: para 14679#: reference_raster.xml:7618 14680#, no-c-format 14681msgid "" 14682"<varname>[rast1.y]</varname> - 1-based pixel row of the pixel of interest " 14683"from <varname>rast1</varname>" 14684msgstr "" 14685 14686#. Tag: para 14687#: reference_raster.xml:7621 14688#, no-c-format 14689msgid "" 14690"<varname>[rast2]</varname> - Pixel value of the pixel of interest from " 14691"<varname>rast2</varname>" 14692msgstr "" 14693 14694#. Tag: para 14695#: reference_raster.xml:7624 14696#, no-c-format 14697msgid "" 14698"<varname>[rast2.val]</varname> - Pixel value of the pixel of interest from " 14699"<varname>rast2</varname>" 14700msgstr "" 14701 14702#. Tag: para 14703#: reference_raster.xml:7627 14704#, no-c-format 14705msgid "" 14706"<varname>[rast2.x]</varname> - 1-based pixel column of the pixel of interest " 14707"from <varname>rast2</varname>" 14708msgstr "" 14709 14710#. Tag: para 14711#: reference_raster.xml:7630 14712#, no-c-format 14713msgid "" 14714"<varname>[rast2.y]</varname> - 1-based pixel row of the pixel of interest " 14715"from <varname>rast2</varname>" 14716msgstr "" 14717 14718#. Tag: title 14719#: reference_raster.xml:7638 14720#, no-c-format 14721msgid "Examples: Variants 1 and 2" 14722msgstr "" 14723 14724#. Tag: programlisting 14725#: reference_raster.xml:7640 14726#, no-c-format 14727msgid "" 14728"WITH foo AS (\n" 14729" SELECT ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 0, 0, 0), " 14730"'32BF'::text, 1, -1) AS rast\n" 14731")\n" 14732"SELECT\n" 14733" ST_MapAlgebra(rast, 1, NULL, 'ceil([rast]*[rast.x]/[rast.y]+[rast." 14734"val])')\n" 14735"FROM foo;" 14736msgstr "" 14737 14738#. Tag: title 14739#: reference_raster.xml:7644 14740#, no-c-format 14741msgid "Examples: Variant 3 and 4" 14742msgstr "" 14743 14744#. Tag: programlisting 14745#: reference_raster.xml:7646 14746#, no-c-format 14747msgid "" 14748"WITH foo AS (\n" 14749" SELECT 1 AS rid, " 14750"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, -1, 0, 0, " 14751"0), 1, '16BUI', 1, 0), 2, '8BUI', 10, 0), 3, '32BUI'::text, 100, 0) AS rast " 14752"UNION ALL\n" 14753" SELECT 2 AS rid, " 14754"ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 1, 1, -1, 0, 0, " 14755"0), 1, '16BUI', 2, 0), 2, '8BUI', 20, 0), 3, '32BUI'::text, 300, 0) AS rast\n" 14756")\n" 14757"SELECT\n" 14758" ST_MapAlgebra(\n" 14759" t1.rast, 2,\n" 14760" t2.rast, 1,\n" 14761" '([rast2] + [rast1.val]) / 2'\n" 14762" ) AS rast\n" 14763"FROM foo t1\n" 14764"CROSS JOIN foo t2\n" 14765"WHERE t1.rid = 1\n" 14766" AND t2.rid = 2;" 14767msgstr "" 14768 14769#. Tag: para 14770#: reference_raster.xml:7652 14771#, no-c-format 14772msgid ", <xref linkend=\"RT_ST_Union\"/>, <xref linkend=\"RT_ST_MapAlgebra\"/>" 14773msgstr "" 14774 14775#. Tag: refname 14776#: reference_raster.xml:7662 reference_raster.xml:7776 14777#, no-c-format 14778msgid "ST_MapAlgebraExpr" 14779msgstr "ST_MapAlgebraExpr" 14780 14781#. Tag: refpurpose 14782#: reference_raster.xml:7663 14783#, no-c-format 14784msgid "" 14785"1 raster band version: Creates a new one band raster formed by applying a " 14786"valid PostgreSQL algebraic operation on the input raster band and of " 14787"pixeltype provided. Band 1 is assumed if no band is specified." 14788msgstr "" 14789 14790#. Tag: funcsynopsis 14791#: reference_raster.xml:7667 14792#, no-c-format 14793msgid "" 14794"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 14795"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 14796"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 14797"paramdef> <paramdef><type>text </type> <parameter>pixeltype</parameter></" 14798"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 14799"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 14800"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 14801"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 14802"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 14803"paramdef> <paramdef><type>text </type> <parameter>pixeltype</parameter></" 14804"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 14805"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 14806"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype>" 14807msgstr "" 14808"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 14809"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 14810"paramdef> <paramdef><type>integer </type> <parameter>band</parameter></" 14811"paramdef> <paramdef><type>text </type> <parameter>pixeltype</parameter></" 14812"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 14813"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 14814"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 14815"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 14816"funcdef> <paramdef><type>raster </type> <parameter>rast</parameter></" 14817"paramdef> <paramdef><type>text </type> <parameter>pixeltype</parameter></" 14818"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 14819"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 14820"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype>" 14821 14822#. Tag: para 14823#: reference_raster.xml:7692 reference_raster.xml:7816 14824#, no-c-format 14825msgid "" 14826"is deprecated as of 2.1.0. Use <xref linkend=\"RT_ST_MapAlgebra_expr\"/> " 14827"instead." 14828msgstr "" 14829 14830#. Tag: para 14831#: reference_raster.xml:7697 14832#, no-c-format 14833msgid "" 14834"Creates a new one band raster formed by applying a valid PostgreSQL " 14835"algebraic operation defined by the <varname>expression</varname> on the " 14836"input raster (<varname>rast</varname>). If no <varname>band</varname> is " 14837"specified band 1 is assumed. The new raster will have the same georeference, " 14838"width, and height as the original raster but will only have one band." 14839msgstr "" 14840 14841#. Tag: para 14842#: reference_raster.xml:7705 14843#, no-c-format 14844msgid "" 14845"In the expression you can use the term <varname>[rast]</varname> to refer to " 14846"the pixel value of the original band, <varname>[rast.x]</varname> to refer " 14847"to the 1-based pixel column index, <varname>[rast.y]</varname> to refer to " 14848"the 1-based pixel row index." 14849msgstr "" 14850 14851#. Tag: para 14852#: reference_raster.xml:7715 reference_raster.xml:7914 14853#: reference_raster.xml:8178 14854#, no-c-format 14855msgid "" 14856"Create a new 1 band raster from our original that is a function of modulo 2 " 14857"of the original raster band." 14858msgstr "" 14859 14860#. Tag: programlisting 14861#: reference_raster.xml:7716 14862#, fuzzy, no-c-format 14863msgid "" 14864"ALTER TABLE dummy_rast ADD COLUMN map_rast raster;\n" 14865"UPDATE dummy_rast SET map_rast = ST_MapAlgebraExpr(rast,NULL,'mod([rast]::" 14866"numeric,2)') WHERE rid = 2;\n" 14867"\n" 14868"SELECT\n" 14869" ST_Value(rast,1,i,j) As origval,\n" 14870" ST_Value(map_rast, 1, i, j) As mapval\n" 14871"FROM dummy_rast\n" 14872"CROSS JOIN generate_series(1, 3) AS i\n" 14873"CROSS JOIN generate_series(1,3) AS j\n" 14874"WHERE rid = 2;\n" 14875"\n" 14876" origval | mapval\n" 14877"---------+--------\n" 14878" 253 | 1\n" 14879" 254 | 0\n" 14880" 253 | 1\n" 14881" 253 | 1\n" 14882" 254 | 0\n" 14883" 254 | 0\n" 14884" 250 | 0\n" 14885" 254 | 0\n" 14886" 254 | 0" 14887msgstr "" 14888"ALTER TABLE dummy_rast ADD COLUMN map_rast raster;\n" 14889"CREATE FUNCTION mod_fct(pixel float, pos integer[], variadic args text[])\n" 14890"RETURNS float\n" 14891"AS $$\n" 14892"BEGIN\n" 14893" RETURN pixel::integer % 2;\n" 14894"END;\n" 14895"$$\n" 14896"LANGUAGE 'plpgsql' IMMUTABLE;\n" 14897"\n" 14898"UPDATE dummy_rast SET map_rast = ST_MapAlgebraFct(rast,NULL,'mod_fct(float," 14899"integer[],text[])'::regprocedure) WHERE rid = 2;\n" 14900"\n" 14901"SELECT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast, 1, i, j) As " 14902"mapval\n" 14903"FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN " 14904"generate_series(1,3) AS j\n" 14905"WHERE rid = 2;\n" 14906"\n" 14907" origval | mapval\n" 14908"---------+--------\n" 14909" 253 | 1\n" 14910" 254 | 0\n" 14911" 253 | 1\n" 14912" 253 | 1\n" 14913" 254 | 0\n" 14914" 254 | 0\n" 14915" 250 | 0\n" 14916" 254 | 0\n" 14917" 254 | 0" 14918 14919#. Tag: para 14920#: reference_raster.xml:7718 14921#, no-c-format 14922msgid "" 14923"Create a new 1 band raster of pixel-type 2BUI from our original that is " 14924"reclassified and set the nodata value to be 0." 14925msgstr "" 14926 14927#. Tag: programlisting 14928#: reference_raster.xml:7719 14929#, fuzzy, no-c-format 14930msgid "" 14931"ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster;\n" 14932"UPDATE dummy_rast SET\n" 14933" map_rast2 = ST_MapAlgebraExpr(rast,'2BUI'::text,'CASE WHEN [rast] " 14934"BETWEEN 100 and 250 THEN 1 WHEN [rast] = 252 THEN 2 WHEN [rast] BETWEEN 253 " 14935"and 254 THEN 3 ELSE 0 END'::text, '0')\n" 14936"WHERE rid = 2;\n" 14937"\n" 14938"SELECT DISTINCT\n" 14939" ST_Value(rast,1,i,j) As origval,\n" 14940" ST_Value(map_rast2, 1, i, j) As mapval\n" 14941"FROM dummy_rast\n" 14942"CROSS JOIN generate_series(1, 5) AS i\n" 14943"CROSS JOIN generate_series(1,5) AS j\n" 14944"WHERE rid = 2;\n" 14945"\n" 14946" origval | mapval\n" 14947"---------+--------\n" 14948" 249 | 1\n" 14949" 250 | 1\n" 14950" 251 |\n" 14951" 252 | 2\n" 14952" 253 | 3\n" 14953" 254 | 3\n" 14954"\n" 14955"SELECT\n" 14956" ST_BandPixelType(map_rast2) As b1pixtyp\n" 14957"FROM dummy_rast\n" 14958"WHERE rid = 2;\n" 14959"\n" 14960" b1pixtyp\n" 14961"----------\n" 14962" 2BUI" 14963msgstr "" 14964"ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster;\n" 14965"CREATE FUNCTION classify_fct(pixel float, pos integer[], variadic args " 14966"text[])\n" 14967"RETURNS float\n" 14968"AS\n" 14969"$$\n" 14970"DECLARE\n" 14971" nodata float := 0;\n" 14972"BEGIN\n" 14973" IF NOT args[1] IS NULL THEN\n" 14974" nodata := args[1];\n" 14975" END IF;\n" 14976" IF pixel < 251 THEN\n" 14977" RETURN 1;\n" 14978" ELSIF pixel = 252 THEN\n" 14979" RETURN 2;\n" 14980" ELSIF pixel > 252 THEN\n" 14981" RETURN 3;\n" 14982" ELSE\n" 14983" RETURN nodata;\n" 14984" END IF;\n" 14985"END;\n" 14986"$$\n" 14987"LANGUAGE 'plpgsql';\n" 14988"UPDATE dummy_rast SET map_rast2 = " 14989"ST_MapAlgebraFct(rast,'2BUI','classify_fct(float,integer[],text[])'::" 14990"regprocedure, '0') WHERE rid = 2;\n" 14991"\n" 14992"SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, " 14993"j) As mapval\n" 14994"FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN " 14995"generate_series(1,5) AS j\n" 14996"WHERE rid = 2;\n" 14997"\n" 14998" origval | mapval\n" 14999"---------+--------\n" 15000" 249 | 1\n" 15001" 250 | 1\n" 15002" 251 |\n" 15003" 252 | 2\n" 15004" 253 | 3\n" 15005" 254 | 3\n" 15006" \n" 15007"SELECT ST_BandPixelType(map_rast2) As b1pixtyp\n" 15008"FROM dummy_rast WHERE rid = 2;\n" 15009"\n" 15010" b1pixtyp\n" 15011"----------\n" 15012" 2BUI" 15013 15014#. Tag: para 15015#: reference_raster.xml:7733 15016#, fuzzy, no-c-format 15017msgid "original (column rast_view)" 15018msgstr "original (column rast)" 15019 15020#. Tag: para 15021#: reference_raster.xml:7747 reference_raster.xml:8201 15022#, no-c-format 15023msgid "rast_view_ma" 15024msgstr "rast_view_ma" 15025 15026#. Tag: para 15027#: reference_raster.xml:7758 reference_raster.xml:8209 15028#, no-c-format 15029msgid "" 15030"Create a new 3 band raster same pixel type from our original 3 band raster " 15031"with first band altered by map algebra and remaining 2 bands unaltered." 15032msgstr "" 15033 15034#. Tag: programlisting 15035#: reference_raster.xml:7759 15036#, fuzzy, no-c-format 15037msgid "" 15038"SELECT\n" 15039" ST_AddBand(\n" 15040" ST_AddBand(\n" 15041" ST_AddBand(\n" 15042" ST_MakeEmptyRaster(rast_view),\n" 15043" ST_MapAlgebraExpr(rast_view,1," 15044"NULL,'tan([rast])*[rast]')\n" 15045" ),\n" 15046" ST_Band(rast_view,2)\n" 15047" ),\n" 15048" ST_Band(rast_view, 3)\n" 15049" ) As rast_view_ma\n" 15050"FROM wind\n" 15051"WHERE rid=167;" 15052msgstr "" 15053"CREATE FUNCTION rast_plus_tan(pixel float, pos integer[], variadic args " 15054"text[])\n" 15055"RETURNS float\n" 15056"AS\n" 15057"$$\n" 15058"BEGIN\n" 15059" RETURN tan(pixel) * pixel;\n" 15060"END;\n" 15061"$$\n" 15062"LANGUAGE 'plpgsql';\n" 15063"\n" 15064"SELECT ST_AddBand(\n" 15065" ST_AddBand(\n" 15066" ST_AddBand(\n" 15067" ST_MakeEmptyRaster(rast_view),\n" 15068" ST_MapAlgebraFct(rast_view,1," 15069"NULL,'rast_plus_tan(float,integer[],text[])'::regprocedure)\n" 15070" ), \n" 15071" ST_Band(rast_view,2)\n" 15072" ),\n" 15073" ST_Band(rast_view, 3) As rast_view_ma\n" 15074")\n" 15075"FROM wind\n" 15076"WHERE rid=167;" 15077 15078#. Tag: para 15079#: reference_raster.xml:7764 15080#, no-c-format 15081msgid "" 15082", <xref linkend=\"RT_ST_MapAlgebraFct\"/>, <xref linkend=" 15083"\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_GeoReference\"/>, <xref " 15084"linkend=\"RT_ST_Value\"/>" 15085msgstr "" 15086", <xref linkend=\"RT_ST_MapAlgebraFct\"/>, <xref linkend=" 15087"\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_GeoReference\"/>, <xref " 15088"linkend=\"RT_ST_Value\"/>" 15089 15090#. Tag: refpurpose 15091#: reference_raster.xml:7777 15092#, no-c-format 15093msgid "" 15094"2 raster band version: Creates a new one band raster formed by applying a " 15095"valid PostgreSQL algebraic operation on the two input raster bands and of " 15096"pixeltype provided. band 1 of each raster is assumed if no band numbers are " 15097"specified. The resulting raster will be aligned (scale, skew and pixel " 15098"corners) on the grid defined by the first raster and have its extent defined " 15099"by the \"extenttype\" parameter. Values for \"extenttype\" can be: " 15100"INTERSECTION, UNION, FIRST, SECOND." 15101msgstr "" 15102 15103#. Tag: funcsynopsis 15104#: reference_raster.xml:7783 15105#, no-c-format 15106msgid "" 15107"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 15108"funcdef> <paramdef><type>raster </type> <parameter>rast1</parameter></" 15109"paramdef> <paramdef><type>raster </type> <parameter>rast2</parameter></" 15110"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 15111"paramdef> <paramdef choice=\"opt\"><type>text </type> " 15112"<parameter>pixeltype=same_as_rast1_band</parameter></paramdef> <paramdef " 15113"choice=\"opt\"><type>text </type> <parameter>extenttype=INTERSECTION</" 15114"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 15115"<parameter>nodata1expr=NULL</parameter></paramdef> <paramdef choice=\"opt" 15116"\"><type>text </type> <parameter>nodata2expr=NULL</parameter></paramdef> " 15117"<paramdef choice=\"opt\"><type>double precision </type> " 15118"<parameter>nodatanodataval=NULL</parameter></paramdef> </funcprototype> " 15119"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 15120"funcdef> <paramdef><type>raster </type> <parameter>rast1</parameter></" 15121"paramdef> <paramdef><type>integer </type> <parameter>band1</parameter></" 15122"paramdef> <paramdef><type>raster </type> <parameter>rast2</parameter></" 15123"paramdef> <paramdef><type>integer </type> <parameter>band2</parameter></" 15124"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 15125"paramdef> <paramdef choice=\"opt\"><type>text </type> " 15126"<parameter>pixeltype=same_as_rast1_band</parameter></paramdef> <paramdef " 15127"choice=\"opt\"><type>text </type> <parameter>extenttype=INTERSECTION</" 15128"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 15129"<parameter>nodata1expr=NULL</parameter></paramdef> <paramdef choice=\"opt" 15130"\"><type>text </type> <parameter>nodata2expr=NULL</parameter></paramdef> " 15131"<paramdef choice=\"opt\"><type>double precision </type> " 15132"<parameter>nodatanodataval=NULL</parameter></paramdef> </funcprototype>" 15133msgstr "" 15134"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 15135"funcdef> <paramdef><type>raster </type> <parameter>rast1</parameter></" 15136"paramdef> <paramdef><type>raster </type> <parameter>rast2</parameter></" 15137"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 15138"paramdef> <paramdef choice=\"opt\"><type>text </type> " 15139"<parameter>pixeltype=same_as_rast1_band</parameter></paramdef> <paramdef " 15140"choice=\"opt\"><type>text </type> <parameter>extenttype=INTERSECTION</" 15141"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 15142"<parameter>nodata1expr=NULL</parameter></paramdef> <paramdef choice=\"opt" 15143"\"><type>text </type> <parameter>nodata2expr=NULL</parameter></paramdef> " 15144"<paramdef choice=\"opt\"><type>double precision </type> " 15145"<parameter>nodatanodataval=NULL</parameter></paramdef> </funcprototype> " 15146"<funcprototype> <funcdef>raster <function>ST_MapAlgebraExpr</function></" 15147"funcdef> <paramdef><type>raster </type> <parameter>rast1</parameter></" 15148"paramdef> <paramdef><type>integer </type> <parameter>band1</parameter></" 15149"paramdef> <paramdef><type>raster </type> <parameter>rast2</parameter></" 15150"paramdef> <paramdef><type>integer </type> <parameter>band2</parameter></" 15151"paramdef> <paramdef><type>text </type> <parameter>expression</parameter></" 15152"paramdef> <paramdef choice=\"opt\"><type>text </type> " 15153"<parameter>pixeltype=same_as_rast1_band</parameter></paramdef> <paramdef " 15154"choice=\"opt\"><type>text </type> <parameter>extenttype=INTERSECTION</" 15155"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 15156"<parameter>nodata1expr=NULL</parameter></paramdef> <paramdef choice=\"opt" 15157"\"><type>text </type> <parameter>nodata2expr=NULL</parameter></paramdef> " 15158"<paramdef choice=\"opt\"><type>double precision </type> " 15159"<parameter>nodatanodataval=NULL</parameter></paramdef> </funcprototype>" 15160 15161#. Tag: para 15162#: reference_raster.xml:7901 15163#, no-c-format 15164msgid "" 15165"If <varname>pixeltype</varname> is passed in, then the new raster will have " 15166"a band of that pixeltype. If pixeltype is passed NULL or no pixel type " 15167"specified, then the new raster band will have the same pixeltype as the " 15168"input <varname>rast1</varname> band." 15169msgstr "" 15170 15171#. Tag: para 15172#: reference_raster.xml:7904 15173#, no-c-format 15174msgid "" 15175"Use the term <varname>[rast1.val]</varname> <varname>[rast2.val]</varname> " 15176"to refer to the pixel value of the original raster bands and <varname>[rast1." 15177"x]</varname>, <varname>[rast1.y]</varname> etc. to refer to the column / row " 15178"positions of the pixels." 15179msgstr "" 15180 15181#. Tag: title 15182#: reference_raster.xml:7912 15183#, no-c-format 15184msgid "Example: 2 Band Intersection and Union" 15185msgstr "" 15186 15187#. Tag: programlisting 15188#: reference_raster.xml:7915 15189#, no-c-format 15190msgid "" 15191"--Create a cool set of rasters --\n" 15192"DROP TABLE IF EXISTS fun_shapes;\n" 15193"CREATE TABLE fun_shapes(rid serial PRIMARY KEY, fun_name text, rast " 15194"raster);\n" 15195"\n" 15196"-- Insert some cool shapes around Boston in Massachusetts state plane meters " 15197"--\n" 15198"INSERT INTO fun_shapes(fun_name, rast)\n" 15199"VALUES ('ref', ST_AsRaster(ST_MakeEnvelope(235229, 899970, 237229, " 15200"901930,26986),200,200,'8BUI',0,0));\n" 15201"\n" 15202"INSERT INTO fun_shapes(fun_name,rast)\n" 15203"WITH ref(rast) AS (SELECT rast FROM fun_shapes WHERE fun_name = 'ref' )\n" 15204"SELECT 'area' AS fun_name, ST_AsRaster(ST_Buffer(ST_SetSRID(ST_Point(236229, " 15205"900930),26986), 1000),\n" 15206" ref.rast,'8BUI', 10, 0) As rast\n" 15207"FROM ref\n" 15208"UNION ALL\n" 15209"SELECT 'rand bubbles',\n" 15210" ST_AsRaster(\n" 15211" (SELECT ST_Collect(geom)\n" 15212" FROM (SELECT ST_Buffer(ST_SetSRID(ST_Point(236229 + i*random()*100, " 15213"900930 + j*random()*100),26986), random()*20) As geom\n" 15214" FROM generate_series(1,10) As i, " 15215"generate_series(1,10) As j\n" 15216" ) As foo ), ref.rast,'8BUI', 200, 0)\n" 15217"FROM ref;\n" 15218"\n" 15219"--map them -\n" 15220"SELECT ST_MapAlgebraExpr(\n" 15221" area.rast, bub.rast, '[rast2.val]', '8BUI', 'INTERSECTION', " 15222"'[rast2.val]', '[rast1.val]') As interrast,\n" 15223" ST_MapAlgebraExpr(\n" 15224" area.rast, bub.rast, '[rast2.val]', '8BUI', 'UNION', " 15225"'[rast2.val]', '[rast1.val]') As unionrast\n" 15226"FROM\n" 15227" (SELECT rast FROM fun_shapes WHERE\n" 15228" fun_name = 'area') As area\n" 15229"CROSS JOIN (SELECT rast\n" 15230"FROM fun_shapes WHERE\n" 15231" fun_name = 'rand bubbles') As bub" 15232msgstr "" 15233 15234#. Tag: para 15235#: reference_raster.xml:7929 15236#, no-c-format 15237msgid "mapalgebra intersection" 15238msgstr "" 15239 15240#. Tag: para 15241#: reference_raster.xml:7943 15242#, no-c-format 15243msgid "map algebra union" 15244msgstr "" 15245 15246#. Tag: title 15247#: reference_raster.xml:7956 reference_raster.xml:8295 15248#, no-c-format 15249msgid "Example: Overlaying rasters on a canvas as separate bands" 15250msgstr "" 15251 15252#. Tag: programlisting 15253#: reference_raster.xml:7957 15254#, no-c-format 15255msgid "" 15256"-- we use ST_AsPNG to render the image so all single band ones look grey --\n" 15257"WITH mygeoms\n" 15258" AS ( SELECT 2 As bnum, ST_Buffer(ST_Point(1,5),10) As geom\n" 15259" UNION ALL\n" 15260" SELECT 3 AS bnum,\n" 15261" ST_Buffer(ST_GeomFromText('LINESTRING(50 50,150 150,150 " 15262"50)'), 10,'join=bevel') As geom\n" 15263" UNION ALL\n" 15264" SELECT 1 As bnum,\n" 15265" ST_Buffer(ST_GeomFromText('LINESTRING(60 50,150 150,150 " 15266"50)'), 5,'join=bevel') As geom\n" 15267" ),\n" 15268" -- define our canvas to be 1 to 1 pixel to geometry\n" 15269" canvas\n" 15270" AS (SELECT ST_AddBand(ST_MakeEmptyRaster(200,\n" 15271" 200,\n" 15272" ST_XMin(e)::integer, ST_YMax(e)::integer, 1, -1, 0, 0) , '8BUI'::" 15273"text,0) As rast\n" 15274" FROM (SELECT ST_Extent(geom) As e,\n" 15275" Max(ST_SRID(geom)) As srid\n" 15276" from mygeoms\n" 15277" ) As foo\n" 15278" ),\n" 15279" rbands AS (SELECT ARRAY(SELECT ST_MapAlgebraExpr(canvas.rast, " 15280"ST_AsRaster(m.geom, canvas.rast, '8BUI', 100),\n" 15281" '[rast2.val]', '8BUI', 'FIRST', '[rast2.val]', '[rast1." 15282"val]') As rast\n" 15283" FROM mygeoms AS m CROSS JOIN canvas\n" 15284" ORDER BY m.bnum) As rasts\n" 15285" )\n" 15286" SELECT rasts[1] As rast1 , rasts[2] As rast2, rasts[3] As rast3, " 15287"ST_AddBand(\n" 15288" ST_AddBand(rasts[1],rasts[2]), rasts[3]) As final_rast\n" 15289" FROM rbands;" 15290msgstr "" 15291 15292#. Tag: para 15293#: reference_raster.xml:7970 15294#, no-c-format 15295msgid "rast1" 15296msgstr "" 15297 15298#. Tag: para 15299#: reference_raster.xml:7983 15300#, no-c-format 15301msgid "rast2" 15302msgstr "" 15303 15304#. Tag: para 15305#: reference_raster.xml:7999 15306#, no-c-format 15307msgid "rast3" 15308msgstr "" 15309 15310#. Tag: para 15311#: reference_raster.xml:8013 15312#, no-c-format 15313msgid "final_rast" 15314msgstr "" 15315 15316#. Tag: title 15317#: reference_raster.xml:8026 15318#, no-c-format 15319msgid "" 15320"Example: Overlay 2 meter boundary of select parcels over an aerial imagery" 15321msgstr "" 15322 15323#. Tag: programlisting 15324#: reference_raster.xml:8028 15325#, no-c-format 15326msgid "" 15327"-- Create new 3 band raster composed of first 2 clipped bands, and overlay " 15328"of 3rd band with our geometry\n" 15329"-- This query took 3.6 seconds on PostGIS windows 64-bit install\n" 15330"WITH pr AS\n" 15331"-- Note the order of operation: we clip all the rasters to dimensions of our " 15332"region\n" 15333"(SELECT ST_Clip(rast,ST_Expand(geom,50) ) As rast, g.geom\n" 15334" FROM aerials.o_2_boston AS r INNER JOIN\n" 15335"-- union our parcels of interest so they form a single geometry we can later " 15336"intersect with\n" 15337" (SELECT ST_Union(ST_Transform(the_geom,26986)) AS geom\n" 15338" FROM landparcels WHERE pid IN('0303890000', '0303900000')) " 15339"As g\n" 15340" ON ST_Intersects(rast::geometry, ST_Expand(g.geom,50))\n" 15341"),\n" 15342"-- we then union the raster shards together\n" 15343"-- ST_Union on raster is kinda of slow but much faster the smaller you can " 15344"get the rasters\n" 15345"-- therefore we want to clip first and then union\n" 15346"prunion AS\n" 15347"(SELECT ST_AddBand(NULL, ARRAY[ST_Union(rast,1),ST_Union(rast,2)," 15348"ST_Union(rast,3)] ) As clipped,geom\n" 15349"FROM pr\n" 15350"GROUP BY geom)\n" 15351"-- return our final raster which is the unioned shard with\n" 15352"-- with the overlay of our parcel boundaries\n" 15353"-- add first 2 bands, then mapalgebra of 3rd band + geometry\n" 15354"SELECT ST_AddBand(ST_Band(clipped,ARRAY[1,2])\n" 15355" , ST_MapAlgebraExpr(ST_Band(clipped,3), " 15356"ST_AsRaster(ST_Buffer(ST_Boundary(geom),2),clipped, '8BUI',250),\n" 15357" '[rast2.val]', '8BUI', 'FIRST', '[rast2.val]', '[rast1.val]') ) As " 15358"rast\n" 15359"FROM prunion;" 15360msgstr "" 15361 15362#. Tag: para 15363#: reference_raster.xml:8042 15364#, no-c-format 15365msgid "The blue lines are the boundaries of select parcels" 15366msgstr "" 15367 15368#. Tag: para 15369#: reference_raster.xml:8056 15370#, no-c-format 15371msgid "" 15372", <xref linkend=\"RT_ST_AddBand\"/>, <xref linkend=\"RT_ST_AsPNG\"/>, <xref " 15373"linkend=\"RT_ST_AsRaster\"/>, <xref linkend=\"RT_ST_MapAlgebraFct\"/>, <xref " 15374"linkend=\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_GeoReference\"/>, " 15375"<xref linkend=\"RT_ST_Value\"/>, <xref linkend=\"RT_ST_Union\"/>, <xref " 15376"linkend=\"ST_Union\"/>" 15377msgstr "" 15378 15379#. Tag: refname 15380#: reference_raster.xml:8073 reference_raster.xml:8226 15381#, no-c-format 15382msgid "ST_MapAlgebraFct" 15383msgstr "ST_MapAlgebraFct" 15384 15385#. Tag: refpurpose 15386#: reference_raster.xml:8074 15387#, no-c-format 15388msgid "" 15389"1 band version - Creates a new one band raster formed by applying a valid " 15390"PostgreSQL function on the input raster band and of pixeltype prodived. Band " 15391"1 is assumed if no band is specified." 15392msgstr "" 15393 15394#. Tag: funcsynopsis 15395#: reference_raster.xml:8078 15396#, no-c-format 15397msgid "" 15398"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15399"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15400"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15401"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15402"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15403"type> <parameter>rast</parameter></paramdef> <paramdef><type>regprocedure</" 15404"type> <parameter>onerasteruserfunc</parameter></paramdef> " 15405"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 15406"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15407"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15408"type> <parameter>rast</parameter></paramdef> <paramdef><type>text</type> " 15409"<parameter>pixeltype</parameter></paramdef> <paramdef><type>regprocedure</" 15410"type> <parameter>onerasteruserfunc</parameter></paramdef> </funcprototype> " 15411"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15412"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15413"paramdef> <paramdef><type>text</type> <parameter>pixeltype</parameter></" 15414"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15415"parameter></paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC " 15416"args</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15417"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15418"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer</type> " 15419"<parameter>band</parameter></paramdef> <paramdef><type>regprocedure</type> " 15420"<parameter>onerasteruserfunc</parameter></paramdef> </funcprototype> " 15421"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15422"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15423"paramdef> <paramdef><type>integer</type> <parameter>band</parameter></" 15424"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15425"parameter></paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC " 15426"args</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15427"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15428"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer</type> " 15429"<parameter>band</parameter></paramdef> <paramdef><type>text</type> " 15430"<parameter>pixeltype</parameter></paramdef> <paramdef><type>regprocedure</" 15431"type> <parameter>onerasteruserfunc</parameter></paramdef> </funcprototype> " 15432"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15433"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15434"paramdef> <paramdef><type>integer</type> <parameter>band</parameter></" 15435"paramdef> <paramdef><type>text</type> <parameter>pixeltype</parameter></" 15436"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15437"parameter></paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC " 15438"args</parameter></paramdef> </funcprototype>" 15439msgstr "" 15440"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15441"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15442"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15443"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15444"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15445"type> <parameter>rast</parameter></paramdef> <paramdef><type>regprocedure</" 15446"type> <parameter>onerasteruserfunc</parameter></paramdef> " 15447"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 15448"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15449"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15450"type> <parameter>rast</parameter></paramdef> <paramdef><type>text</type> " 15451"<parameter>pixeltype</parameter></paramdef> <paramdef><type>regprocedure</" 15452"type> <parameter>onerasteruserfunc</parameter></paramdef> </funcprototype> " 15453"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15454"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15455"paramdef> <paramdef><type>text</type> <parameter>pixeltype</parameter></" 15456"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15457"parameter></paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC " 15458"args</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15459"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15460"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer</type> " 15461"<parameter>band</parameter></paramdef> <paramdef><type>regprocedure</type> " 15462"<parameter>onerasteruserfunc</parameter></paramdef> </funcprototype> " 15463"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15464"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15465"paramdef> <paramdef><type>integer</type> <parameter>band</parameter></" 15466"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15467"parameter></paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC " 15468"args</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15469"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15470"type> <parameter>rast</parameter></paramdef> <paramdef><type>integer</type> " 15471"<parameter>band</parameter></paramdef> <paramdef><type>text</type> " 15472"<parameter>pixeltype</parameter></paramdef> <paramdef><type>regprocedure</" 15473"type> <parameter>onerasteruserfunc</parameter></paramdef> </funcprototype> " 15474"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15475"funcdef> <paramdef><type>raster</type> <parameter>rast</parameter></" 15476"paramdef> <paramdef><type>integer</type> <parameter>band</parameter></" 15477"paramdef> <paramdef><type>text</type> <parameter>pixeltype</parameter></" 15478"paramdef> <paramdef><type>regprocedure</type> <parameter>onerasteruserfunc</" 15479"parameter></paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC " 15480"args</parameter></paramdef> </funcprototype>" 15481 15482#. Tag: para 15483#: reference_raster.xml:8142 reference_raster.xml:8260 15484#: reference_raster.xml:8373 15485#, no-c-format 15486msgid "" 15487"is deprecated as of 2.1.0. Use <xref linkend=\"RT_ST_MapAlgebra\"/> instead." 15488msgstr "" 15489 15490#. Tag: para 15491#: reference_raster.xml:8147 15492#, no-c-format 15493msgid "" 15494"Creates a new one band raster formed by applying a valid PostgreSQL function " 15495"specified by the <varname>onerasteruserfunc</varname> on the input raster " 15496"(<varname>rast</varname>). If no <varname>band</varname> is specified, band " 15497"1 is assumed. The new raster will have the same georeference, width, and " 15498"height as the original raster but will only have one band." 15499msgstr "" 15500 15501#. Tag: para 15502#: reference_raster.xml:8151 15503#, no-c-format 15504msgid "" 15505"The <varname>onerasteruserfunc</varname> parameter must be the name and " 15506"signature of a SQL or PL/pgSQL function, cast to a regprocedure. A very " 15507"simple and quite useless PL/pgSQL function example is: " 15508"<programlisting>CREATE OR REPLACE FUNCTION simple_function(pixel FLOAT, pos " 15509"INTEGER[], VARIADIC args TEXT[])\n" 15510" RETURNS FLOAT\n" 15511" AS $$ BEGIN\n" 15512" RETURN 0.0;\n" 15513" END; $$\n" 15514" LANGUAGE 'plpgsql' IMMUTABLE;</programlisting> The " 15515"<varname>userfunction</varname> may accept two or three arguments: a float " 15516"value, an optional integer array, and a variadic text array. The first " 15517"argument is the value of an individual raster cell (regardless of the raster " 15518"datatype). The second argument is the position of the current processing " 15519"cell in the form '{x,y}'. The third argument indicates that all remaining " 15520"parameters to <xref linkend=\"RT_ST_MapAlgebraFct\"/> shall be passed " 15521"through to the <varname>userfunction</varname>." 15522msgstr "" 15523 15524#. Tag: para 15525#: reference_raster.xml:8156 15526#, no-c-format 15527msgid "" 15528"Passing a <type>regprodedure</type> argument to a SQL function requires the " 15529"full function signature to be passed, then cast to a <type>regprocedure</" 15530"type> type. To pass the above example PL/pgSQL function as an argument, the " 15531"SQL for the argument is:<programlisting>'simple_function(float,integer[]," 15532"text[])'::regprocedure</programlisting>Note that the argument contains the " 15533"name of the function, the types of the function arguments, quotes around the " 15534"name and argument types, and a cast to a <type>regprocedure</type>." 15535msgstr "" 15536 15537#. Tag: para 15538#: reference_raster.xml:8160 15539#, no-c-format 15540msgid "" 15541"The third argument to the <varname>userfunction</varname> is a " 15542"<type>variadic text</type> array. All trailing text arguments to any <xref " 15543"linkend=\"RT_ST_MapAlgebraFct\"/> call are passed through to the specified " 15544"<varname>userfunction</varname>, and are contained in the <varname>args</" 15545"varname> argument." 15546msgstr "" 15547 15548#. Tag: para 15549#: reference_raster.xml:8169 15550#, no-c-format 15551msgid "" 15552"The <type>text[]</type> argument to the <varname>userfunction</varname> is " 15553"required, regardless of whether you choose to pass any arguments to your " 15554"user function for processing or not." 15555msgstr "" 15556 15557#. Tag: programlisting 15558#: reference_raster.xml:8179 15559#, no-c-format 15560msgid "" 15561"ALTER TABLE dummy_rast ADD COLUMN map_rast raster;\n" 15562"CREATE FUNCTION mod_fct(pixel float, pos integer[], variadic args text[])\n" 15563"RETURNS float\n" 15564"AS $$\n" 15565"BEGIN\n" 15566" RETURN pixel::integer % 2;\n" 15567"END;\n" 15568"$$\n" 15569"LANGUAGE 'plpgsql' IMMUTABLE;\n" 15570"\n" 15571"UPDATE dummy_rast SET map_rast = ST_MapAlgebraFct(rast,NULL,'mod_fct(float," 15572"integer[],text[])'::regprocedure) WHERE rid = 2;\n" 15573"\n" 15574"SELECT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast, 1, i, j) As " 15575"mapval\n" 15576"FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN " 15577"generate_series(1,3) AS j\n" 15578"WHERE rid = 2;\n" 15579"\n" 15580" origval | mapval\n" 15581"---------+--------\n" 15582" 253 | 1\n" 15583" 254 | 0\n" 15584" 253 | 1\n" 15585" 253 | 1\n" 15586" 254 | 0\n" 15587" 254 | 0\n" 15588" 250 | 0\n" 15589" 254 | 0\n" 15590" 254 | 0" 15591msgstr "" 15592"ALTER TABLE dummy_rast ADD COLUMN map_rast raster;\n" 15593"CREATE FUNCTION mod_fct(pixel float, pos integer[], variadic args text[])\n" 15594"RETURNS float\n" 15595"AS $$\n" 15596"BEGIN\n" 15597" RETURN pixel::integer % 2;\n" 15598"END;\n" 15599"$$\n" 15600"LANGUAGE 'plpgsql' IMMUTABLE;\n" 15601"\n" 15602"UPDATE dummy_rast SET map_rast = ST_MapAlgebraFct(rast,NULL,'mod_fct(float," 15603"integer[],text[])'::regprocedure) WHERE rid = 2;\n" 15604"\n" 15605"SELECT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast, 1, i, j) As " 15606"mapval\n" 15607"FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN " 15608"generate_series(1,3) AS j\n" 15609"WHERE rid = 2;\n" 15610"\n" 15611" origval | mapval\n" 15612"---------+--------\n" 15613" 253 | 1\n" 15614" 254 | 0\n" 15615" 253 | 1\n" 15616" 253 | 1\n" 15617" 254 | 0\n" 15618" 254 | 0\n" 15619" 250 | 0\n" 15620" 254 | 0\n" 15621" 254 | 0" 15622 15623#. Tag: para 15624#: reference_raster.xml:8181 15625#, no-c-format 15626msgid "" 15627"Create a new 1 band raster of pixel-type 2BUI from our original that is " 15628"reclassified and set the nodata value to a passed parameter to the user " 15629"function (0)." 15630msgstr "" 15631 15632#. Tag: programlisting 15633#: reference_raster.xml:8182 15634#, fuzzy, no-c-format 15635msgid "" 15636"ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster;\n" 15637"CREATE FUNCTION classify_fct(pixel float, pos integer[], variadic args " 15638"text[])\n" 15639"RETURNS float\n" 15640"AS\n" 15641"$$\n" 15642"DECLARE\n" 15643" nodata float := 0;\n" 15644"BEGIN\n" 15645" IF NOT args[1] IS NULL THEN\n" 15646" nodata := args[1];\n" 15647" END IF;\n" 15648" IF pixel < 251 THEN\n" 15649" RETURN 1;\n" 15650" ELSIF pixel = 252 THEN\n" 15651" RETURN 2;\n" 15652" ELSIF pixel > 252 THEN\n" 15653" RETURN 3;\n" 15654" ELSE\n" 15655" RETURN nodata;\n" 15656" END IF;\n" 15657"END;\n" 15658"$$\n" 15659"LANGUAGE 'plpgsql';\n" 15660"UPDATE dummy_rast SET map_rast2 = " 15661"ST_MapAlgebraFct(rast,'2BUI','classify_fct(float,integer[],text[])'::" 15662"regprocedure, '0') WHERE rid = 2;\n" 15663"\n" 15664"SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, " 15665"j) As mapval\n" 15666"FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN " 15667"generate_series(1,5) AS j\n" 15668"WHERE rid = 2;\n" 15669"\n" 15670" origval | mapval\n" 15671"---------+--------\n" 15672" 249 | 1\n" 15673" 250 | 1\n" 15674" 251 |\n" 15675" 252 | 2\n" 15676" 253 | 3\n" 15677" 254 | 3\n" 15678"\n" 15679"SELECT ST_BandPixelType(map_rast2) As b1pixtyp\n" 15680"FROM dummy_rast WHERE rid = 2;\n" 15681"\n" 15682" b1pixtyp\n" 15683"----------\n" 15684" 2BUI" 15685msgstr "" 15686"ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster;\n" 15687"CREATE FUNCTION classify_fct(pixel float, pos integer[], variadic args " 15688"text[])\n" 15689"RETURNS float\n" 15690"AS\n" 15691"$$\n" 15692"DECLARE\n" 15693" nodata float := 0;\n" 15694"BEGIN\n" 15695" IF NOT args[1] IS NULL THEN\n" 15696" nodata := args[1];\n" 15697" END IF;\n" 15698" IF pixel < 251 THEN\n" 15699" RETURN 1;\n" 15700" ELSIF pixel = 252 THEN\n" 15701" RETURN 2;\n" 15702" ELSIF pixel > 252 THEN\n" 15703" RETURN 3;\n" 15704" ELSE\n" 15705" RETURN nodata;\n" 15706" END IF;\n" 15707"END;\n" 15708"$$\n" 15709"LANGUAGE 'plpgsql';\n" 15710"UPDATE dummy_rast SET map_rast2 = " 15711"ST_MapAlgebraFct(rast,'2BUI','classify_fct(float,integer[],text[])'::" 15712"regprocedure, '0') WHERE rid = 2;\n" 15713"\n" 15714"SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, " 15715"j) As mapval\n" 15716"FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN " 15717"generate_series(1,5) AS j\n" 15718"WHERE rid = 2;\n" 15719"\n" 15720" origval | mapval\n" 15721"---------+--------\n" 15722" 249 | 1\n" 15723" 250 | 1\n" 15724" 251 |\n" 15725" 252 | 2\n" 15726" 253 | 3\n" 15727" 254 | 3\n" 15728" \n" 15729"SELECT ST_BandPixelType(map_rast2) As b1pixtyp\n" 15730"FROM dummy_rast WHERE rid = 2;\n" 15731"\n" 15732" b1pixtyp\n" 15733"----------\n" 15734" 2BUI" 15735 15736#. Tag: para 15737#: reference_raster.xml:8193 15738#, no-c-format 15739msgid "original (column rast-view)" 15740msgstr "" 15741 15742#. Tag: programlisting 15743#: reference_raster.xml:8210 15744#, fuzzy, no-c-format 15745msgid "" 15746"CREATE FUNCTION rast_plus_tan(pixel float, pos integer[], variadic args " 15747"text[])\n" 15748"RETURNS float\n" 15749"AS\n" 15750"$$\n" 15751"BEGIN\n" 15752" RETURN tan(pixel) * pixel;\n" 15753"END;\n" 15754"$$\n" 15755"LANGUAGE 'plpgsql';\n" 15756"\n" 15757"SELECT ST_AddBand(\n" 15758" ST_AddBand(\n" 15759" ST_AddBand(\n" 15760" ST_MakeEmptyRaster(rast_view),\n" 15761" ST_MapAlgebraFct(rast_view,1," 15762"NULL,'rast_plus_tan(float,integer[],text[])'::regprocedure)\n" 15763" ),\n" 15764" ST_Band(rast_view,2)\n" 15765" ),\n" 15766" ST_Band(rast_view, 3) As rast_view_ma\n" 15767")\n" 15768"FROM wind\n" 15769"WHERE rid=167;" 15770msgstr "" 15771"CREATE FUNCTION rast_plus_tan(pixel float, pos integer[], variadic args " 15772"text[])\n" 15773"RETURNS float\n" 15774"AS\n" 15775"$$\n" 15776"BEGIN\n" 15777" RETURN tan(pixel) * pixel;\n" 15778"END;\n" 15779"$$\n" 15780"LANGUAGE 'plpgsql';\n" 15781"\n" 15782"SELECT ST_AddBand(\n" 15783" ST_AddBand(\n" 15784" ST_AddBand(\n" 15785" ST_MakeEmptyRaster(rast_view),\n" 15786" ST_MapAlgebraFct(rast_view,1," 15787"NULL,'rast_plus_tan(float,integer[],text[])'::regprocedure)\n" 15788" ), \n" 15789" ST_Band(rast_view,2)\n" 15790" ),\n" 15791" ST_Band(rast_view, 3) As rast_view_ma\n" 15792")\n" 15793"FROM wind\n" 15794"WHERE rid=167;" 15795 15796#. Tag: para 15797#: reference_raster.xml:8215 reference_raster.xml:8338 15798#, no-c-format 15799msgid "" 15800", <xref linkend=\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_GeoReference" 15801"\"/>, <xref linkend=\"RT_ST_SetValue\"/>" 15802msgstr "" 15803", <xref linkend=\"RT_ST_BandPixelType\"/>, <xref linkend=\"RT_ST_GeoReference" 15804"\"/>, <xref linkend=\"RT_ST_SetValue\"/>" 15805 15806#. Tag: refpurpose 15807#: reference_raster.xml:8227 15808#, no-c-format 15809msgid "" 15810"2 band version - Creates a new one band raster formed by applying a valid " 15811"PostgreSQL function on the 2 input raster bands and of pixeltype prodived. " 15812"Band 1 is assumed if no band is specified. Extent type defaults to " 15813"INTERSECTION if not specified." 15814msgstr "" 15815 15816#. Tag: funcsynopsis 15817#: reference_raster.xml:8231 15818#, no-c-format 15819msgid "" 15820"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15821"funcdef> <paramdef><type>raster</type> <parameter>rast1</parameter></" 15822"paramdef> <paramdef><type>raster</type> <parameter>rast2</parameter></" 15823"paramdef> <paramdef><type>regprocedure</type> <parameter>tworastuserfunc</" 15824"parameter></paramdef> <paramdef choice=\"opt\"><type>text</type> " 15825"<parameter>pixeltype=same_as_rast1</parameter></paramdef> <paramdef choice=" 15826"\"opt\"><type>text</type> <parameter>extenttype=INTERSECTION</parameter></" 15827"paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC userargs</" 15828"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15829"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15830"type> <parameter>rast1</parameter></paramdef> <paramdef><type>integer</type> " 15831"<parameter>band1</parameter></paramdef> <paramdef><type>raster</type> " 15832"<parameter>rast2</parameter></paramdef> <paramdef><type>integer</type> " 15833"<parameter>band2</parameter></paramdef> <paramdef><type>regprocedure</type> " 15834"<parameter>tworastuserfunc</parameter></paramdef> <paramdef choice=\"opt" 15835"\"><type>text</type> <parameter>pixeltype=same_as_rast1</parameter></" 15836"paramdef> <paramdef choice=\"opt\"><type>text</type> " 15837"<parameter>extenttype=INTERSECTION</parameter></paramdef> " 15838"<paramdef><type>text[]</type> <parameter>VARIADIC userargs</parameter></" 15839"paramdef> </funcprototype>" 15840msgstr "" 15841"<funcprototype> <funcdef>raster <function>ST_MapAlgebraFct</function></" 15842"funcdef> <paramdef><type>raster</type> <parameter>rast1</parameter></" 15843"paramdef> <paramdef><type>raster</type> <parameter>rast2</parameter></" 15844"paramdef> <paramdef><type>regprocedure</type> <parameter>tworastuserfunc</" 15845"parameter></paramdef> <paramdef choice=\"opt\"><type>text</type> " 15846"<parameter>pixeltype=same_as_rast1</parameter></paramdef> <paramdef choice=" 15847"\"opt\"><type>text</type> <parameter>extenttype=INTERSECTION</parameter></" 15848"paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC userargs</" 15849"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 15850"<function>ST_MapAlgebraFct</function></funcdef> <paramdef><type>raster</" 15851"type> <parameter>rast1</parameter></paramdef> <paramdef><type>integer</type> " 15852"<parameter>band1</parameter></paramdef> <paramdef><type>raster</type> " 15853"<parameter>rast2</parameter></paramdef> <paramdef><type>integer</type> " 15854"<parameter>band2</parameter></paramdef> <paramdef><type>regprocedure</type> " 15855"<parameter>tworastuserfunc</parameter></paramdef> <paramdef choice=\"opt" 15856"\"><type>text</type> <parameter>pixeltype=same_as_rast1</parameter></" 15857"paramdef> <paramdef choice=\"opt\"><type>text</type> " 15858"<parameter>extenttype=INTERSECTION</parameter></paramdef> " 15859"<paramdef><type>text[]</type> <parameter>VARIADIC userargs</parameter></" 15860"paramdef> </funcprototype>" 15861 15862#. Tag: para 15863#: reference_raster.xml:8265 15864#, no-c-format 15865msgid "" 15866"Creates a new one band raster formed by applying a valid PostgreSQL function " 15867"specified by the <varname>tworastuserfunc</varname> on the input raster " 15868"<varname>rast1</varname>, <varname>rast2</varname>. If no <varname>band1</" 15869"varname> or <varname>band2</varname> is specified, band 1 is assumed. The " 15870"new raster will have the same georeference, width, and height as the " 15871"original rasters but will only have one band." 15872msgstr "" 15873 15874#. Tag: para 15875#: reference_raster.xml:8268 15876#, no-c-format 15877msgid "" 15878"If <varname>pixeltype</varname> is passed in, then the new raster will have " 15879"a band of that pixeltype. If pixeltype is passed NULL or left out, then the " 15880"new raster band will have the same pixeltype as the input <varname>rast1</" 15881"varname> band." 15882msgstr "" 15883 15884#. Tag: para 15885#: reference_raster.xml:8271 15886#, no-c-format 15887msgid "" 15888"The <varname>tworastuserfunc</varname> parameter must be the name and " 15889"signature of an SQL or PL/pgSQL function, cast to a regprocedure. An example " 15890"PL/pgSQL function example is: <programlisting>CREATE OR REPLACE FUNCTION " 15891"simple_function_for_two_rasters(pixel1 FLOAT, pixel2 FLOAT, pos INTEGER[], " 15892"VARIADIC args TEXT[])\n" 15893" RETURNS FLOAT\n" 15894" AS $$ BEGIN\n" 15895" RETURN 0.0;\n" 15896" END; $$\n" 15897" LANGUAGE 'plpgsql' IMMUTABLE;</programlisting> The " 15898"<varname>tworastuserfunc</varname> may accept three or four arguments: a " 15899"double precision value, a double precision value, an optional integer array, " 15900"and a variadic text array. The first argument is the value of an individual " 15901"raster cell in <varname>rast1</varname> (regardless of the raster datatype). " 15902"The second argument is an individual raster cell value in <varname>rast2</" 15903"varname>. The third argument is the position of the current processing cell " 15904"in the form '{x,y}'. The fourth argument indicates that all remaining " 15905"parameters to <xref linkend=\"RT_ST_MapAlgebraFct2\"/> shall be passed " 15906"through to the <varname>tworastuserfunc</varname>." 15907msgstr "" 15908 15909#. Tag: para 15910#: reference_raster.xml:8277 15911#, no-c-format 15912msgid "" 15913"Passing a <type>regprodedure</type> argument to a SQL function requires the " 15914"full function signature to be passed, then cast to a <type>regprocedure</" 15915"type> type. To pass the above example PL/pgSQL function as an argument, the " 15916"SQL for the argument is:<programlisting>'simple_function(double precision, " 15917"double precision, integer[], text[])'::regprocedure</programlisting>Note " 15918"that the argument contains the name of the function, the types of the " 15919"function arguments, quotes around the name and argument types, and a cast to " 15920"a <type>regprocedure</type>." 15921msgstr "" 15922 15923#. Tag: para 15924#: reference_raster.xml:8280 15925#, no-c-format 15926msgid "" 15927"The fourth argument to the <varname>tworastuserfunc</varname> is a " 15928"<type>variadic text</type> array. All trailing text arguments to any <xref " 15929"linkend=\"RT_ST_MapAlgebraFct2\"/> call are passed through to the specified " 15930"<varname>tworastuserfunc</varname>, and are contained in the " 15931"<varname>userargs</varname> argument." 15932msgstr "" 15933 15934#. Tag: para 15935#: reference_raster.xml:8288 15936#, no-c-format 15937msgid "" 15938"The <type>text[]</type> argument to the <varname>tworastuserfunc</varname> " 15939"is required, regardless of whether you choose to pass any arguments to your " 15940"user function for processing or not." 15941msgstr "" 15942 15943#. Tag: programlisting 15944#: reference_raster.xml:8296 15945#, no-c-format 15946msgid "" 15947"-- define our user defined function --\n" 15948"CREATE OR REPLACE FUNCTION raster_mapalgebra_union(\n" 15949" rast1 double precision,\n" 15950" rast2 double precision,\n" 15951" pos integer[],\n" 15952" VARIADIC userargs text[]\n" 15953")\n" 15954" RETURNS double precision\n" 15955" AS $$\n" 15956" DECLARE\n" 15957" BEGIN\n" 15958" CASE\n" 15959" WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN\n" 15960" RETURN ((rast1 + rast2)/2.);\n" 15961" WHEN rast1 IS NULL AND rast2 IS NULL THEN\n" 15962" RETURN NULL;\n" 15963" WHEN rast1 IS NULL THEN\n" 15964" RETURN rast2;\n" 15965" ELSE\n" 15966" RETURN rast1;\n" 15967" END CASE;\n" 15968"\n" 15969" RETURN NULL;\n" 15970" END;\n" 15971" $$ LANGUAGE 'plpgsql' IMMUTABLE COST 1000;\n" 15972"\n" 15973"-- prep our test table of rasters\n" 15974"DROP TABLE IF EXISTS map_shapes;\n" 15975"CREATE TABLE map_shapes(rid serial PRIMARY KEY, rast raster, bnum integer, " 15976"descrip text);\n" 15977"INSERT INTO map_shapes(rast,bnum, descrip)\n" 15978"WITH mygeoms\n" 15979" AS ( SELECT 2 As bnum, ST_Buffer(ST_Point(90,90),30) As geom, 'circle' " 15980"As descrip\n" 15981" UNION ALL\n" 15982" SELECT 3 AS bnum,\n" 15983" ST_Buffer(ST_GeomFromText('LINESTRING(50 50,150 150,150 " 15984"50)'), 15) As geom, 'big road' As descrip\n" 15985" UNION ALL\n" 15986" SELECT 1 As bnum,\n" 15987" ST_Translate(ST_Buffer(ST_GeomFromText('LINESTRING(60 50,150 " 15988"150,150 50)'), 8,'join=bevel'), 10,-6) As geom, 'small road' As descrip\n" 15989" ),\n" 15990" -- define our canvas to be 1 to 1 pixel to geometry\n" 15991" canvas\n" 15992" AS ( SELECT ST_AddBand(ST_MakeEmptyRaster(250,\n" 15993" 250,\n" 15994" ST_XMin(e)::integer, ST_YMax(e)::integer, 1, -1, 0, 0 ) , '8BUI'::" 15995"text,0) As rast\n" 15996" FROM (SELECT ST_Extent(geom) As e,\n" 15997" Max(ST_SRID(geom)) As srid\n" 15998" from mygeoms\n" 15999" ) As foo\n" 16000" )\n" 16001"-- return our rasters aligned with our canvas\n" 16002"SELECT ST_AsRaster(m.geom, canvas.rast, '8BUI', 240) As rast, bnum, descrip\n" 16003" FROM mygeoms AS m CROSS JOIN canvas\n" 16004"UNION ALL\n" 16005"SELECT canvas.rast, 4, 'canvas'\n" 16006"FROM canvas;\n" 16007"\n" 16008"-- Map algebra on single band rasters and then collect with ST_AddBand\n" 16009"INSERT INTO map_shapes(rast,bnum,descrip)\n" 16010"SELECT ST_AddBand(ST_AddBand(rasts[1], rasts[2]),rasts[3]), 4, 'map bands " 16011"overlay fct union (canvas)'\n" 16012" FROM (SELECT ARRAY(SELECT ST_MapAlgebraFct(m1.rast, m2.rast,\n" 16013" 'raster_mapalgebra_union(double precision, double " 16014"precision, integer[], text[])'::regprocedure, '8BUI', 'FIRST')\n" 16015" FROM map_shapes As m1 CROSS JOIN map_shapes As m2\n" 16016" WHERE m1.descrip = 'canvas' AND m2.descrip <> 'canvas' ORDER " 16017"BY m2.bnum) As rasts) As foo;" 16018msgstr "" 16019 16020#. Tag: para 16021#: reference_raster.xml:8309 16022#, no-c-format 16023msgid "map bands overlay (canvas) (R: small road, G: circle, B: big road)" 16024msgstr "" 16025 16026#. Tag: title 16027#: reference_raster.xml:8321 16028#, no-c-format 16029msgid "User Defined function that takes extra args" 16030msgstr "" 16031 16032#. Tag: programlisting 16033#: reference_raster.xml:8322 16034#, no-c-format 16035msgid "" 16036"CREATE OR REPLACE FUNCTION raster_mapalgebra_userargs(\n" 16037" rast1 double precision,\n" 16038" rast2 double precision,\n" 16039" pos integer[],\n" 16040" VARIADIC userargs text[]\n" 16041")\n" 16042" RETURNS double precision\n" 16043" AS $$\n" 16044" DECLARE\n" 16045" BEGIN\n" 16046" CASE\n" 16047" WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN\n" 16048" RETURN least(userargs[1]::integer,(rast1 + " 16049"rast2)/2.);\n" 16050" WHEN rast1 IS NULL AND rast2 IS NULL THEN\n" 16051" RETURN userargs[2]::integer;\n" 16052" WHEN rast1 IS NULL THEN\n" 16053" RETURN greatest(rast2,random()*userargs[3]::" 16054"integer)::integer;\n" 16055" ELSE\n" 16056" RETURN greatest(rast1, random()*userargs[4]::" 16057"integer)::integer;\n" 16058" END CASE;\n" 16059"\n" 16060" RETURN NULL;\n" 16061" END;\n" 16062" $$ LANGUAGE 'plpgsql' VOLATILE COST 1000;\n" 16063"\n" 16064"SELECT ST_MapAlgebraFct(m1.rast, 1, m1.rast, 3,\n" 16065" 'raster_mapalgebra_userargs(double precision, double " 16066"precision, integer[], text[])'::regprocedure,\n" 16067" '8BUI', 'INTERSECT', '100','200','200','0')\n" 16068" FROM map_shapes As m1\n" 16069" WHERE m1.descrip = 'map bands overlay fct union (canvas)';" 16070msgstr "" 16071 16072#. Tag: para 16073#: reference_raster.xml:8330 16074#, no-c-format 16075msgid "user defined with extra args and different bands from same raster" 16076msgstr "" 16077 16078#. Tag: refname 16079#: reference_raster.xml:8349 16080#, no-c-format 16081msgid "ST_MapAlgebraFctNgb" 16082msgstr "ST_MapAlgebraFctNgb" 16083 16084#. Tag: refpurpose 16085#: reference_raster.xml:8350 16086#, no-c-format 16087msgid "" 16088"1-band version: Map Algebra Nearest Neighbor using user-defined PostgreSQL " 16089"function. Return a raster which values are the result of a PLPGSQL user " 16090"function involving a neighborhood of values from the input raster band." 16091msgstr "" 16092 16093#. Tag: funcprototype 16094#: reference_raster.xml:8355 16095#, no-c-format 16096msgid "" 16097"<funcdef>raster <function>ST_MapAlgebraFctNgb</function></funcdef> " 16098"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 16099"<paramdef><type>integer </type> <parameter>band</parameter></paramdef> " 16100"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 16101"<paramdef><type>integer </type> <parameter>ngbwidth</parameter></paramdef> " 16102"<paramdef><type>integer </type> <parameter>ngbheight</parameter></paramdef> " 16103"<paramdef><type>regprocedure </type> <parameter>onerastngbuserfunc</" 16104"parameter></paramdef> <paramdef><type>text </type> <parameter>nodatamode</" 16105"parameter></paramdef> <paramdef><type>text[] </type> <parameter>VARIADIC " 16106"args</parameter></paramdef>" 16107msgstr "" 16108"<funcdef>raster <function>ST_MapAlgebraFctNgb</function></funcdef> " 16109"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 16110"<paramdef><type>integer </type> <parameter>band</parameter></paramdef> " 16111"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 16112"<paramdef><type>integer </type> <parameter>ngbwidth</parameter></paramdef> " 16113"<paramdef><type>integer </type> <parameter>ngbheight</parameter></paramdef> " 16114"<paramdef><type>regprocedure </type> <parameter>onerastngbuserfunc</" 16115"parameter></paramdef> <paramdef><type>text </type> <parameter>nodatamode</" 16116"parameter></paramdef> <paramdef><type>text[] </type> <parameter>VARIADIC " 16117"args</parameter></paramdef>" 16118 16119#. Tag: para 16120#: reference_raster.xml:8378 16121#, no-c-format 16122msgid "" 16123"(one raster version) Return a raster which values are the result of a " 16124"PLPGSQL user function involving a neighborhood of values from the input " 16125"raster band. The user function takes the neighborhood of pixel values as an " 16126"array of numbers, for each pixel, returns the result from the user function, " 16127"replacing pixel value of currently inspected pixel with the function result." 16128msgstr "" 16129 16130#. Tag: term 16131#: reference_raster.xml:8382 16132#, no-c-format 16133msgid "rast" 16134msgstr "rast" 16135 16136#. Tag: para 16137#: reference_raster.xml:8383 16138#, no-c-format 16139msgid "Raster on which the user function is evaluated." 16140msgstr "" 16141 16142#. Tag: term 16143#: reference_raster.xml:8386 16144#, no-c-format 16145msgid "band" 16146msgstr "" 16147 16148#. Tag: para 16149#: reference_raster.xml:8387 16150#, no-c-format 16151msgid "Band number of the raster to be evaluated. Default to 1." 16152msgstr "" 16153 16154#. Tag: para 16155#: reference_raster.xml:8391 16156#, no-c-format 16157msgid "" 16158"The resulting pixel type of the output raster. Must be one listed in <xref " 16159"linkend=\"RT_ST_BandPixelType\"/> or left out or set to NULL. If not passed " 16160"in or set to NULL, will default to the pixeltype of the <varname>rast</" 16161"varname>. Results are truncated if they are larger than what is allowed for " 16162"the pixeltype." 16163msgstr "" 16164 16165#. Tag: term 16166#: reference_raster.xml:8394 16167#, no-c-format 16168msgid "ngbwidth" 16169msgstr "ngbwidth" 16170 16171#. Tag: para 16172#: reference_raster.xml:8395 16173#, no-c-format 16174msgid "The width of the neighborhood, in cells." 16175msgstr "La larghezza dell'intorno, in celle." 16176 16177#. Tag: term 16178#: reference_raster.xml:8398 16179#, no-c-format 16180msgid "ngbheight" 16181msgstr "ngbheight" 16182 16183#. Tag: para 16184#: reference_raster.xml:8399 16185#, no-c-format 16186msgid "The height of the neighborhood, in cells." 16187msgstr "L'altezza dell'intorno, in celle." 16188 16189#. Tag: term 16190#: reference_raster.xml:8402 16191#, no-c-format 16192msgid "onerastngbuserfunc" 16193msgstr "" 16194 16195#. Tag: para 16196#: reference_raster.xml:8403 16197#, no-c-format 16198msgid "" 16199"PLPGSQL/psql user function to apply to neighborhood pixels of a single band " 16200"of a raster. The first element is a 2-dimensional array of numbers " 16201"representing the rectangular pixel neighborhood" 16202msgstr "" 16203 16204#. Tag: term 16205#: reference_raster.xml:8406 16206#, no-c-format 16207msgid "nodatamode" 16208msgstr "" 16209 16210#. Tag: para 16211#: reference_raster.xml:8408 16212#, no-c-format 16213msgid "" 16214"Defines what value to pass to the function for a neighborhood pixel that is " 16215"nodata or NULL" 16216msgstr "" 16217 16218#. Tag: para 16219#: reference_raster.xml:8409 16220#, no-c-format 16221msgid "" 16222"'ignore': any NODATA values encountered in the neighborhood are ignored by " 16223"the computation -- this flag must be sent to the user callback function, and " 16224"the user function decides how to ignore it." 16225msgstr "" 16226 16227#. Tag: para 16228#: reference_raster.xml:8410 16229#, no-c-format 16230msgid "" 16231"'NULL': any NODATA values encountered in the neighborhood will cause the " 16232"resulting pixel to be NULL -- the user callback function is skipped in this " 16233"case." 16234msgstr "" 16235 16236#. Tag: para 16237#: reference_raster.xml:8411 16238#, no-c-format 16239msgid "" 16240"'value': any NODATA values encountered in the neighborhood are replaced by " 16241"the reference pixel (the one in the center of the neighborhood). Note that " 16242"if this value is NODATA, the behavior is the same as 'NULL' (for the " 16243"affected neighborhood)" 16244msgstr "" 16245 16246#. Tag: term 16247#: reference_raster.xml:8415 16248#, no-c-format 16249msgid "args" 16250msgstr "args" 16251 16252#. Tag: para 16253#: reference_raster.xml:8416 16254#, no-c-format 16255msgid "Arguments to pass into the user function." 16256msgstr "argomenti da passare alla funzione utente." 16257 16258#. Tag: para 16259#: reference_raster.xml:8426 16260#, no-c-format 16261msgid "" 16262"Examples utilize the katrina raster loaded as a single tile described in " 16263"<ulink url=\"http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html\">http://" 16264"trac.osgeo.org/gdal/wiki/frmts_wtkraster.html</ulink> and then prepared in " 16265"the <xref linkend=\"RT_ST_Rescale\"/> examples" 16266msgstr "" 16267 16268#. Tag: programlisting 16269#: reference_raster.xml:8428 16270#, no-c-format 16271msgid "" 16272"--\n" 16273"-- A simple 'callback' user function that averages up all the values in a " 16274"neighborhood.\n" 16275"--\n" 16276"CREATE OR REPLACE FUNCTION rast_avg(matrix float[][], nodatamode text, " 16277"variadic args text[])\n" 16278" RETURNS float AS\n" 16279" $$\n" 16280" DECLARE\n" 16281" _matrix float[][];\n" 16282" x1 integer;\n" 16283" x2 integer;\n" 16284" y1 integer;\n" 16285" y2 integer;\n" 16286" sum float;\n" 16287" BEGIN\n" 16288" _matrix := matrix;\n" 16289" sum := 0;\n" 16290" FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP\n" 16291" FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP\n" 16292" sum := sum + _matrix[x][y];\n" 16293" END LOOP;\n" 16294" END LOOP;\n" 16295" RETURN (sum*1.0/(array_upper(matrix,1)*array_upper(matrix,2) ))::" 16296"integer ;\n" 16297" END;\n" 16298" $$\n" 16299"LANGUAGE 'plpgsql' IMMUTABLE COST 1000;\n" 16300"\n" 16301"-- now we apply to our raster averaging pixels within 2 pixels of each other " 16302"in X and Y direction --\n" 16303"SELECT ST_MapAlgebraFctNgb(rast, 1, '8BUI', 4,4,\n" 16304" 'rast_avg(float[][], text, text[])'::regprocedure, 'NULL', " 16305"NULL) As nn_with_border\n" 16306" FROM katrinas_rescaled\n" 16307" limit 1;" 16308msgstr "" 16309 16310#. Tag: para 16311#: reference_raster.xml:8442 16312#, no-c-format 16313msgid "First band of our raster" 16314msgstr "" 16315 16316#. Tag: para 16317#: reference_raster.xml:8456 16318#, no-c-format 16319msgid "new raster after averaging pixels withing 4x4 pixels of each other" 16320msgstr "" 16321 16322#. Tag: para 16323#: reference_raster.xml:8471 16324#, no-c-format 16325msgid "" 16326", <xref linkend=\"RT_ST_MapAlgebraExpr\"/>, <xref linkend=\"RT_ST_Rescale\"/>" 16327msgstr "" 16328", <xref linkend=\"RT_ST_MapAlgebraExpr\"/>, <xref linkend=\"RT_ST_Rescale\"/>" 16329 16330#. Tag: refname 16331#: reference_raster.xml:8481 16332#, no-c-format 16333msgid "ST_Reclass" 16334msgstr "ST_Reclass" 16335 16336#. Tag: refpurpose 16337#: reference_raster.xml:8482 16338#, no-c-format 16339msgid "" 16340"Creates a new raster composed of band types reclassified from original. The " 16341"nband is the band to be changed. If nband is not specified assumed to be 1. " 16342"All other bands are returned unchanged. Use case: convert a 16BUI band to a " 16343"8BUI and so forth for simpler rendering as viewable formats." 16344msgstr "" 16345 16346#. Tag: funcsynopsis 16347#: reference_raster.xml:8486 16348#, no-c-format 16349msgid "" 16350"<funcprototype> <funcdef>raster <function>ST_Reclass</function></funcdef> " 16351"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 16352"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 16353"<paramdef><type>text </type> <parameter>reclassexpr</parameter></paramdef> " 16354"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 16355"<paramdef choice=\"opt\"><type>double precision </type> " 16356"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 16357"<funcprototype> <funcdef>raster <function>ST_Reclass</function></funcdef> " 16358"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 16359"<paramdef><type>reclassarg[] </type> <parameter>VARIADIC reclassargset</" 16360"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 16361"<function>ST_Reclass</function></funcdef> <paramdef><type>raster </type> " 16362"<parameter>rast</parameter></paramdef> <paramdef><type>text </type> " 16363"<parameter>reclassexpr</parameter></paramdef> <paramdef><type>text </type> " 16364"<parameter>pixeltype</parameter></paramdef> </funcprototype>" 16365msgstr "" 16366"<funcprototype> <funcdef>raster <function>ST_Reclass</function></funcdef> " 16367"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 16368"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 16369"<paramdef><type>text </type> <parameter>reclassexpr</parameter></paramdef> " 16370"<paramdef><type>text </type> <parameter>pixeltype</parameter></paramdef> " 16371"<paramdef choice=\"opt\"><type>double precision </type> " 16372"<parameter>nodataval=NULL</parameter></paramdef> </funcprototype> " 16373"<funcprototype> <funcdef>raster <function>ST_Reclass</function></funcdef> " 16374"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 16375"<paramdef><type>reclassarg[] </type> <parameter>VARIADIC reclassargset</" 16376"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>raster " 16377"<function>ST_Reclass</function></funcdef> <paramdef><type>raster </type> " 16378"<parameter>rast</parameter></paramdef> <paramdef><type>text </type> " 16379"<parameter>reclassexpr</parameter></paramdef> <paramdef><type>text </type> " 16380"<parameter>pixeltype</parameter></paramdef> </funcprototype>" 16381 16382#. Tag: para 16383#: reference_raster.xml:8514 16384#, no-c-format 16385msgid "" 16386"Creates a new raster formed by applying a valid PostgreSQL algebraic " 16387"operation defined by the <varname>reclassexpr</varname> on the input raster " 16388"(<varname>rast</varname>). If no <varname>band</varname> is specified band 1 " 16389"is assumed. The new raster will have the same georeference, width, and " 16390"height as the original raster. Bands not designated will come back " 16391"unchanged. Refer to <xref linkend=\"reclassarg\"/> for description of valid " 16392"reclassification expressions." 16393msgstr "" 16394 16395#. Tag: para 16396#: reference_raster.xml:8516 16397#, no-c-format 16398msgid "" 16399"The bands of the new raster will have pixel type of <varname>pixeltype</" 16400"varname>. If <varname>reclassargset</varname> is passed in then each " 16401"reclassarg defines behavior of each band generated." 16402msgstr "" 16403 16404#. Tag: para 16405#: reference_raster.xml:8523 16406#, no-c-format 16407msgid "" 16408"Create a new raster from the original where band 2 is converted from 8BUI to " 16409"4BUI and all values from 101-254 are set to nodata value." 16410msgstr "" 16411 16412#. Tag: programlisting 16413#: reference_raster.xml:8524 16414#, no-c-format 16415msgid "" 16416"ALTER TABLE dummy_rast ADD COLUMN reclass_rast raster;\n" 16417"UPDATE dummy_rast SET reclass_rast = ST_Reclass(rast,2,'0-87:1-10, " 16418"88-100:11-15, 101-254:0-0', '4BUI',0) WHERE rid = 2;\n" 16419"\n" 16420"SELECT i as col, j as row, ST_Value(rast,2,i,j) As origval,\n" 16421" ST_Value(reclass_rast, 2, i, j) As reclassval,\n" 16422" ST_Value(reclass_rast, 2, i, j, false) As reclassval_include_nodata\n" 16423"FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN " 16424"generate_series(1,3) AS j\n" 16425"WHERE rid = 2;\n" 16426"\n" 16427" col | row | origval | reclassval | reclassval_include_nodata\n" 16428"-----+-----+---------+------------+---------------------------\n" 16429" 1 | 1 | 78 | 9 | 9\n" 16430" 2 | 1 | 98 | 14 | 14\n" 16431" 3 | 1 | 122 | | 0\n" 16432" 1 | 2 | 96 | 14 | 14\n" 16433" 2 | 2 | 118 | | 0\n" 16434" 3 | 2 | 180 | | 0\n" 16435" 1 | 3 | 99 | 15 | 15\n" 16436" 2 | 3 | 112 | | 0\n" 16437" 3 | 3 | 169 | | 0" 16438msgstr "" 16439 16440#. Tag: title 16441#: reference_raster.xml:8528 16442#, no-c-format 16443msgid "Example: Advanced using multiple reclassargs" 16444msgstr "" 16445 16446#. Tag: para 16447#: reference_raster.xml:8530 16448#, no-c-format 16449msgid "" 16450"Create a new raster from the original where band 1,2,3 is converted to " 16451"1BB,4BUI, 4BUI respectively and reclassified. Note this uses the variadic " 16452"<varname>reclassarg</varname> argument which can take as input an indefinite " 16453"number of reclassargs (theoretically as many bands as you have)" 16454msgstr "" 16455 16456#. Tag: programlisting 16457#: reference_raster.xml:8531 16458#, no-c-format 16459msgid "" 16460"UPDATE dummy_rast SET reclass_rast =\n" 16461" ST_Reclass(rast,\n" 16462" ROW(2,'0-87]:1-10, (87-100]:11-15, (101-254]:0-0', '4BUI',NULL)::" 16463"reclassarg,\n" 16464" ROW(1,'0-253]:1, 254:0', '1BB', NULL)::reclassarg,\n" 16465" ROW(3,'0-70]:1, (70-86:2, [86-150):3, [150-255:4', '4BUI', NULL)::" 16466"reclassarg\n" 16467" ) WHERE rid = 2;\n" 16468"\n" 16469"SELECT i as col, j as row,ST_Value(rast,1,i,j) As ov1, " 16470"ST_Value(reclass_rast, 1, i, j) As rv1,\n" 16471" ST_Value(rast,2,i,j) As ov2, ST_Value(reclass_rast, 2, i, j) As rv2,\n" 16472" ST_Value(rast,3,i,j) As ov3, ST_Value(reclass_rast, 3, i, j) As rv3\n" 16473"FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN " 16474"generate_series(1,3) AS j\n" 16475"WHERE rid = 2;\n" 16476"\n" 16477"col | row | ov1 | rv1 | ov2 | rv2 | ov3 | rv3\n" 16478"----+-----+-----+-----+-----+-----+-----+-----\n" 16479" 1 | 1 | 253 | 1 | 78 | 9 | 70 | 1\n" 16480" 2 | 1 | 254 | 0 | 98 | 14 | 86 | 3\n" 16481" 3 | 1 | 253 | 1 | 122 | 0 | 100 | 3\n" 16482" 1 | 2 | 253 | 1 | 96 | 14 | 80 | 2\n" 16483" 2 | 2 | 254 | 0 | 118 | 0 | 108 | 3\n" 16484" 3 | 2 | 254 | 0 | 180 | 0 | 162 | 4\n" 16485" 1 | 3 | 250 | 1 | 99 | 15 | 90 | 3\n" 16486" 2 | 3 | 254 | 0 | 112 | 0 | 108 | 3\n" 16487" 3 | 3 | 254 | 0 | 169 | 0 | 175 | 4" 16488msgstr "" 16489 16490#. Tag: title 16491#: reference_raster.xml:8535 16492#, no-c-format 16493msgid "" 16494"Example: Advanced Map a single band 32BF raster to multiple viewable bands" 16495msgstr "" 16496 16497#. Tag: para 16498#: reference_raster.xml:8536 16499#, no-c-format 16500msgid "" 16501"Create a new 3 band (8BUI,8BUI,8BUI viewable raster) from a raster that has " 16502"only one 32bf band" 16503msgstr "" 16504 16505#. Tag: programlisting 16506#: reference_raster.xml:8537 16507#, no-c-format 16508msgid "" 16509"ALTER TABLE wind ADD COLUMN rast_view raster;\n" 16510"UPDATE wind\n" 16511" set rast_view = ST_AddBand( NULL,\n" 16512" ARRAY[\n" 16513" ST_Reclass(rast, 1,'0.1-10]:1-10,9-10]:11,(11-33:0'::text, '8BUI'::" 16514"text,0),\n" 16515" ST_Reclass(rast,1, '11-33):0-255,[0-32:0,(34-1000:0'::text, '8BUI'::" 16516"text,0),\n" 16517" ST_Reclass(rast,1,'0-32]:0,(32-100:100-255'::text, '8BUI'::text,0)\n" 16518" ]\n" 16519" );" 16520msgstr "" 16521 16522#. Tag: para 16523#: reference_raster.xml:8542 16524#, no-c-format 16525msgid "" 16526", <xref linkend=\"RT_ST_Band\"/>, <xref linkend=\"RT_ST_BandPixelType\"/>, " 16527"<xref linkend=\"RT_ST_MakeEmptyRaster\"/>, <xref linkend=\"reclassarg\"/>, " 16528"<xref linkend=\"RT_ST_Value\"/>" 16529msgstr "" 16530", <xref linkend=\"RT_ST_Band\"/>, <xref linkend=\"RT_ST_BandPixelType\"/>, " 16531"<xref linkend=\"RT_ST_MakeEmptyRaster\"/>, <xref linkend=\"reclassarg\"/>, " 16532"<xref linkend=\"RT_ST_Value\"/>" 16533 16534#. Tag: refname 16535#: reference_raster.xml:8555 16536#, no-c-format 16537msgid "ST_Union" 16538msgstr "ST_Union" 16539 16540#. Tag: refpurpose 16541#: reference_raster.xml:8556 16542#, no-c-format 16543msgid "" 16544"Returns the union of a set of raster tiles into a single raster composed of " 16545"1 or more bands." 16546msgstr "" 16547 16548#. Tag: funcprototype 16549#: reference_raster.xml:8561 16550#, no-c-format 16551msgid "" 16552"<funcdef>raster <function>ST_Union</function></funcdef> " 16553"<paramdef><type>setof raster </type> <parameter>rast</parameter></paramdef>" 16554msgstr "" 16555"<funcdef>raster <function>ST_Union</function></funcdef> " 16556"<paramdef><type>setof raster </type> <parameter>rast</parameter></paramdef>" 16557 16558#. Tag: funcprototype 16559#: reference_raster.xml:8567 16560#, no-c-format 16561msgid "" 16562"<funcdef>raster <function>ST_Union</function></funcdef> " 16563"<paramdef><type>setof raster </type> <parameter>rast</parameter></paramdef> " 16564"<paramdef><type>unionarg[] </type> <parameter>unionargset</parameter></" 16565"paramdef>" 16566msgstr "" 16567"<funcdef>raster <function>ST_Union</function></funcdef> " 16568"<paramdef><type>setof raster </type> <parameter>rast</parameter></paramdef> " 16569"<paramdef><type>unionarg[] </type> <parameter>unionargset</parameter></" 16570"paramdef>" 16571 16572#. Tag: funcprototype 16573#: reference_raster.xml:8574 16574#, no-c-format 16575msgid "" 16576"<funcdef>raster <function>ST_Union</function></funcdef> " 16577"<paramdef><type>setof raster</type> <parameter>rast</parameter></paramdef> " 16578"<paramdef><type>integer</type> <parameter>nband</parameter></paramdef>" 16579msgstr "" 16580"<funcdef>raster <function>ST_Union</function></funcdef> " 16581"<paramdef><type>setof raster</type> <parameter>rast</parameter></paramdef> " 16582"<paramdef><type>integer</type> <parameter>nband</parameter></paramdef>" 16583 16584#. Tag: funcprototype 16585#: reference_raster.xml:8581 16586#, no-c-format 16587msgid "" 16588"<funcdef>raster <function>ST_Union</function></funcdef> " 16589"<paramdef><type>setof raster</type> <parameter>rast</parameter></paramdef> " 16590"<paramdef><type>text</type> <parameter>uniontype</parameter></paramdef>" 16591msgstr "" 16592"<funcdef>raster <function>ST_Union</function></funcdef> " 16593"<paramdef><type>setof raster</type> <parameter>rast</parameter></paramdef> " 16594"<paramdef><type>text</type> <parameter>uniontype</parameter></paramdef>" 16595 16596#. Tag: funcprototype 16597#: reference_raster.xml:8588 16598#, no-c-format 16599msgid "" 16600"<funcdef>raster <function>ST_Union</function></funcdef> " 16601"<paramdef><type>setof raster</type> <parameter>rast</parameter></paramdef> " 16602"<paramdef><type>integer</type> <parameter>nband</parameter></paramdef> " 16603"<paramdef><type>text</type> <parameter>uniontype</parameter></paramdef>" 16604msgstr "" 16605"<funcdef>raster <function>ST_Union</function></funcdef> " 16606"<paramdef><type>setof raster</type> <parameter>rast</parameter></paramdef> " 16607"<paramdef><type>integer</type> <parameter>nband</parameter></paramdef> " 16608"<paramdef><type>text</type> <parameter>uniontype</parameter></paramdef>" 16609 16610#. Tag: para 16611#: reference_raster.xml:8600 16612#, no-c-format 16613msgid "" 16614"Returns the union of a set of raster tiles into a single raster composed of " 16615"at least one band. The resulting raster's extent is the extent of the whole " 16616"set. In the case of intersection, the resulting value is defined by " 16617"<varname>uniontype</varname> which is one of the following: LAST (default), " 16618"FIRST, MIN, MAX, COUNT, SUM, MEAN, RANGE." 16619msgstr "" 16620 16621#. Tag: para 16622#: reference_raster.xml:8603 16623#, no-c-format 16624msgid "" 16625"In order for rasters to be unioned, they must all have the same alignment. " 16626"Use <xref linkend=\"RT_ST_SameAlignment\"/> and <xref linkend=" 16627"\"RT_ST_NotSameAlignmentReason\"/> for more details and help. One way to fix " 16628"alignment issues is to use <xref linkend=\"RT_ST_Resample\"/> and use the " 16629"same reference raster for alignment." 16630msgstr "" 16631 16632#. Tag: para 16633#: reference_raster.xml:8607 16634#, no-c-format 16635msgid "Enhanced: 2.1.0 Improved Speed (fully C-Based)." 16636msgstr "" 16637 16638#. Tag: para 16639#: reference_raster.xml:8608 16640#, no-c-format 16641msgid "Availability: 2.1.0 ST_Union(rast, unionarg) variant was introduced." 16642msgstr "" 16643 16644#. Tag: para 16645#: reference_raster.xml:8609 16646#, no-c-format 16647msgid "" 16648"Enhanced: 2.1.0 ST_Union(rast) (variant 1) unions all bands of all input " 16649"rasters. Prior versions of PostGIS assumed the first band." 16650msgstr "" 16651 16652#. Tag: para 16653#: reference_raster.xml:8610 16654#, no-c-format 16655msgid "" 16656"Enhanced: 2.1.0 ST_Union(rast, uniontype) (variant 4) unions all bands of " 16657"all input rasters." 16658msgstr "" 16659 16660#. Tag: title 16661#: reference_raster.xml:8613 16662#, no-c-format 16663msgid "Examples: Reconstitute a single band chunked raster tile" 16664msgstr "" 16665 16666#. Tag: programlisting 16667#: reference_raster.xml:8614 16668#, no-c-format 16669msgid "" 16670"-- this creates a single band from first band of raster tiles\n" 16671"-- that form the original file system tile\n" 16672"SELECT filename, ST_Union(rast,1) As file_rast\n" 16673"FROM sometable WHERE filename IN('dem01', 'dem02') GROUP BY filename;" 16674msgstr "" 16675 16676#. Tag: title 16677#: reference_raster.xml:8618 reference_raster.xml:8622 16678#, no-c-format 16679msgid "" 16680"Examples: Return a multi-band raster that is the union of tiles intersecting " 16681"geometry" 16682msgstr "" 16683 16684#. Tag: programlisting 16685#: reference_raster.xml:8619 16686#, no-c-format 16687msgid "" 16688"-- this creates a multi band raster collecting all the tiles that intersect " 16689"a line\n" 16690"-- Note: In 2.0, this would have just returned a single band raster\n" 16691"-- , new union works on all bands by default\n" 16692"-- this is equivalent to unionarg: ARRAY[ROW(1, 'LAST'), ROW(2, 'LAST'), " 16693"ROW(3, 'LAST')]::unionarg[]\n" 16694"SELECT ST_Union(rast)\n" 16695"FROM aerials.boston\n" 16696"WHERE ST_Intersects(rast, ST_GeomFromText('LINESTRING(230486 887771, 230500 " 16697"88772)',26986) );" 16698msgstr "" 16699 16700#. Tag: para 16701#: reference_raster.xml:8623 16702#, no-c-format 16703msgid "" 16704"Here we use the longer syntax if we only wanted a subset of bands or we want " 16705"to change order of bands" 16706msgstr "" 16707 16708#. Tag: programlisting 16709#: reference_raster.xml:8624 16710#, no-c-format 16711msgid "" 16712"-- this creates a multi band raster collecting all the tiles that intersect " 16713"a line\n" 16714"SELECT ST_Union(rast,ARRAY[ROW(2, 'LAST'), ROW(1, 'LAST'), ROW(3, 'LAST')]::" 16715"unionarg[])\n" 16716"FROM aerials.boston\n" 16717"WHERE ST_Intersects(rast, ST_GeomFromText('LINESTRING(230486 887771, 230500 " 16718"88772)',26986) );" 16719msgstr "" 16720 16721#. Tag: para 16722#: reference_raster.xml:8630 16723#, no-c-format 16724msgid "" 16725", <xref linkend=\"RT_ST_Envelope\"/>, <xref linkend=\"RT_ST_ConvexHull\"/>, " 16726"<xref linkend=\"RT_ST_Clip\"/>, <xref linkend=\"ST_Union\"/>" 16727msgstr "" 16728 16729#. Tag: title 16730#: reference_raster.xml:8643 16731#, no-c-format 16732msgid "Built-in Map Algebra Callback Functions" 16733msgstr "" 16734 16735#. Tag: refname 16736#: reference_raster.xml:8647 16737#, no-c-format 16738msgid "ST_Distinct4ma" 16739msgstr "ST_Distinct4ma" 16740 16741#. Tag: refpurpose 16742#: reference_raster.xml:8648 16743#, no-c-format 16744msgid "" 16745"Raster processing function that calculates the number of unique pixel values " 16746"in a neighborhood." 16747msgstr "" 16748 16749#. Tag: funcsynopsis 16750#: reference_raster.xml:8652 16751#, no-c-format 16752msgid "" 16753"<funcprototype> <funcdef>float8 <function>ST_Distinct4ma</function></" 16754"funcdef> <paramdef><type>float8[][]</type> <parameter>matrix</parameter></" 16755"paramdef> <paramdef><type>text</type> <parameter>nodatamode</parameter></" 16756"paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC args</" 16757"parameter></paramdef> </funcprototype> <funcprototype> <funcdef>double " 16758"precision <function>ST_Distinct4ma</function></funcdef> " 16759"<paramdef><type>double precision[][][]</type> <parameter>value</parameter></" 16760"paramdef> <paramdef><type>integer[][] </type> <parameter>pos</parameter></" 16761"paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC userargs</" 16762"parameter></paramdef> </funcprototype>" 16763msgstr "" 16764 16765#. Tag: para 16766#: reference_raster.xml:8672 16767#, no-c-format 16768msgid "" 16769"Calculate the number of unique pixel values in a neighborhood of pixels." 16770msgstr "" 16771 16772#. Tag: para 16773#: reference_raster.xml:8675 reference_raster.xml:8814 16774#: reference_raster.xml:8889 reference_raster.xml:8974 16775#: reference_raster.xml:9099 reference_raster.xml:9170 16776#: reference_raster.xml:9245 16777#, no-c-format 16778msgid "" 16779"Variant 1 is a specialized callback function for use as a callback parameter " 16780"to <xref linkend=\"RT_ST_MapAlgebraFctNgb\"/>." 16781msgstr "" 16782 16783#. Tag: para 16784#: reference_raster.xml:8679 reference_raster.xml:8818 16785#: reference_raster.xml:8893 reference_raster.xml:8980 16786#: reference_raster.xml:9103 reference_raster.xml:9174 16787#: reference_raster.xml:9249 16788#, no-c-format 16789msgid "" 16790"Variant 2 is a specialized callback function for use as a callback parameter " 16791"to <xref linkend=\"RT_ST_MapAlgebra\"/>." 16792msgstr "" 16793 16794#. Tag: para 16795#: reference_raster.xml:8685 reference_raster.xml:8824 16796#: reference_raster.xml:8899 reference_raster.xml:8986 16797#: reference_raster.xml:9109 reference_raster.xml:9180 16798#: reference_raster.xml:9255 16799#, no-c-format 16800msgid "" 16801"Use of Variant 1 is discouraged since <xref linkend=\"RT_ST_MapAlgebraFctNgb" 16802"\"/> has been deprecated as of 2.1.0." 16803msgstr "" 16804 16805#. Tag: para 16806#: reference_raster.xml:8691 reference_raster.xml:8830 16807#: reference_raster.xml:8905 reference_raster.xml:8992 16808#: reference_raster.xml:9115 reference_raster.xml:9186 16809#: reference_raster.xml:9261 16810#, no-c-format 16811msgid "Enhanced: 2.1.0 Addition of Variant 2" 16812msgstr "" 16813 16814#. Tag: programlisting 16815#: reference_raster.xml:8697 16816#, fuzzy, no-c-format 16817msgid "" 16818"SELECT\n" 16819" rid,\n" 16820" st_value(\n" 16821" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_distinct4ma(float[][]," 16822"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 16823" )\n" 16824"FROM dummy_rast\n" 16825"WHERE rid = 2;\n" 16826" rid | st_value\n" 16827"-----+----------\n" 16828" 2 | 3\n" 16829"(1 row)" 16830msgstr "" 16831"SELECT \n" 16832" rid,\n" 16833" st_value(\n" 16834" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_distinct4ma(float[][]," 16835"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 16836" ) \n" 16837"FROM dummy_rast \n" 16838"WHERE rid = 2;\n" 16839" rid | st_value\n" 16840"-----+----------\n" 16841" 2 | 3\n" 16842"(1 row)" 16843 16844#. Tag: para 16845#: reference_raster.xml:8703 reference_raster.xml:9127 16846#: reference_raster.xml:9198 16847#, no-c-format 16848msgid "" 16849", <xref linkend=\"RT_ST_MapAlgebra\"/>, <xref linkend=\"RT_ST_Min4ma\"/>, " 16850"<xref linkend=\"RT_ST_Max4ma\"/>, <xref linkend=\"RT_ST_Sum4ma\"/>, <xref " 16851"linkend=\"RT_ST_Mean4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref " 16852"linkend=\"RT_ST_StdDev4ma\"/>" 16853msgstr "" 16854 16855#. Tag: refname 16856#: reference_raster.xml:8718 16857#, no-c-format 16858msgid "ST_InvDistWeight4ma" 16859msgstr "ST_InvDistWeight4ma" 16860 16861#. Tag: refpurpose 16862#: reference_raster.xml:8719 16863#, no-c-format 16864msgid "" 16865"Raster processing function that interpolates a pixel's value from the " 16866"pixel's neighborhood." 16867msgstr "" 16868 16869#. Tag: funcprototype 16870#: reference_raster.xml:8724 16871#, no-c-format 16872msgid "" 16873"<funcdef>double precision <function>ST_InvDistWeight4ma</function></funcdef> " 16874"<paramdef><type>double precision[][][]</type> <parameter>value</parameter></" 16875"paramdef> <paramdef><type>integer[][]</type> <parameter>pos</parameter></" 16876"paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC userargs</" 16877"parameter></paramdef>" 16878msgstr "" 16879 16880#. Tag: para 16881#: reference_raster.xml:8736 16882#, no-c-format 16883msgid "" 16884"Calculate an interpolated value for a pixel using the Inverse Distance " 16885"Weighted method." 16886msgstr "" 16887 16888#. Tag: para 16889#: reference_raster.xml:8738 16890#, no-c-format 16891msgid "" 16892"There are two optional parameters that can be passed through " 16893"<varname>userargs</varname>. The first parameter is the power factor " 16894"(variable k in the equation below) between 0 and 1 used in the Inverse " 16895"Distance Weighted equation. If not specified, default value is 1. The second " 16896"parameter is the weight percentage applied only when the value of the pixel " 16897"of interest is included with the interpolated value from the neighborhood. " 16898"If not specified and the pixel of interest has a value, that value is " 16899"returned." 16900msgstr "" 16901 16902#. Tag: para 16903#: reference_raster.xml:8742 16904#, no-c-format 16905msgid "The basic inverse distance weight equation is:" 16906msgstr "" 16907 16908#. Tag: para 16909#: reference_raster.xml:8751 16910#, no-c-format 16911msgid "k = power factor, a real number between 0 and 1" 16912msgstr "" 16913 16914#. Tag: para 16915#: reference_raster.xml:8760 reference_raster.xml:9045 16916#, no-c-format 16917msgid "" 16918"This function is a specialized callback function for use as a callback " 16919"parameter to <xref linkend=\"RT_ST_MapAlgebra\"/>." 16920msgstr "" 16921 16922#. Tag: programlisting 16923#: reference_raster.xml:8768 reference_raster.xml:9053 16924#, no-c-format 16925msgid "-- NEEDS EXAMPLE" 16926msgstr "-- SERVE ESEMPIO" 16927 16928#. Tag: para 16929#: reference_raster.xml:8773 16930#, no-c-format 16931msgid ", <xref linkend=\"RT_ST_MinDist4ma\"/>" 16932msgstr ", <xref linkend=\"RT_ST_MinDist4ma\"/>" 16933 16934#. Tag: refname 16935#: reference_raster.xml:8782 16936#, no-c-format 16937msgid "ST_Max4ma" 16938msgstr "ST_Max4ma" 16939 16940#. Tag: refpurpose 16941#: reference_raster.xml:8783 16942#, no-c-format 16943msgid "" 16944"Raster processing function that calculates the maximum pixel value in a " 16945"neighborhood." 16946msgstr "" 16947 16948#. Tag: funcsynopsis 16949#: reference_raster.xml:8787 16950#, no-c-format 16951msgid "" 16952"<funcprototype> <funcdef>float8 <function>ST_Max4ma</function></funcdef> " 16953"<paramdef><type>float8[][]</type> <parameter>matrix</parameter></paramdef> " 16954"<paramdef><type>text</type> <parameter>nodatamode</parameter></paramdef> " 16955"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 16956"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 16957"<function>ST_Max4ma</function></funcdef> <paramdef><type>double precision[][]" 16958"[]</type> <parameter>value</parameter></paramdef> <paramdef><type>integer[]" 16959"[] </type> <parameter>pos</parameter></paramdef> <paramdef><type>text[]</" 16960"type> <parameter>VARIADIC userargs</parameter></paramdef> </funcprototype>" 16961msgstr "" 16962 16963#. Tag: para 16964#: reference_raster.xml:8807 16965#, no-c-format 16966msgid "Calculate the maximum pixel value in a neighborhood of pixels." 16967msgstr "" 16968 16969#. Tag: para 16970#: reference_raster.xml:8809 reference_raster.xml:8884 16971#: reference_raster.xml:8969 reference_raster.xml:9094 16972#: reference_raster.xml:9240 16973#, no-c-format 16974msgid "" 16975"For Variant 2, a substitution value for NODATA pixels can be specified by " 16976"passing that value to userargs." 16977msgstr "" 16978 16979#. Tag: programlisting 16980#: reference_raster.xml:8836 16981#, fuzzy, no-c-format 16982msgid "" 16983"SELECT\n" 16984" rid,\n" 16985" st_value(\n" 16986" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][],text," 16987"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 16988" )\n" 16989"FROM dummy_rast\n" 16990"WHERE rid = 2;\n" 16991" rid | st_value\n" 16992"-----+----------\n" 16993" 2 | 254\n" 16994"(1 row)" 16995msgstr "" 16996"SELECT \n" 16997" rid,\n" 16998" st_value(\n" 16999" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][],text," 17000"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17001" ) \n" 17002"FROM dummy_rast \n" 17003"WHERE rid = 2;\n" 17004" rid | st_value\n" 17005"-----+----------\n" 17006" 2 | 254\n" 17007"(1 row)" 17008 17009#. Tag: para 17010#: reference_raster.xml:8842 17011#, no-c-format 17012msgid "" 17013", <xref linkend=\"RT_ST_MapAlgebra\"/>, <xref linkend=\"RT_ST_Min4ma\"/>, " 17014"<xref linkend=\"RT_ST_Sum4ma\"/>, <xref linkend=\"RT_ST_Mean4ma\"/>, <xref " 17015"linkend=\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref " 17016"linkend=\"RT_ST_StdDev4ma\"/>" 17017msgstr "" 17018 17019#. Tag: refname 17020#: reference_raster.xml:8857 17021#, no-c-format 17022msgid "ST_Mean4ma" 17023msgstr "ST_Mean4ma" 17024 17025#. Tag: refpurpose 17026#: reference_raster.xml:8858 17027#, no-c-format 17028msgid "" 17029"Raster processing function that calculates the mean pixel value in a " 17030"neighborhood." 17031msgstr "" 17032 17033#. Tag: funcsynopsis 17034#: reference_raster.xml:8862 17035#, no-c-format 17036msgid "" 17037"<funcprototype> <funcdef>float8 <function>ST_Mean4ma</function></funcdef> " 17038"<paramdef><type>float8[][]</type> <parameter>matrix</parameter></paramdef> " 17039"<paramdef><type>text</type> <parameter>nodatamode</parameter></paramdef> " 17040"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 17041"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 17042"<function>ST_Mean4ma</function></funcdef> <paramdef><type>double precision[]" 17043"[][]</type> <parameter>value</parameter></paramdef> <paramdef><type>integer[]" 17044"[] </type> <parameter>pos</parameter></paramdef> <paramdef><type>text[]</" 17045"type> <parameter>VARIADIC userargs</parameter></paramdef> </funcprototype>" 17046msgstr "" 17047 17048#. Tag: para 17049#: reference_raster.xml:8882 17050#, no-c-format 17051msgid "Calculate the mean pixel value in a neighborhood of pixels." 17052msgstr "" 17053 17054#. Tag: programlisting 17055#: reference_raster.xml:8911 17056#, fuzzy, no-c-format 17057msgid "" 17058"SELECT\n" 17059" rid,\n" 17060" st_value(\n" 17061" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_mean4ma(float[][]," 17062"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17063" )\n" 17064"FROM dummy_rast\n" 17065"WHERE rid = 2;\n" 17066" rid | st_value\n" 17067"-----+------------------\n" 17068" 2 | 253.222229003906\n" 17069"(1 row)" 17070msgstr "" 17071"SELECT \n" 17072" rid,\n" 17073" st_value(\n" 17074" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_mean4ma(float[][]," 17075"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17076" ) \n" 17077"FROM dummy_rast \n" 17078"WHERE rid = 2;\n" 17079" rid | st_value\n" 17080"-----+------------------\n" 17081" 2 | 253.222229003906\n" 17082"(1 row)" 17083 17084#. Tag: programlisting 17085#: reference_raster.xml:8918 17086#, fuzzy, no-c-format 17087msgid "" 17088"SELECT\n" 17089" rid,\n" 17090" st_value(\n" 17091" ST_MapAlgebra(rast, 1, 'st_mean4ma(double precision[][][], " 17092"integer[][], text[])'::regprocedure,'32BF', 'FIRST', NULL, 1, 1)\n" 17093" , 2, 2)\n" 17094" FROM dummy_rast\n" 17095" WHERE rid = 2;\n" 17096" rid | st_value\n" 17097"-----+------------------\n" 17098" 2 | 253.222229003906\n" 17099"(1 row)" 17100msgstr "" 17101"SELECT \n" 17102" rid,\n" 17103" st_value(\n" 17104" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_mean4ma(float[][]," 17105"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17106" ) \n" 17107"FROM dummy_rast \n" 17108"WHERE rid = 2;\n" 17109" rid | st_value\n" 17110"-----+------------------\n" 17111" 2 | 253.222229003906\n" 17112"(1 row)" 17113 17114#. Tag: para 17115#: reference_raster.xml:8924 17116#, no-c-format 17117msgid "" 17118", <xref linkend=\"RT_ST_MapAlgebra\"/>, <xref linkend=\"RT_ST_Min4ma\"/>, " 17119"<xref linkend=\"RT_ST_Max4ma\"/>, <xref linkend=\"RT_ST_Sum4ma\"/>, <xref " 17120"linkend=\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_StdDev4ma\"/>" 17121msgstr "" 17122 17123#. Tag: refname 17124#: reference_raster.xml:8938 17125#, no-c-format 17126msgid "ST_Min4ma" 17127msgstr "ST_Min4ma" 17128 17129#. Tag: refpurpose 17130#: reference_raster.xml:8939 17131#, no-c-format 17132msgid "" 17133"Raster processing function that calculates the minimum pixel value in a " 17134"neighborhood." 17135msgstr "" 17136 17137#. Tag: funcsynopsis 17138#: reference_raster.xml:8945 17139#, no-c-format 17140msgid "" 17141"<funcprototype> <funcdef>float8 <function>ST_Min4ma</function></funcdef> " 17142"<paramdef><type>float8[][]</type> <parameter>matrix</parameter></paramdef> " 17143"<paramdef><type>text </type> <parameter>nodatamode</parameter></paramdef> " 17144"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 17145"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 17146"<function>ST_Min4ma</function></funcdef> <paramdef><type>double precision[][]" 17147"[]</type> <parameter>value</parameter></paramdef> <paramdef><type>integer[]" 17148"[] </type> <parameter>pos</parameter></paramdef> <paramdef><type>text[]</" 17149"type> <parameter>VARIADIC userargs</parameter></paramdef> </funcprototype>" 17150msgstr "" 17151 17152#. Tag: para 17153#: reference_raster.xml:8965 17154#, no-c-format 17155msgid "Calculate the minimum pixel value in a neighborhood of pixels." 17156msgstr "" 17157 17158#. Tag: programlisting 17159#: reference_raster.xml:8998 17160#, fuzzy, no-c-format 17161msgid "" 17162"SELECT\n" 17163" rid,\n" 17164" st_value(\n" 17165" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][],text," 17166"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17167" )\n" 17168"FROM dummy_rast\n" 17169"WHERE rid = 2;\n" 17170" rid | st_value\n" 17171"-----+----------\n" 17172" 2 | 250\n" 17173"(1 row)" 17174msgstr "" 17175"SELECT \n" 17176" rid,\n" 17177" st_value(\n" 17178" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][],text," 17179"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17180" ) \n" 17181"FROM dummy_rast \n" 17182"WHERE rid = 2;\n" 17183" rid | st_value\n" 17184"-----+----------\n" 17185" 2 | 250\n" 17186"(1 row)" 17187 17188#. Tag: para 17189#: reference_raster.xml:9003 17190#, no-c-format 17191msgid "" 17192", <xref linkend=\"RT_ST_MapAlgebra\"/>, <xref linkend=\"RT_ST_Max4ma\"/>, " 17193"<xref linkend=\"RT_ST_Sum4ma\"/>, <xref linkend=\"RT_ST_Mean4ma\"/>, <xref " 17194"linkend=\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref " 17195"linkend=\"RT_ST_StdDev4ma\"/>" 17196msgstr "" 17197 17198#. Tag: refname 17199#: reference_raster.xml:9018 17200#, no-c-format 17201msgid "ST_MinDist4ma" 17202msgstr "ST_MinDist4ma" 17203 17204#. Tag: refpurpose 17205#: reference_raster.xml:9019 17206#, no-c-format 17207msgid "" 17208"Raster processing function that returns the minimum distance (in number of " 17209"pixels) between the pixel of interest and a neighboring pixel with value." 17210msgstr "" 17211 17212#. Tag: funcprototype 17213#: reference_raster.xml:9024 17214#, no-c-format 17215msgid "" 17216"<funcdef>double precision <function>ST_MinDist4ma</function></funcdef> " 17217"<paramdef><type>double precision[][][]</type> <parameter>value</parameter></" 17218"paramdef> <paramdef><type>integer[][]</type> <parameter>pos</parameter></" 17219"paramdef> <paramdef><type>text[]</type> <parameter>VARIADIC userargs</" 17220"parameter></paramdef>" 17221msgstr "" 17222 17223#. Tag: para 17224#: reference_raster.xml:9036 17225#, no-c-format 17226msgid "" 17227"Return the shortest distance (in number of pixels) between the pixel of " 17228"interest and the closest pixel with value in the neighborhood." 17229msgstr "" 17230 17231#. Tag: para 17232#: reference_raster.xml:9039 17233#, no-c-format 17234msgid "" 17235"The intent of this function is to provide an informative data point that " 17236"helps infer the usefulness of the pixel of interest's interpolated value " 17237"from <xref linkend=\"RT_ST_InvDistWeight4ma\"/>. This function is " 17238"particularly useful when the neighborhood is sparsely populated." 17239msgstr "" 17240 17241#. Tag: para 17242#: reference_raster.xml:9058 17243#, no-c-format 17244msgid ", <xref linkend=\"RT_ST_InvDistWeight4ma\"/>" 17245msgstr ", <xref linkend=\"RT_ST_InvDistWeight4ma\"/>" 17246 17247#. Tag: refname 17248#: reference_raster.xml:9067 17249#, no-c-format 17250msgid "ST_Range4ma" 17251msgstr "ST_Range4ma" 17252 17253#. Tag: refpurpose 17254#: reference_raster.xml:9068 17255#, no-c-format 17256msgid "" 17257"Raster processing function that calculates the range of pixel values in a " 17258"neighborhood." 17259msgstr "" 17260 17261#. Tag: funcsynopsis 17262#: reference_raster.xml:9072 17263#, no-c-format 17264msgid "" 17265"<funcprototype> <funcdef>float8 <function>ST_Range4ma</function></funcdef> " 17266"<paramdef><type>float8[][]</type> <parameter>matrix</parameter></paramdef> " 17267"<paramdef><type>text</type> <parameter>nodatamode</parameter></paramdef> " 17268"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 17269"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 17270"<function>ST_Range4ma</function></funcdef> <paramdef><type>double precision[]" 17271"[][]</type> <parameter>value</parameter></paramdef> <paramdef><type>integer[]" 17272"[] </type> <parameter>pos</parameter></paramdef> <paramdef><type>text[]</" 17273"type> <parameter>VARIADIC userargs</parameter></paramdef> </funcprototype>" 17274msgstr "" 17275 17276#. Tag: para 17277#: reference_raster.xml:9092 17278#, no-c-format 17279msgid "Calculate the range of pixel values in a neighborhood of pixels." 17280msgstr "" 17281 17282#. Tag: programlisting 17283#: reference_raster.xml:9121 17284#, fuzzy, no-c-format 17285msgid "" 17286"SELECT\n" 17287" rid,\n" 17288" st_value(\n" 17289" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][],text," 17290"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17291" )\n" 17292"FROM dummy_rast\n" 17293"WHERE rid = 2;\n" 17294" rid | st_value\n" 17295"-----+----------\n" 17296" 2 | 4\n" 17297"(1 row)" 17298msgstr "" 17299"SELECT \n" 17300" rid,\n" 17301" st_value(\n" 17302" st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][],text," 17303"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17304" ) \n" 17305"FROM dummy_rast \n" 17306"WHERE rid = 2;\n" 17307" rid | st_value\n" 17308"-----+----------\n" 17309" 2 | 4\n" 17310"(1 row)" 17311 17312#. Tag: refname 17313#: reference_raster.xml:9142 17314#, no-c-format 17315msgid "ST_StdDev4ma" 17316msgstr "ST_StdDev4ma" 17317 17318#. Tag: refpurpose 17319#: reference_raster.xml:9143 17320#, no-c-format 17321msgid "" 17322"Raster processing function that calculates the standard deviation of pixel " 17323"values in a neighborhood." 17324msgstr "" 17325 17326#. Tag: funcsynopsis 17327#: reference_raster.xml:9147 17328#, no-c-format 17329msgid "" 17330"<funcprototype> <funcdef>float8 <function>ST_StdDev4ma</function></funcdef> " 17331"<paramdef><type>float8[][]</type> <parameter>matrix</parameter></paramdef> " 17332"<paramdef><type>text </type> <parameter>nodatamode</parameter></paramdef> " 17333"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 17334"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 17335"<function>ST_StdDev4ma</function></funcdef> <paramdef><type>double " 17336"precision[][][]</type> <parameter>value</parameter></paramdef> " 17337"<paramdef><type>integer[][] </type> <parameter>pos</parameter></paramdef> " 17338"<paramdef><type>text[]</type> <parameter>VARIADIC userargs</parameter></" 17339"paramdef> </funcprototype>" 17340msgstr "" 17341 17342#. Tag: para 17343#: reference_raster.xml:9167 17344#, no-c-format 17345msgid "" 17346"Calculate the standard deviation of pixel values in a neighborhood of pixels." 17347msgstr "" 17348 17349#. Tag: programlisting 17350#: reference_raster.xml:9192 17351#, fuzzy, no-c-format 17352msgid "" 17353"SELECT\n" 17354" rid,\n" 17355" st_value(\n" 17356" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_stddev4ma(float[][]," 17357"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17358" )\n" 17359"FROM dummy_rast\n" 17360"WHERE rid = 2;\n" 17361" rid | st_value\n" 17362"-----+------------------\n" 17363" 2 | 1.30170822143555\n" 17364"(1 row)" 17365msgstr "" 17366"SELECT \n" 17367" rid,\n" 17368" st_value(\n" 17369" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_stddev4ma(float[][]," 17370"text,text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17371" ) \n" 17372"FROM dummy_rast \n" 17373"WHERE rid = 2;\n" 17374" rid | st_value\n" 17375"-----+------------------\n" 17376" 2 | 1.30170822143555\n" 17377"(1 row)" 17378 17379#. Tag: refname 17380#: reference_raster.xml:9213 17381#, no-c-format 17382msgid "ST_Sum4ma" 17383msgstr "ST_Sum4ma" 17384 17385#. Tag: refpurpose 17386#: reference_raster.xml:9214 17387#, no-c-format 17388msgid "" 17389"Raster processing function that calculates the sum of all pixel values in a " 17390"neighborhood." 17391msgstr "" 17392 17393#. Tag: funcsynopsis 17394#: reference_raster.xml:9218 17395#, no-c-format 17396msgid "" 17397"<funcprototype> <funcdef>float8 <function>ST_Sum4ma</function></funcdef> " 17398"<paramdef><type>float8[][]</type> <parameter>matrix</parameter></paramdef> " 17399"<paramdef><type>text</type> <parameter>nodatamode</parameter></paramdef> " 17400"<paramdef><type>text[]</type> <parameter>VARIADIC args</parameter></" 17401"paramdef> </funcprototype> <funcprototype> <funcdef>double precision " 17402"<function>ST_Sum4ma</function></funcdef> <paramdef><type>double precision[][]" 17403"[]</type> <parameter>value</parameter></paramdef> <paramdef><type>integer[]" 17404"[] </type> <parameter>pos</parameter></paramdef> <paramdef><type>text[]</" 17405"type> <parameter>VARIADIC userargs</parameter></paramdef> </funcprototype>" 17406msgstr "" 17407 17408#. Tag: para 17409#: reference_raster.xml:9238 17410#, no-c-format 17411msgid "Calculate the sum of all pixel values in a neighborhood of pixels." 17412msgstr "" 17413 17414#. Tag: programlisting 17415#: reference_raster.xml:9267 17416#, fuzzy, no-c-format 17417msgid "" 17418"SELECT\n" 17419" rid,\n" 17420" st_value(\n" 17421" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_sum4ma(float[][],text," 17422"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17423" )\n" 17424"FROM dummy_rast\n" 17425"WHERE rid = 2;\n" 17426" rid | st_value\n" 17427"-----+----------\n" 17428" 2 | 2279\n" 17429"(1 row)" 17430msgstr "" 17431"SELECT \n" 17432" rid,\n" 17433" st_value(\n" 17434" st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_sum4ma(float[][],text," 17435"text[])'::regprocedure, 'ignore', NULL), 2, 2\n" 17436" ) \n" 17437"FROM dummy_rast \n" 17438"WHERE rid = 2;\n" 17439" rid | st_value\n" 17440"-----+----------\n" 17441" 2 | 2279\n" 17442"(1 row)" 17443 17444#. Tag: para 17445#: reference_raster.xml:9273 17446#, no-c-format 17447msgid "" 17448", <xref linkend=\"RT_ST_MapAlgebra\"/>, <xref linkend=\"RT_ST_Min4ma\"/>, " 17449"<xref linkend=\"RT_ST_Max4ma\"/>, <xref linkend=\"RT_ST_Mean4ma\"/>, <xref " 17450"linkend=\"RT_ST_Range4ma\"/>, <xref linkend=\"RT_ST_Distinct4ma\"/>, <xref " 17451"linkend=\"RT_ST_StdDev4ma\"/>" 17452msgstr "" 17453 17454#. Tag: title 17455#: reference_raster.xml:9289 17456#, no-c-format 17457msgid "DEM (Elevation)" 17458msgstr "" 17459 17460#. Tag: refname 17461#: reference_raster.xml:9293 17462#, no-c-format 17463msgid "ST_Aspect" 17464msgstr "ST_Aspect" 17465 17466#. Tag: refpurpose 17467#: reference_raster.xml:9294 17468#, no-c-format 17469msgid "" 17470"Returns the aspect (in degrees by default) of an elevation raster band. " 17471"Useful for analyzing terrain." 17472msgstr "" 17473 17474#. Tag: funcsynopsis 17475#: reference_raster.xml:9297 17476#, no-c-format 17477msgid "" 17478"<funcprototype> <funcdef>raster <function>ST_Aspect</function></funcdef> " 17479"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 17480"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 17481"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 17482"<parameter>pixeltype=32BF</parameter></paramdef> <paramdef choice=\"opt" 17483"\"><type>text </type> <parameter>units=DEGREES</parameter></paramdef> " 17484"<paramdef choice=\"opt\"><type>boolean </type> " 17485"<parameter>interpolate_nodata=FALSE</parameter></paramdef> </funcprototype> " 17486"<funcprototype> <funcdef>raster <function>ST_Aspect</function></funcdef> " 17487"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 17488"<paramdef><type>integer </type> <parameter>band</parameter></paramdef> " 17489"<paramdef><type>raster </type> <parameter>customextent</parameter></" 17490"paramdef> <paramdef choice=\"opt\"><type>text </type> " 17491"<parameter>pixeltype=32BF</parameter></paramdef> <paramdef choice=\"opt" 17492"\"><type>text </type> <parameter>units=DEGREES</parameter></paramdef> " 17493"<paramdef choice=\"opt\"><type>boolean </type> " 17494"<parameter>interpolate_nodata=FALSE</parameter></paramdef> </funcprototype>" 17495msgstr "" 17496 17497#. Tag: para 17498#: reference_raster.xml:9322 17499#, no-c-format 17500msgid "" 17501"Returns the aspect (in degrees by default) of an elevation raster band. " 17502"Utilizes map algebra and applies the aspect equation to neighboring pixels." 17503msgstr "" 17504 17505#. Tag: para 17506#: reference_raster.xml:9324 17507#, no-c-format 17508msgid "" 17509"<varname>units</varname> indicates the units of the aspect. Possible values " 17510"are: RADIANS, DEGREES (default)." 17511msgstr "" 17512 17513#. Tag: para 17514#: reference_raster.xml:9328 17515#, no-c-format 17516msgid "" 17517"When <varname>units</varname> = RADIANS, values are between 0 and 2 * pi " 17518"radians measured clockwise from North." 17519msgstr "" 17520 17521#. Tag: para 17522#: reference_raster.xml:9332 17523#, no-c-format 17524msgid "" 17525"When <varname>units</varname> = DEGREES, values are between 0 and 360 " 17526"degrees measured clockwise from North." 17527msgstr "" 17528 17529#. Tag: para 17530#: reference_raster.xml:9336 17531#, no-c-format 17532msgid "If slope of pixel is zero, aspect of pixel is -1." 17533msgstr "" 17534 17535#. Tag: para 17536#: reference_raster.xml:9341 17537#, no-c-format 17538msgid "" 17539"For more information about Slope, Aspect and Hillshade, please refer to " 17540"<ulink url=\"http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?" 17541"TopicName=How%20Hillshade%20works\">ESRI - How hillshade works</ulink> and " 17542"<ulink url=\"http://e2b.erdas.com/fieldguide/wwhelp/wwhimpl/common/html/" 17543"wwhelp.htm?context=FieldGuide&file=Aspect_Images.html\">ERDAS Field " 17544"Guide - Aspect Images</ulink>." 17545msgstr "" 17546 17547#. Tag: para 17548#: reference_raster.xml:9347 reference_raster.xml:9443 17549#, no-c-format 17550msgid "" 17551"Enhanced: 2.1.0 Uses ST_MapAlgebra() and added optional " 17552"<varname>interpolate_nodata</varname> function parameter" 17553msgstr "" 17554 17555#. Tag: para 17556#: reference_raster.xml:9348 reference_raster.xml:9572 17557#, no-c-format 17558msgid "" 17559"Changed: 2.1.0 In prior versions, return values were in radians. Now, return " 17560"values default to degrees" 17561msgstr "" 17562 17563#. Tag: programlisting 17564#: reference_raster.xml:9353 17565#, no-c-format 17566msgid "" 17567"WITH foo AS (\n" 17568" SELECT ST_SetValues(\n" 17569" ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, 0, 0), " 17570"1, '32BF', 0, -9999),\n" 17571" 1, 1, 1, ARRAY[\n" 17572" [1, 1, 1, 1, 1],\n" 17573" [1, 2, 2, 2, 1],\n" 17574" [1, 2, 3, 2, 1],\n" 17575" [1, 2, 2, 2, 1],\n" 17576" [1, 1, 1, 1, 1]\n" 17577" ]::double precision[][]\n" 17578" ) AS rast\n" 17579")\n" 17580"SELECT\n" 17581" ST_DumpValues(ST_Aspect(rast, 1, '32BF'))\n" 17582"FROM foo\n" 17583"\n" 17584" st_dumpvalues\n" 17585"\n" 17586"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" 17587"----------------------------------\n" 17588" (1,\"{{315,341.565063476562,0,18.4349479675293,45}," 17589"{288.434936523438,315,0,45,71.5650482177734},{270,270,-1,90,90}," 17590"{251.565048217773,225,180,135,108.434951782227},{225,198.43495178\n" 17591"2227,180,161.565048217773,135}}\")\n" 17592"(1 row)" 17593msgstr "" 17594 17595#. Tag: para 17596#: reference_raster.xml:9359 reference_raster.xml:9456 17597#: reference_raster.xml:9584 17598#, no-c-format 17599msgid "" 17600"Complete example of tiles of a coverage. This query only works with " 17601"PostgreSQL 9.1 or higher." 17602msgstr "" 17603 17604#. Tag: programlisting 17605#: reference_raster.xml:9361 17606#, no-c-format 17607msgid "" 17608"WITH foo AS (\n" 17609" SELECT ST_Tile(\n" 17610" ST_SetValues(\n" 17611" ST_AddBand(\n" 17612" ST_MakeEmptyRaster(6, 6, 0, 0, 1, -1, 0, 0, " 17613"0),\n" 17614" 1, '32BF', 0, -9999\n" 17615" ),\n" 17616" 1, 1, 1, ARRAY[\n" 17617" [1, 1, 1, 1, 1, 1],\n" 17618" [1, 1, 1, 1, 2, 1],\n" 17619" [1, 2, 2, 3, 3, 1],\n" 17620" [1, 1, 3, 2, 1, 1],\n" 17621" [1, 2, 2, 1, 2, 1],\n" 17622" [1, 1, 1, 1, 1, 1]\n" 17623" ]::double precision[]\n" 17624" ),\n" 17625" 2, 2\n" 17626" ) AS rast\n" 17627")\n" 17628"SELECT\n" 17629" t1.rast,\n" 17630" ST_Aspect(ST_Union(t2.rast), 1, t1.rast)\n" 17631"FROM foo t1\n" 17632"CROSS JOIN foo t2\n" 17633"WHERE ST_Intersects(t1.rast, t2.rast)\n" 17634"GROUP BY t1.rast;" 17635msgstr "" 17636 17637#. Tag: para 17638#: reference_raster.xml:9366 17639#, no-c-format 17640msgid "" 17641", <xref linkend=\"RT_ST_TRI\"/>, <xref linkend=\"RT_ST_TPI\"/>, <xref " 17642"linkend=\"RT_ST_Roughness\"/>, <xref linkend=\"RT_ST_HillShade\"/>, <xref " 17643"linkend=\"RT_ST_Slope\"/>" 17644msgstr "" 17645 17646#. Tag: refname 17647#: reference_raster.xml:9379 17648#, no-c-format 17649msgid "ST_HillShade" 17650msgstr "ST_HillShade" 17651 17652#. Tag: refpurpose 17653#: reference_raster.xml:9380 17654#, no-c-format 17655msgid "" 17656"Returns the hypothetical illumination of an elevation raster band using " 17657"provided azimuth, altitude, brightness and scale inputs." 17658msgstr "" 17659 17660#. Tag: funcsynopsis 17661#: reference_raster.xml:9383 17662#, no-c-format 17663msgid "" 17664"<funcprototype> <funcdef>raster <function>ST_HillShade</function></funcdef> " 17665"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 17666"<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 17667"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 17668"<parameter>pixeltype=32BF</parameter></paramdef> <paramdef choice=\"opt" 17669"\"><type>double precision </type> <parameter>azimuth=315</parameter></" 17670"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 17671"<parameter>altitude=45</parameter></paramdef> <paramdef choice=\"opt" 17672"\"><type>double precision </type> <parameter>max_bright=255</parameter></" 17673"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 17674"<parameter>scale=1.0</parameter></paramdef> <paramdef choice=\"opt" 17675"\"><type>boolean </type> <parameter>interpolate_nodata=FALSE</parameter></" 17676"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 17677"<function>ST_HillShade</function></funcdef> <paramdef><type>raster </type> " 17678"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 17679"<parameter>band</parameter></paramdef> <paramdef><type>raster </type> " 17680"<parameter>customextent</parameter></paramdef> <paramdef choice=\"opt" 17681"\"><type>text </type> <parameter>pixeltype=32BF</parameter></paramdef> " 17682"<paramdef choice=\"opt\"><type>double precision </type> " 17683"<parameter>azimuth=315</parameter></paramdef> <paramdef choice=\"opt" 17684"\"><type>double precision </type> <parameter>altitude=45</parameter></" 17685"paramdef> <paramdef choice=\"opt\"><type>double precision </type> " 17686"<parameter>max_bright=255</parameter></paramdef> <paramdef choice=\"opt" 17687"\"><type>double precision </type> <parameter>scale=1.0</parameter></" 17688"paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 17689"<parameter>interpolate_nodata=FALSE</parameter></paramdef> </funcprototype>" 17690msgstr "" 17691 17692#. Tag: para 17693#: reference_raster.xml:9414 17694#, no-c-format 17695msgid "" 17696"Returns the hypothetical illumination of an elevation raster band using the " 17697"azimuth, altitude, brightness, and scale inputs. Utilizes map algebra and " 17698"applies the hill shade equation to neighboring pixels. Return pixel values " 17699"are between 0 and 255." 17700msgstr "" 17701 17702#. Tag: para 17703#: reference_raster.xml:9416 17704#, no-c-format 17705msgid "" 17706"<varname>azimuth</varname> is a value between 0 and 360 degrees measured " 17707"clockwise from North." 17708msgstr "" 17709 17710#. Tag: para 17711#: reference_raster.xml:9420 17712#, no-c-format 17713msgid "" 17714"<varname>altitude</varname> is a value between 0 and 90 degrees where 0 " 17715"degrees is at the horizon and 90 degrees is directly overhead." 17716msgstr "" 17717 17718#. Tag: para 17719#: reference_raster.xml:9424 17720#, no-c-format 17721msgid "" 17722"<varname>max_bright</varname> is a value between 0 and 255 with 0 as no " 17723"brightness and 255 as max brightness." 17724msgstr "" 17725 17726#. Tag: para 17727#: reference_raster.xml:9428 reference_raster.xml:9556 17728#, no-c-format 17729msgid "" 17730"<varname>scale</varname> is the ratio of vertical units to horizontal. For " 17731"Feet:LatLon use scale=370400, for Meters:LatLon use scale=111120." 17732msgstr "" 17733 17734#. Tag: para 17735#: reference_raster.xml:9432 17736#, no-c-format 17737msgid "" 17738"If <varname>interpolate_nodata</varname> is TRUE, values for NODATA pixels " 17739"from the input raster will be interpolated using <xref linkend=" 17740"\"RT_ST_InvDistWeight4ma\"/> before computing the hillshade illumination." 17741msgstr "" 17742 17743#. Tag: para 17744#: reference_raster.xml:9437 17745#, no-c-format 17746msgid "" 17747"For more information about Hillshade, please refer to <ulink url=\"http://" 17748"webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How%20Hillshade" 17749"%20works\">How hillshade works</ulink>." 17750msgstr "" 17751 17752#. Tag: para 17753#: reference_raster.xml:9444 17754#, no-c-format 17755msgid "" 17756"Changed: 2.1.0 In prior versions, azimuth and altitude were expressed in " 17757"radians. Now, azimuth and altitude are expressed in degrees" 17758msgstr "" 17759 17760#. Tag: programlisting 17761#: reference_raster.xml:9450 17762#, no-c-format 17763msgid "" 17764"WITH foo AS (\n" 17765" SELECT ST_SetValues(\n" 17766" ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, 0, 0), " 17767"1, '32BF', 0, -9999),\n" 17768" 1, 1, 1, ARRAY[\n" 17769" [1, 1, 1, 1, 1],\n" 17770" [1, 2, 2, 2, 1],\n" 17771" [1, 2, 3, 2, 1],\n" 17772" [1, 2, 2, 2, 1],\n" 17773" [1, 1, 1, 1, 1]\n" 17774" ]::double precision[][]\n" 17775" ) AS rast\n" 17776")\n" 17777"SELECT\n" 17778" ST_DumpValues(ST_Hillshade(rast, 1, '32BF'))\n" 17779"FROM foo\n" 17780"\n" 17781" st_dumpvalues\n" 17782"\n" 17783"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" 17784"-----------------------------------------------------------------------\n" 17785" (1,\"{{NULL,NULL,NULL,NULL,NULL}," 17786"{NULL,251.32763671875,220.749786376953,147.224319458008,NULL}," 17787"{NULL,220.749786376953,180.312225341797,67.7497863769531,NULL}," 17788"{NULL,147.224319458008\n" 17789",67.7497863769531,43.1210060119629,NULL},{NULL,NULL,NULL,NULL,NULL}}\")\n" 17790"(1 row)" 17791msgstr "" 17792 17793#. Tag: programlisting 17794#: reference_raster.xml:9458 17795#, no-c-format 17796msgid "" 17797"WITH foo AS (\n" 17798" SELECT ST_Tile(\n" 17799" ST_SetValues(\n" 17800" ST_AddBand(\n" 17801" ST_MakeEmptyRaster(6, 6, 0, 0, 1, -1, 0, 0, " 17802"0),\n" 17803" 1, '32BF', 0, -9999\n" 17804" ),\n" 17805" 1, 1, 1, ARRAY[\n" 17806" [1, 1, 1, 1, 1, 1],\n" 17807" [1, 1, 1, 1, 2, 1],\n" 17808" [1, 2, 2, 3, 3, 1],\n" 17809" [1, 1, 3, 2, 1, 1],\n" 17810" [1, 2, 2, 1, 2, 1],\n" 17811" [1, 1, 1, 1, 1, 1]\n" 17812" ]::double precision[]\n" 17813" ),\n" 17814" 2, 2\n" 17815" ) AS rast\n" 17816")\n" 17817"SELECT\n" 17818" t1.rast,\n" 17819" ST_Hillshade(ST_Union(t2.rast), 1, t1.rast)\n" 17820"FROM foo t1\n" 17821"CROSS JOIN foo t2\n" 17822"WHERE ST_Intersects(t1.rast, t2.rast)\n" 17823"GROUP BY t1.rast;" 17824msgstr "" 17825 17826#. Tag: para 17827#: reference_raster.xml:9463 17828#, no-c-format 17829msgid "" 17830", <xref linkend=\"RT_ST_TRI\"/>, <xref linkend=\"RT_ST_TPI\"/>, <xref " 17831"linkend=\"RT_ST_Roughness\"/>, <xref linkend=\"RT_ST_Aspect\"/>, <xref " 17832"linkend=\"RT_ST_Slope\"/>" 17833msgstr "" 17834 17835#. Tag: refname 17836#: reference_raster.xml:9476 17837#, no-c-format 17838msgid "ST_Roughness" 17839msgstr "" 17840 17841#. Tag: refpurpose 17842#: reference_raster.xml:9477 17843#, no-c-format 17844msgid "Returns a raster with the calculated \"roughness\" of a DEM." 17845msgstr "" 17846 17847#. Tag: funcprototype 17848#: reference_raster.xml:9482 17849#, no-c-format 17850msgid "" 17851"<funcdef>raster <function>ST_Roughness</function></funcdef> " 17852"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 17853"<paramdef><type>integer </type> <parameter>nband</parameter></paramdef> " 17854"<paramdef><type>raster </type> <parameter>customextent</parameter></" 17855"paramdef> <paramdef choice=\"opt\"><type>text </type> <parameter>pixeltype=" 17856"\"32BF\"</parameter> </paramdef> <paramdef choice=\"opt\"><type>boolean </" 17857"type> <parameter> interpolate_nodata=FALSE </parameter> </paramdef>" 17858msgstr "" 17859 17860#. Tag: para 17861#: reference_raster.xml:9495 17862#, no-c-format 17863msgid "" 17864"Calculates the \"roughness\" of a DEM, by subtracting the maximum from the " 17865"minimum for a given area." 17866msgstr "" 17867 17868#. Tag: programlisting 17869#: reference_raster.xml:9501 reference_raster.xml:9634 17870#: reference_raster.xml:9685 17871#, no-c-format 17872msgid "-- needs examples" 17873msgstr "" 17874 17875#. Tag: para 17876#: reference_raster.xml:9506 17877#, no-c-format 17878msgid "" 17879", <xref linkend=\"RT_ST_TRI\"/>, <xref linkend=\"RT_ST_TPI\"/>, <xref " 17880"linkend=\"RT_ST_Slope\"/>, <xref linkend=\"RT_ST_HillShade\"/>, <xref " 17881"linkend=\"RT_ST_Aspect\"/>" 17882msgstr "" 17883 17884#. Tag: refname 17885#: reference_raster.xml:9519 17886#, no-c-format 17887msgid "ST_Slope" 17888msgstr "ST_Slope" 17889 17890#. Tag: refpurpose 17891#: reference_raster.xml:9520 17892#, no-c-format 17893msgid "" 17894"Returns the slope (in degrees by default) of an elevation raster band. " 17895"Useful for analyzing terrain." 17896msgstr "" 17897 17898#. Tag: funcsynopsis 17899#: reference_raster.xml:9523 17900#, no-c-format 17901msgid "" 17902"<funcprototype> <funcdef>raster <function>ST_Slope</function></funcdef> " 17903"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 17904"<paramdef choice=\"opt\"><type>integer </type> <parameter>nband=1</" 17905"parameter></paramdef> <paramdef choice=\"opt\"><type>text </type> " 17906"<parameter>pixeltype=32BF</parameter></paramdef> <paramdef choice=\"opt" 17907"\"><type>text </type> <parameter>units=DEGREES</parameter></paramdef> " 17908"<paramdef choice=\"opt\"><type>double precision </type> " 17909"<parameter>scale=1.0</parameter></paramdef> <paramdef choice=\"opt" 17910"\"><type>boolean </type> <parameter>interpolate_nodata=FALSE</parameter></" 17911"paramdef> </funcprototype> <funcprototype> <funcdef>raster " 17912"<function>ST_Slope</function></funcdef> <paramdef><type>raster </type> " 17913"<parameter>rast</parameter></paramdef> <paramdef><type>integer </type> " 17914"<parameter>nband</parameter></paramdef> <paramdef><type>raster </type> " 17915"<parameter>customextent</parameter></paramdef> <paramdef choice=\"opt" 17916"\"><type>text </type> <parameter>pixeltype=32BF</parameter></paramdef> " 17917"<paramdef choice=\"opt\"><type>text </type> <parameter>units=DEGREES</" 17918"parameter></paramdef> <paramdef choice=\"opt\"><type>double precision </" 17919"type> <parameter>scale=1.0</parameter></paramdef> <paramdef choice=\"opt" 17920"\"><type>boolean </type> <parameter>interpolate_nodata=FALSE</parameter></" 17921"paramdef> </funcprototype>" 17922msgstr "" 17923 17924#. Tag: para 17925#: reference_raster.xml:9550 17926#, no-c-format 17927msgid "" 17928"Returns the slope (in degrees by default) of an elevation raster band. " 17929"Utilizes map algebra and applies the slope equation to neighboring pixels." 17930msgstr "" 17931 17932#. Tag: para 17933#: reference_raster.xml:9552 17934#, no-c-format 17935msgid "" 17936"<varname>units</varname> indicates the units of the slope. Possible values " 17937"are: RADIANS, DEGREES (default), PERCENT." 17938msgstr "" 17939 17940#. Tag: para 17941#: reference_raster.xml:9560 17942#, no-c-format 17943msgid "" 17944"If <varname>interpolate_nodata</varname> is TRUE, values for NODATA pixels " 17945"from the input raster will be interpolated using <xref linkend=" 17946"\"RT_ST_InvDistWeight4ma\"/> before computing the surface slope." 17947msgstr "" 17948 17949#. Tag: para 17950#: reference_raster.xml:9565 17951#, no-c-format 17952msgid "" 17953"For more information about Slope, Aspect and Hillshade, please refer to " 17954"<ulink url=\"http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?" 17955"TopicName=How%20Hillshade%20works\">ESRI - How hillshade works</ulink> and " 17956"<ulink url=\"http://e2b.erdas.com/fieldguide/wwhelp/wwhimpl/common/html/" 17957"wwhelp.htm?context=FieldGuide&file=Slope_Images.html\">ERDAS Field Guide " 17958"- Slope Images</ulink>." 17959msgstr "" 17960 17961#. Tag: para 17962#: reference_raster.xml:9571 17963#, no-c-format 17964msgid "" 17965"Enhanced: 2.1.0 Uses ST_MapAlgebra() and added optional <varname>units</" 17966"varname>, <varname>scale</varname>, <varname>interpolate_nodata</varname> " 17967"function parameters" 17968msgstr "" 17969 17970#. Tag: programlisting 17971#: reference_raster.xml:9578 17972#, no-c-format 17973msgid "" 17974"WITH foo AS (\n" 17975" SELECT ST_SetValues(\n" 17976" ST_AddBand(ST_MakeEmptyRaster(5, 5, 0, 0, 1, -1, 0, 0, 0), " 17977"1, '32BF', 0, -9999),\n" 17978" 1, 1, 1, ARRAY[\n" 17979" [1, 1, 1, 1, 1],\n" 17980" [1, 2, 2, 2, 1],\n" 17981" [1, 2, 3, 2, 1],\n" 17982" [1, 2, 2, 2, 1],\n" 17983" [1, 1, 1, 1, 1]\n" 17984" ]::double precision[][]\n" 17985" ) AS rast\n" 17986")\n" 17987"SELECT\n" 17988" ST_DumpValues(ST_Slope(rast, 1, '32BF'))\n" 17989"FROM foo\n" 17990"\n" 17991" st_dumpvalues\n" 17992"\n" 17993"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" 17994"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n" 17995"---------------------------------------------------------------------\n" 17996" (1," 17997"\"{{10.0249881744385,21.5681285858154,26.5650520324707,21.5681285858154,10.0249881744385}," 17998"{21.5681285858154,35.2643890380859,36.8698959350586,35.2643890380859,21.5681285858154},\n" 17999"{26.5650520324707,36.8698959350586,0,36.8698959350586,26.5650520324707}," 18000"{21.5681285858154,35.2643890380859,36.8698959350586,35.2643890380859,21.5681285858154}," 18001"{10.0249881744385,21.\n" 18002"5681285858154,26.5650520324707,21.5681285858154,10.0249881744385}}\")\n" 18003"(1 row)" 18004msgstr "" 18005 18006#. Tag: programlisting 18007#: reference_raster.xml:9586 18008#, no-c-format 18009msgid "" 18010"WITH foo AS (\n" 18011" SELECT ST_Tile(\n" 18012" ST_SetValues(\n" 18013" ST_AddBand(\n" 18014" ST_MakeEmptyRaster(6, 6, 0, 0, 1, -1, 0, 0, " 18015"0),\n" 18016" 1, '32BF', 0, -9999\n" 18017" ),\n" 18018" 1, 1, 1, ARRAY[\n" 18019" [1, 1, 1, 1, 1, 1],\n" 18020" [1, 1, 1, 1, 2, 1],\n" 18021" [1, 2, 2, 3, 3, 1],\n" 18022" [1, 1, 3, 2, 1, 1],\n" 18023" [1, 2, 2, 1, 2, 1],\n" 18024" [1, 1, 1, 1, 1, 1]\n" 18025" ]::double precision[]\n" 18026" ),\n" 18027" 2, 2\n" 18028" ) AS rast\n" 18029")\n" 18030"SELECT\n" 18031" t1.rast,\n" 18032" ST_Slope(ST_Union(t2.rast), 1, t1.rast)\n" 18033"FROM foo t1\n" 18034"CROSS JOIN foo t2\n" 18035"WHERE ST_Intersects(t1.rast, t2.rast)\n" 18036"GROUP BY t1.rast;" 18037msgstr "" 18038 18039#. Tag: para 18040#: reference_raster.xml:9591 18041#, no-c-format 18042msgid "" 18043", <xref linkend=\"RT_ST_TRI\"/>, <xref linkend=\"RT_ST_TPI\"/>, <xref " 18044"linkend=\"RT_ST_Roughness\"/>, <xref linkend=\"RT_ST_HillShade\"/>, <xref " 18045"linkend=\"RT_ST_Aspect\"/>" 18046msgstr "" 18047 18048#. Tag: refname 18049#: reference_raster.xml:9604 18050#, no-c-format 18051msgid "ST_TPI" 18052msgstr "" 18053 18054#. Tag: refpurpose 18055#: reference_raster.xml:9605 18056#, no-c-format 18057msgid "Returns a raster with the calculated Topographic Position Index." 18058msgstr "" 18059 18060#. Tag: funcprototype 18061#: reference_raster.xml:9610 18062#, no-c-format 18063msgid "" 18064"<funcdef>raster <function>ST_TPI</function></funcdef> <paramdef><type>raster " 18065"</type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </" 18066"type> <parameter>nband</parameter></paramdef> <paramdef><type>raster </type> " 18067"<parameter>customextent</parameter></paramdef> <paramdef choice=\"opt" 18068"\"><type>text </type> <parameter>pixeltype=\"32BF\"</parameter> </paramdef> " 18069"<paramdef choice=\"opt\"><type>boolean </type> <parameter> " 18070"interpolate_nodata=FALSE </parameter> </paramdef>" 18071msgstr "" 18072 18073#. Tag: para 18074#: reference_raster.xml:9624 18075#, no-c-format 18076msgid "" 18077"Calculates the Topographic Position Index, which is defined as the focal " 18078"mean with radius of one minus the center cell." 18079msgstr "" 18080 18081#. Tag: para 18082#: reference_raster.xml:9627 reference_raster.xml:9677 18083#, no-c-format 18084msgid "This function only supports a focalmean radius of one." 18085msgstr "" 18086 18087#. Tag: para 18088#: reference_raster.xml:9639 18089#, no-c-format 18090msgid "" 18091", <xref linkend=\"RT_ST_TRI\"/>, <xref linkend=\"RT_ST_Roughness\"/>, <xref " 18092"linkend=\"RT_ST_Slope\"/>, <xref linkend=\"RT_ST_HillShade\"/>, <xref " 18093"linkend=\"RT_ST_Aspect\"/>" 18094msgstr "" 18095 18096#. Tag: refname 18097#: reference_raster.xml:9652 18098#, no-c-format 18099msgid "ST_TRI" 18100msgstr "" 18101 18102#. Tag: refpurpose 18103#: reference_raster.xml:9653 18104#, no-c-format 18105msgid "Returns a raster with the calculated Terrain Ruggedness Index." 18106msgstr "" 18107 18108#. Tag: funcprototype 18109#: reference_raster.xml:9658 18110#, no-c-format 18111msgid "" 18112"<funcdef>raster <function>ST_TRI</function></funcdef> <paramdef><type>raster " 18113"</type> <parameter>rast</parameter></paramdef> <paramdef><type>integer </" 18114"type> <parameter>nband</parameter></paramdef> <paramdef><type>raster </type> " 18115"<parameter>customextent</parameter></paramdef> <paramdef choice=\"opt" 18116"\"><type>text </type> <parameter>pixeltype=\"32BF\"</parameter> </paramdef> " 18117"<paramdef choice=\"opt\"><type>boolean </type> <parameter> " 18118"interpolate_nodata=FALSE </parameter> </paramdef>" 18119msgstr "" 18120 18121#. Tag: para 18122#: reference_raster.xml:9672 18123#, no-c-format 18124msgid "" 18125"Terrain Ruggedness Index is calculated by comparing a central pixel with its " 18126"neighbors, taking the absolute values of the differences, and averaging the " 18127"result." 18128msgstr "" 18129 18130#. Tag: para 18131#: reference_raster.xml:9690 18132#, no-c-format 18133msgid "" 18134", <xref linkend=\"RT_ST_Roughness\"/>, <xref linkend=\"RT_ST_TPI\"/>, <xref " 18135"linkend=\"RT_ST_Slope\"/>, <xref linkend=\"RT_ST_HillShade\"/>, <xref " 18136"linkend=\"RT_ST_Aspect\"/>" 18137msgstr "" 18138 18139#. Tag: title 18140#: reference_raster.xml:9704 18141#, no-c-format 18142msgid "Raster to Geometry" 18143msgstr "" 18144 18145#. Tag: refname 18146#: reference_raster.xml:9708 18147#, no-c-format 18148msgid "Box3D" 18149msgstr "Box3D" 18150 18151#. Tag: refpurpose 18152#: reference_raster.xml:9709 18153#, no-c-format 18154msgid "Returns the box 3d representation of the enclosing box of the raster." 18155msgstr "" 18156 18157#. Tag: funcprototype 18158#: reference_raster.xml:9714 18159#, no-c-format 18160msgid "" 18161"<funcdef>box3d <function>Box3D</function></funcdef> <paramdef><type>raster </" 18162"type> <parameter>rast</parameter></paramdef>" 18163msgstr "" 18164"<funcdef>box3d <function>Box3D</function></funcdef> <paramdef><type>raster </" 18165"type> <parameter>rast</parameter></paramdef>" 18166 18167#. Tag: para 18168#: reference_raster.xml:9724 18169#, no-c-format 18170msgid "Returns the box representing the extent of the raster." 18171msgstr "" 18172 18173#. Tag: para 18174#: reference_raster.xml:9725 18175#, no-c-format 18176msgid "" 18177"The polygon is defined by the corner points of the bounding box " 18178"((<varname>MINX</varname>, <varname>MINY</varname>), (<varname>MAXX</" 18179"varname>, <varname>MAXY</varname>))" 18180msgstr "" 18181 18182#. Tag: para 18183#: reference_raster.xml:9729 18184#, no-c-format 18185msgid "" 18186"Changed: 2.0.0 In pre-2.0 versions, there used to be a box2d instead of " 18187"box3d. Since box2d is a deprecated type, this was changed to box3d." 18188msgstr "" 18189 18190#. Tag: programlisting 18191#: reference_raster.xml:9735 18192#, no-c-format 18193msgid "" 18194"SELECT\n" 18195" rid,\n" 18196" Box3D(rast) AS rastbox\n" 18197"FROM dummy_rast;\n" 18198"\n" 18199"rid | rastbox\n" 18200"----+-------------------------------------------------\n" 18201"1 | BOX3D(0.5 0.5 0,20.5 60.5 0)\n" 18202"2 | BOX3D(3427927.75 5793243.5 0,3427928 5793244 0)" 18203msgstr "" 18204 18205#. Tag: refname 18206#: reference_raster.xml:9748 18207#, no-c-format 18208msgid "ST_ConvexHull" 18209msgstr "ST_ConvexHull" 18210 18211#. Tag: refpurpose 18212#: reference_raster.xml:9749 18213#, no-c-format 18214msgid "" 18215"Return the convex hull geometry of the raster including pixel values equal " 18216"to BandNoDataValue. For regular shaped and non-skewed rasters, this gives " 18217"the same result as ST_Envelope so only useful for irregularly shaped or " 18218"skewed rasters." 18219msgstr "" 18220 18221#. Tag: funcprototype 18222#: reference_raster.xml:9756 18223#, no-c-format 18224msgid "" 18225"<funcdef>geometry <function>ST_ConvexHull</function></funcdef> " 18226"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 18227msgstr "" 18228"<funcdef>geometry <function>ST_ConvexHull</function></funcdef> " 18229"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 18230 18231#. Tag: para 18232#: reference_raster.xml:9766 18233#, no-c-format 18234msgid "" 18235"Return the convex hull geometry of the raster including the NoDataBandValue " 18236"band pixels. For regular shaped and non-skewed rasters, this gives more or " 18237"less the same result as ST_Envelope so only useful for irregularly shaped or " 18238"skewed rasters." 18239msgstr "" 18240 18241#. Tag: para 18242#: reference_raster.xml:9770 18243#, no-c-format 18244msgid "" 18245"ST_Envelope floors the coordinates and hence add a little buffer around the " 18246"raster so the answer is subtly different from ST_ConvexHull which does not " 18247"floor." 18248msgstr "" 18249 18250#. Tag: para 18251#: reference_raster.xml:9777 18252#, no-c-format 18253msgid "" 18254"Refer to <ulink url=\"http://trac.osgeo.org/postgis/wiki/WKTRaster/" 18255"SpecificationWorking01\">PostGIS Raster Specification</ulink> for a diagram " 18256"of this." 18257msgstr "" 18258 18259#. Tag: programlisting 18260#: reference_raster.xml:9778 18261#, fuzzy, no-c-format 18262msgid "" 18263"-- Note envelope and convexhull are more or less the same\n" 18264"SELECT ST_AsText(ST_ConvexHull(rast)) As convhull,\n" 18265" ST_AsText(ST_Envelope(rast)) As env\n" 18266"FROM dummy_rast WHERE rid=1;\n" 18267"\n" 18268" convhull | " 18269"env\n" 18270"--------------------------------------------------------" 18271"+------------------------------------\n" 18272" POLYGON((0.5 0.5,20.5 0.5,20.5 60.5,0.5 60.5,0.5 0.5)) | POLYGON((0 0,20 " 18273"0,20 60,0 60,0 0))" 18274msgstr "" 18275"SELECT rid, ST_AsText(ST_Envelope(rast)) As envgeomwkt\n" 18276"FROM dummy_rast;\n" 18277"\n" 18278" rid | envgeomwkt\n" 18279"-----+--------------------------------------------------------------------\n" 18280" 1 | POLYGON((0 0,20 0,20 60,0 60,0 0))\n" 18281" 2 | POLYGON((3427927 5793243,3427928 5793243,\n" 18282" 3427928 5793244,3427927 5793244, 3427927 5793243))" 18283 18284#. Tag: programlisting 18285#: reference_raster.xml:9779 18286#, no-c-format 18287msgid "" 18288"-- now we skew the raster\n" 18289"-- note how the convex hull and envelope are now different\n" 18290"SELECT ST_AsText(ST_ConvexHull(rast)) As convhull,\n" 18291" ST_AsText(ST_Envelope(rast)) As env\n" 18292"FROM (SELECT ST_SetRotation(rast, 0.1, 0.1) As rast\n" 18293" FROM dummy_rast WHERE rid=1) As foo;\n" 18294"\n" 18295" convhull | " 18296"env\n" 18297"--------------------------------------------------------" 18298"+------------------------------------\n" 18299" POLYGON((0.5 0.5,20.5 1.5,22.5 61.5,2.5 60.5,0.5 0.5)) | POLYGON((0 0,22 " 18300"0,22 61,0 61,0 0))" 18301msgstr "" 18302 18303#. Tag: para 18304#: reference_raster.xml:9785 18305#, no-c-format 18306msgid "" 18307", <xref linkend=\"RT_ST_MinConvexHull\"/>, <xref linkend=\"ST_ConvexHull\"/" 18308">, <xref linkend=\"ST_AsText\"/>" 18309msgstr "" 18310 18311#. Tag: refname 18312#: reference_raster.xml:9796 18313#, no-c-format 18314msgid "ST_DumpAsPolygons" 18315msgstr "ST_DumpAsPolygons" 18316 18317#. Tag: refpurpose 18318#: reference_raster.xml:9797 18319#, no-c-format 18320msgid "" 18321"Returns a set of geomval (geom,val) rows, from a given raster band. If no " 18322"band number is specified, band num defaults to 1." 18323msgstr "" 18324 18325#. Tag: funcprototype 18326#: reference_raster.xml:9802 18327#, no-c-format 18328msgid "" 18329"<funcdef>setof geomval <function>ST_DumpAsPolygons</function></funcdef> " 18330"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 18331"<paramdef choice=\"opt\"><type>integer </type> <parameter>band_num=1</" 18332"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 18333"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 18334msgstr "" 18335"<funcdef>setof geomval <function>ST_DumpAsPolygons</function></funcdef> " 18336"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 18337"<paramdef choice=\"opt\"><type>integer </type> <parameter>band_num=1</" 18338"parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 18339"<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 18340 18341#. Tag: para 18342#: reference_raster.xml:9813 18343#, no-c-format 18344msgid "" 18345"This is a set-returning function (SRF). It returns a set of geomval rows, " 18346"formed by a geometry (geom) and a pixel band value (val). Each polygon is " 18347"the union of all pixels for that band that have the same pixel value denoted " 18348"by val." 18349msgstr "" 18350 18351#. Tag: para 18352#: reference_raster.xml:9817 18353#, no-c-format 18354msgid "" 18355"ST_DumpAsPolygon is useful for polygonizing rasters. It is the reverse of a " 18356"GROUP BY in that it creates new rows. For example it can be used to expand a " 18357"single raster into multiple POLYGONS/MULTIPOLYGONS." 18358msgstr "" 18359 18360#. Tag: para 18361#: reference_raster.xml:9821 18362#, no-c-format 18363msgid "Availability: Requires GDAL 1.7 or higher." 18364msgstr "" 18365 18366#. Tag: para 18367#: reference_raster.xml:9822 18368#, no-c-format 18369msgid "" 18370"If there is a no data value set for a band, pixels with that value will not " 18371"be returned except in the case of exclude_nodata_value=false." 18372msgstr "" 18373 18374#. Tag: para 18375#: reference_raster.xml:9823 18376#, no-c-format 18377msgid "" 18378"If you only care about count of pixels with a given value in a raster, it is " 18379"faster to use <xref linkend=\"RT_ST_ValueCount\"/>." 18380msgstr "" 18381 18382#. Tag: para 18383#: reference_raster.xml:9825 18384#, no-c-format 18385msgid "" 18386"This is different than ST_PixelAsPolygons where one geometry is returned for " 18387"each pixel regardless of pixel value." 18388msgstr "" 18389 18390#. Tag: programlisting 18391#: reference_raster.xml:9833 18392#, fuzzy, no-c-format 18393msgid "" 18394"-- this syntax requires PostgreSQL 9.3+\n" 18395"SELECT val, ST_AsText(geom) As geomwkt\n" 18396"FROM (\n" 18397"SELECT dp.*\n" 18398"FROM dummy_rast, LATERAL ST_DumpAsPolygons(rast) AS dp\n" 18399"WHERE rid = 2\n" 18400") As foo\n" 18401"WHERE val BETWEEN 249 and 251\n" 18402"ORDER BY val;\n" 18403"\n" 18404" val | geomwkt\n" 18405"-----" 18406"+--------------------------------------------------------------------------\n" 18407" 249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 " 18408"5793243.85,\n" 18409" 3427928 5793243.95,3427927.95 5793243.95))\n" 18410" 250 | POLYGON((3427927.75 5793243.9,3427927.75 5793243.85,3427927.8 " 18411"5793243.85,\n" 18412" 3427927.8 5793243.9,3427927.75 5793243.9))\n" 18413" 250 | POLYGON((3427927.8 5793243.8,3427927.8 5793243.75,3427927.85 " 18414"5793243.75,\n" 18415" 3427927.85 5793243.8, 3427927.8 5793243.8))\n" 18416" 251 | POLYGON((3427927.75 5793243.85,3427927.75 5793243.8,3427927.8 " 18417"5793243.8,\n" 18418" 3427927.8 5793243.85,3427927.75 5793243.85))" 18419msgstr "" 18420"SELECT val, ST_AsText(geom) As geomwkt\n" 18421"FROM (\n" 18422"SELECT (ST_DumpAsPolygons(rast)).*\n" 18423"FROM dummy_rast \n" 18424"WHERE rid = 2\n" 18425") As foo\n" 18426"WHERE val BETWEEN 249 and 251\n" 18427"ORDER BY val;\n" 18428"\n" 18429" val | geomwkt\n" 18430"-----" 18431"+--------------------------------------------------------------------------\n" 18432" 249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 " 18433"5793243.85,\n" 18434" 3427928 5793243.95,3427927.95 5793243.95))\n" 18435" 250 | POLYGON((3427927.75 5793243.9,3427927.75 5793243.85,3427927.8 " 18436"5793243.85,\n" 18437" 3427927.8 5793243.9,3427927.75 5793243.9))\n" 18438" 250 | POLYGON((3427927.8 5793243.8,3427927.8 5793243.75,3427927.85 " 18439"5793243.75,\n" 18440" 3427927.85 5793243.8, 3427927.8 5793243.8))\n" 18441" 251 | POLYGON((3427927.75 5793243.85,3427927.75 5793243.8,3427927.8 " 18442"5793243.8,\n" 18443" 3427927.8 5793243.85,3427927.75 5793243.85))" 18444 18445#. Tag: para 18446#: reference_raster.xml:9838 18447#, no-c-format 18448msgid "" 18449", <xref linkend=\"RT_ST_Value\"/>, <xref linkend=\"RT_ST_Polygon\"/>, <xref " 18450"linkend=\"RT_ST_ValueCount\"/>" 18451msgstr "" 18452", <xref linkend=\"RT_ST_Value\"/>, <xref linkend=\"RT_ST_Polygon\"/>, <xref " 18453"linkend=\"RT_ST_ValueCount\"/>" 18454 18455#. Tag: refname 18456#: reference_raster.xml:9849 18457#, no-c-format 18458msgid "ST_Envelope" 18459msgstr "ST_Envelope" 18460 18461#. Tag: refpurpose 18462#: reference_raster.xml:9850 18463#, no-c-format 18464msgid "Returns the polygon representation of the extent of the raster." 18465msgstr "" 18466 18467#. Tag: funcprototype 18468#: reference_raster.xml:9855 18469#, no-c-format 18470msgid "" 18471"<funcdef>geometry <function>ST_Envelope</function></funcdef> " 18472"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 18473msgstr "" 18474"<funcdef>geometry <function>ST_Envelope</function></funcdef> " 18475"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef>" 18476 18477#. Tag: para 18478#: reference_raster.xml:9865 18479#, no-c-format 18480msgid "" 18481"Returns the polygon representation of the extent of the raster in spatial " 18482"coordinate units defined by srid. It is a float8 minimum bounding box " 18483"represented as a polygon." 18484msgstr "" 18485 18486#. Tag: para 18487#: reference_raster.xml:9867 18488#, no-c-format 18489msgid "" 18490"The polygon is defined by the corner points of the bounding box " 18491"((<varname>MINX</varname>, <varname>MINY</varname>), (<varname>MINX</" 18492"varname>, <varname>MAXY</varname>), (<varname>MAXX</varname>, <varname>MAXY</" 18493"varname>), (<varname>MAXX</varname>, <varname>MINY</varname>), " 18494"(<varname>MINX</varname>, <varname>MINY</varname>))" 18495msgstr "" 18496 18497#. Tag: programlisting 18498#: reference_raster.xml:9879 18499#, fuzzy, no-c-format 18500msgid "" 18501"SELECT rid, ST_AsText(ST_Envelope(rast)) As envgeomwkt\n" 18502"FROM dummy_rast;\n" 18503"\n" 18504" rid | envgeomwkt\n" 18505"-----+--------------------------------------------------------------------\n" 18506" 1 | POLYGON((0 0,20 0,20 60,0 60,0 0))\n" 18507" 2 | POLYGON((3427927 5793243,3427928 5793243,\n" 18508" 3427928 5793244,3427927 5793244, 3427927 5793243))" 18509msgstr "" 18510"SELECT rid, ST_AsText(ST_Envelope(rast)) As envgeomwkt\n" 18511"FROM dummy_rast;\n" 18512"\n" 18513" rid | envgeomwkt\n" 18514"-----+--------------------------------------------------------------------\n" 18515" 1 | POLYGON((0 0,20 0,20 60,0 60,0 0))\n" 18516" 2 | POLYGON((3427927 5793243,3427928 5793243,\n" 18517" 3427928 5793244,3427927 5793244, 3427927 5793243))" 18518 18519#. Tag: para 18520#: reference_raster.xml:9884 18521#, no-c-format 18522msgid ", <xref linkend=\"ST_AsText\"/>, <xref linkend=\"RT_ST_SRID\"/>" 18523msgstr ", <xref linkend=\"ST_AsText\"/>, <xref linkend=\"RT_ST_SRID\"/>" 18524 18525#. Tag: refname 18526#: reference_raster.xml:9894 18527#, no-c-format 18528msgid "ST_MinConvexHull" 18529msgstr "" 18530 18531#. Tag: refpurpose 18532#: reference_raster.xml:9895 18533#, no-c-format 18534msgid "Return the convex hull geometry of the raster excluding NODATA pixels." 18535msgstr "" 18536 18537#. Tag: funcprototype 18538#: reference_raster.xml:9902 18539#, no-c-format 18540msgid "" 18541"<funcdef>geometry <function>ST_MinConvexHull</function></funcdef> " 18542"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 18543"<paramdef choice=\"opt\"><type>integer </type> <parameter>nband=NULL</" 18544"parameter></paramdef>" 18545msgstr "" 18546 18547#. Tag: para 18548#: reference_raster.xml:9913 18549#, no-c-format 18550msgid "" 18551"Return the convex hull geometry of the raster excluding NODATA pixels. If " 18552"<varname>nband</varname> is NULL, all bands of the raster are considered." 18553msgstr "" 18554 18555#. Tag: programlisting 18556#: reference_raster.xml:9922 18557#, no-c-format 18558msgid "" 18559"WITH foo AS (\n" 18560" SELECT\n" 18561" ST_SetValues(\n" 18562" ST_SetValues(\n" 18563" ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(9, " 18564"9, 0, 0, 1, -1, 0, 0, 0), 1, '8BUI', 0, 0), 2, '8BUI', 1, 0),\n" 18565" 1, 1, 1,\n" 18566" ARRAY[\n" 18567" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18568" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18569" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18570" [0, 0, 0, 1, 0, 0, 0, 0, 1],\n" 18571" [0, 0, 0, 1, 1, 0, 0, 0, 0],\n" 18572" [0, 0, 0, 1, 0, 0, 0, 0, 0],\n" 18573" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18574" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18575" [0, 0, 0, 0, 0, 0, 0, 0, 0]\n" 18576" ]::double precision[][]\n" 18577" ),\n" 18578" 2, 1, 1,\n" 18579" ARRAY[\n" 18580" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18581" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18582" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18583" [1, 0, 0, 0, 0, 1, 0, 0, 0],\n" 18584" [0, 0, 0, 0, 1, 1, 0, 0, 0],\n" 18585" [0, 0, 0, 0, 0, 1, 0, 0, 0],\n" 18586" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18587" [0, 0, 0, 0, 0, 0, 0, 0, 0],\n" 18588" [0, 0, 1, 0, 0, 0, 0, 0, 0]\n" 18589" ]::double precision[][]\n" 18590" ) AS rast\n" 18591")\n" 18592"SELECT\n" 18593" ST_AsText(ST_ConvexHull(rast)) AS hull,\n" 18594" ST_AsText(ST_MinConvexHull(rast)) AS mhull,\n" 18595" ST_AsText(ST_MinConvexHull(rast, 1)) AS mhull_1,\n" 18596" ST_AsText(ST_MinConvexHull(rast, 2)) AS mhull_2\n" 18597"FROM foo\n" 18598"\n" 18599" hull | mhull " 18600"| mhull_1 | mhull_2\n" 18601"----------------------------------+-------------------------------------" 18602"+-------------------------------------" 18603"+-------------------------------------\n" 18604" POLYGON((0 0,9 0,9 -9,0 -9,0 0)) | POLYGON((0 -3,9 -3,9 -9,0 -9,0 -3)) | " 18605"POLYGON((3 -3,9 -3,9 -6,3 -6,3 -3)) | POLYGON((0 -3,6 -3,6 -9,0 -9,0 -3))" 18606msgstr "" 18607 18608#. Tag: para 18609#: reference_raster.xml:9927 18610#, no-c-format 18611msgid "" 18612", <xref linkend=\"RT_ST_ConvexHull\"/>, <xref linkend=\"ST_ConvexHull\"/>, " 18613"<xref linkend=\"ST_AsText\"/>" 18614msgstr "" 18615 18616#. Tag: refname 18617#: reference_raster.xml:9938 18618#, no-c-format 18619msgid "ST_Polygon" 18620msgstr "ST_Polygon" 18621 18622#. Tag: refpurpose 18623#: reference_raster.xml:9939 18624#, no-c-format 18625msgid "" 18626"Returns a multipolygon geometry formed by the union of pixels that have a " 18627"pixel value that is not no data value. If no band number is specified, band " 18628"num defaults to 1." 18629msgstr "" 18630 18631#. Tag: funcprototype 18632#: reference_raster.xml:9944 18633#, no-c-format 18634msgid "" 18635"<funcdef>geometry <function>ST_Polygon</function></funcdef> " 18636"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 18637"<paramdef choice=\"opt\"><type>integer </type> <parameter>band_num=1</" 18638"parameter></paramdef>" 18639msgstr "" 18640"<funcdef>geometry <function>ST_Polygon</function></funcdef> " 18641"<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 18642"<paramdef choice=\"opt\"><type>integer </type> <parameter>band_num=1</" 18643"parameter></paramdef>" 18644 18645#. Tag: para 18646#: reference_raster.xml:9954 18647#, no-c-format 18648msgid "Availability: 0.1.6 Requires GDAL 1.7 or higher." 18649msgstr "" 18650 18651#. Tag: para 18652#: reference_raster.xml:9955 18653#, no-c-format 18654msgid "" 18655"Enhanced: 2.1.0 Improved Speed (fully C-Based) and the returning " 18656"multipolygon is ensured to be valid." 18657msgstr "" 18658 18659#. Tag: para 18660#: reference_raster.xml:9956 18661#, no-c-format 18662msgid "" 18663"Changed: 2.1.0 In prior versions would sometimes return a polygon, changed " 18664"to always return multipolygon." 18665msgstr "" 18666 18667#. Tag: programlisting 18668#: reference_raster.xml:9961 18669#, no-c-format 18670msgid "" 18671"-- by default no data band value is 0 or not set, so polygon will return a " 18672"square polygon\n" 18673"SELECT ST_AsText(ST_Polygon(rast)) As geomwkt\n" 18674"FROM dummy_rast\n" 18675"WHERE rid = 2;\n" 18676"\n" 18677"geomwkt\n" 18678"--------------------------------------------\n" 18679"MULTIPOLYGON(((3427927.75 5793244,3427928 5793244,3427928 " 18680"5793243.75,3427927.75 5793243.75,3427927.75 5793244)))\n" 18681"\n" 18682"\n" 18683"-- now we change the no data value of first band\n" 18684"UPDATE dummy_rast SET rast = ST_SetBandNoDataValue(rast,1,254)\n" 18685"WHERE rid = 2;\n" 18686"SELECt rid, ST_BandNoDataValue(rast)\n" 18687"from dummy_rast where rid = 2;\n" 18688"\n" 18689"-- ST_Polygon excludes the pixel value 254 and returns a multipolygon\n" 18690"SELECT ST_AsText(ST_Polygon(rast)) As geomwkt\n" 18691"FROM dummy_rast\n" 18692"WHERE rid = 2;\n" 18693"\n" 18694"geomwkt\n" 18695"---------------------------------------------------------\n" 18696"MULTIPOLYGON(((3427927.9 5793243.95,3427927.85 5793243.95,3427927.85 " 18697"5793244,3427927.9 5793244,3427927.9 5793243.95)),((3427928 " 18698"5793243.85,3427928 5793243.8,3427927.95 5793243.8,3427927.95 " 18699"5793243.85,3427927.9 5793243.85,3427927.9 5793243.9,3427927.9 " 18700"5793243.95,3427927.95 5793243.95,3427928 5793243.95,3427928 5793243.85))," 18701"((3427927.8 5793243.75,3427927.75 5793243.75,3427927.75 5793243.8,3427927.75 " 18702"5793243.85,3427927.75 5793243.9,3427927.75 5793244,3427927.8 " 18703"5793244,3427927.8 5793243.9,3427927.8 5793243.85,3427927.85 " 18704"5793243.85,3427927.85 5793243.8,3427927.85 5793243.75,3427927.8 " 18705"5793243.75)))\n" 18706"\n" 18707"-- Or if you want the no data value different for just one time\n" 18708"\n" 18709"SELECT ST_AsText(\n" 18710" ST_Polygon(\n" 18711" ST_SetBandNoDataValue(rast,1,252)\n" 18712" )\n" 18713" ) As geomwkt\n" 18714"FROM dummy_rast\n" 18715"WHERE rid =2;\n" 18716"\n" 18717"geomwkt\n" 18718"---------------------------------\n" 18719"MULTIPOLYGON(((3427928 5793243.85,3427928 5793243.8,3427928 " 18720"5793243.75,3427927.85 5793243.75,3427927.8 5793243.75,3427927.8 " 18721"5793243.8,3427927.75 5793243.8,3427927.75 5793243.85,3427927.75 " 18722"5793243.9,3427927.75 5793244,3427927.8 5793244,3427927.85 5793244,3427927.9 " 18723"5793244,3427928 5793244,3427928 5793243.95,3427928 5793243.85),(3427927.9 " 18724"5793243.9,3427927.9 5793243.85,3427927.95 5793243.85,3427927.95 " 18725"5793243.9,3427927.9 5793243.9)))" 18726msgstr "" 18727 18728#. Tag: title 18729#: reference_raster.xml:9978 18730#, no-c-format 18731msgid "Raster Operators" 18732msgstr "" 18733 18734#. Tag: refname 18735#: reference_raster.xml:9981 18736#, no-c-format 18737msgid "&&" 18738msgstr "&&" 18739 18740#. Tag: refpurpose 18741#: reference_raster.xml:9983 18742#, no-c-format 18743msgid "" 18744"Returns <varname>TRUE</varname> if A's bounding box intersects B's bounding " 18745"box." 18746msgstr "" 18747 18748#. Tag: funcsynopsis 18749#: reference_raster.xml:9987 18750#, no-c-format 18751msgid "" 18752"<funcprototype> <funcdef>boolean <function>&&</function></funcdef> " 18753"<paramdef> <type>raster </type> <parameter>A</parameter> </paramdef> " 18754"<paramdef> <type>raster </type> <parameter>B</parameter> </paramdef> </" 18755"funcprototype> <funcprototype> <funcdef>boolean <function>&&</" 18756"function></funcdef> <paramdef> <type>raster </type> <parameter>A</parameter> " 18757"</paramdef> <paramdef> <type>geometry </type> <parameter>B</parameter> </" 18758"paramdef> </funcprototype> <funcprototype> <funcdef>boolean <function>&" 18759"&</function></funcdef> <paramdef> <type>geometry </type> <parameter>B</" 18760"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>A</" 18761"parameter> </paramdef> </funcprototype>" 18762msgstr "" 18763 18764#. Tag: para 18765#: reference_raster.xml:10029 18766#, no-c-format 18767msgid "" 18768"The <varname>&&</varname> operator returns <varname>TRUE</varname> " 18769"if the bounding box of raster/geometr A intersects the bounding box of " 18770"raster/geometr B." 18771msgstr "" 18772 18773#. Tag: para 18774#: reference_raster.xml:10031 reference_raster.xml:10078 18775#: reference_raster.xml:10282 reference_raster.xml:11292 18776#: reference_raster.xml:11393 reference_raster.xml:11486 18777#, no-c-format 18778msgid "" 18779"This operand will make use of any indexes that may be available on the " 18780"rasters." 18781msgstr "" 18782 18783#. Tag: programlisting 18784#: reference_raster.xml:10040 18785#, no-c-format 18786msgid "" 18787"SELECT A.rid As a_rid, B.rid As b_rid, A.rast && B.rast As " 18788"intersect\n" 18789" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B LIMIT 3;\n" 18790"\n" 18791" a_rid | b_rid | intersect\n" 18792"-------+-------+---------\n" 18793" 2 | 2 | t\n" 18794" 2 | 3 | f\n" 18795" 2 | 1 | f" 18796msgstr "" 18797"SELECT A.rid As a_rid, B.rid As b_rid, A.rast && B.rast As " 18798"intersect\n" 18799" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B LIMIT 3;\n" 18800"\n" 18801" a_rid | b_rid | intersect\n" 18802"-------+-------+---------\n" 18803" 2 | 2 | t\n" 18804" 2 | 3 | f\n" 18805" 2 | 1 | f" 18806 18807#. Tag: refname 18808#: reference_raster.xml:10046 18809#, no-c-format 18810msgid "&<" 18811msgstr "" 18812 18813#. Tag: refpurpose 18814#: reference_raster.xml:10048 18815#, no-c-format 18816msgid "" 18817"Returns <varname>TRUE</varname> if A's bounding box is to the left of B's." 18818msgstr "" 18819 18820#. Tag: funcprototype 18821#: reference_raster.xml:10053 18822#, no-c-format 18823msgid "" 18824"<funcdef>boolean <function>&<</function></funcdef> <paramdef> " 18825"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 18826"<type>raster </type> <parameter>B</parameter> </paramdef>" 18827msgstr "" 18828"<funcdef>boolean <function>&<</function></funcdef> <paramdef> " 18829"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 18830"<type>raster </type> <parameter>B</parameter> </paramdef>" 18831 18832#. Tag: para 18833#: reference_raster.xml:10074 18834#, no-c-format 18835msgid "" 18836"The <varname>&<</varname> operator returns <varname>TRUE</varname> if " 18837"the bounding box of raster A overlaps or is to the left of the bounding box " 18838"of raster B, or more accurately, overlaps or is NOT to the right of the " 18839"bounding box of raster B." 18840msgstr "" 18841 18842#. Tag: programlisting 18843#: reference_raster.xml:10084 18844#, no-c-format 18845msgid "" 18846"SELECT A.rid As a_rid, B.rid As b_rid, A.rast &< B.rast As overleft\n" 18847" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B;\n" 18848"\n" 18849"a_rid | b_rid | overleft\n" 18850"------+-------+----------\n" 18851" 2 | 2 | t\n" 18852" 2 | 3 | f\n" 18853" 2 | 1 | f\n" 18854" 3 | 2 | t\n" 18855" 3 | 3 | t\n" 18856" 3 | 1 | f\n" 18857" 1 | 2 | t\n" 18858" 1 | 3 | t\n" 18859" 1 | 1 | t" 18860msgstr "" 18861"SELECT A.rid As a_rid, B.rid As b_rid, A.rast &< B.rast As overleft\n" 18862" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B;\n" 18863"\n" 18864"a_rid | b_rid | overleft\n" 18865"------+-------+----------\n" 18866" 2 | 2 | t\n" 18867" 2 | 3 | f\n" 18868" 2 | 1 | f\n" 18869" 3 | 2 | t\n" 18870" 3 | 3 | t\n" 18871" 3 | 1 | f\n" 18872" 1 | 2 | t\n" 18873" 1 | 3 | t\n" 18874" 1 | 1 | t" 18875 18876#. Tag: refname 18877#: reference_raster.xml:10090 18878#, no-c-format 18879msgid "&>" 18880msgstr "&>" 18881 18882#. Tag: refpurpose 18883#: reference_raster.xml:10092 18884#, no-c-format 18885msgid "" 18886"Returns <varname>TRUE</varname> if A's bounding box is to the right of B's." 18887msgstr "" 18888 18889#. Tag: funcprototype 18890#: reference_raster.xml:10097 18891#, no-c-format 18892msgid "" 18893"<funcdef>boolean <function>&></function></funcdef> <paramdef> " 18894"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 18895"<type>raster </type> <parameter>B</parameter> </paramdef>" 18896msgstr "" 18897"<funcdef>boolean <function>&></function></funcdef> <paramdef> " 18898"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 18899"<type>raster </type> <parameter>B</parameter> </paramdef>" 18900 18901#. Tag: para 18902#: reference_raster.xml:10118 18903#, no-c-format 18904msgid "" 18905"The <varname>&></varname> operator returns <varname>TRUE</varname> if " 18906"the bounding box of raster A overlaps or is to the right of the bounding box " 18907"of raster B, or more accurately, overlaps or is NOT to the left of the " 18908"bounding box of raster B." 18909msgstr "" 18910 18911#. Tag: para 18912#: reference_raster.xml:10122 18913#, no-c-format 18914msgid "" 18915"This operand will make use of any indexes that may be available on the " 18916"geometries." 18917msgstr "" 18918 18919#. Tag: programlisting 18920#: reference_raster.xml:10129 18921#, no-c-format 18922msgid "" 18923"SELECT A.rid As a_rid, B.rid As b_rid, A.rast &> B.rast As overright\n" 18924" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B;\n" 18925"\n" 18926" a_rid | b_rid | overright\n" 18927"-------+-------+----------\n" 18928" 2 | 2 | t\n" 18929" 2 | 3 | t\n" 18930" 2 | 1 | t\n" 18931" 3 | 2 | f\n" 18932" 3 | 3 | t\n" 18933" 3 | 1 | f\n" 18934" 1 | 2 | f\n" 18935" 1 | 3 | t\n" 18936" 1 | 1 | t" 18937msgstr "" 18938"SELECT A.rid As a_rid, B.rid As b_rid, A.rast &> B.rast As overright\n" 18939" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B;\n" 18940"\n" 18941" a_rid | b_rid | overright\n" 18942"-------+-------+----------\n" 18943" 2 | 2 | t\n" 18944" 2 | 3 | t\n" 18945" 2 | 1 | t\n" 18946" 3 | 2 | f\n" 18947" 3 | 3 | t\n" 18948" 3 | 1 | f\n" 18949" 1 | 2 | f\n" 18950" 1 | 3 | t\n" 18951" 1 | 1 | t" 18952 18953#. Tag: refname 18954#: reference_raster.xml:10135 18955#, no-c-format 18956msgid "=" 18957msgstr "" 18958 18959#. Tag: refpurpose 18960#: reference_raster.xml:10137 18961#, no-c-format 18962msgid "" 18963"Returns <varname>TRUE</varname> if A's bounding box is the same as B's. Uses " 18964"double precision bounding box." 18965msgstr "" 18966 18967#. Tag: funcprototype 18968#: reference_raster.xml:10142 18969#, no-c-format 18970msgid "" 18971"<funcdef>boolean <function>=</function></funcdef> <paramdef> " 18972"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 18973"<type>raster </type> <parameter>B</parameter> </paramdef>" 18974msgstr "" 18975 18976#. Tag: para 18977#: reference_raster.xml:10163 18978#, no-c-format 18979msgid "" 18980"The <varname>=</varname> operator returns <varname>TRUE</varname> if the " 18981"bounding box of raster A is the same as the bounding box of raster B. " 18982"PostgreSQL uses the =, <, and > operators defined for rasters to " 18983"perform internal orderings and comparison of rasters (ie. in a GROUP BY or " 18984"ORDER BY clause)." 18985msgstr "" 18986 18987#. Tag: para 18988#: reference_raster.xml:10167 18989#, no-c-format 18990msgid "" 18991"This operand will NOT make use of any indexes that may be available on the " 18992"rasters. Use <xref linkend=\"RT_Raster_Same\"/> instead. This operator " 18993"exists mostly so one can group by the raster column." 18994msgstr "" 18995 18996#. Tag: refname 18997#: reference_raster.xml:10183 18998#, no-c-format 18999msgid "<refname>@</refname>" 19000msgstr "" 19001 19002#. Tag: refpurpose 19003#: reference_raster.xml:10185 19004#, no-c-format 19005msgid "" 19006"Returns <varname>TRUE</varname> if A's bounding box is contained by B's. " 19007"Uses double precision bounding box." 19008msgstr "" 19009 19010#. Tag: funcsynopsis 19011#: reference_raster.xml:10189 19012#, no-c-format 19013msgid "" 19014"<funcprototype> <funcdef>boolean <function>@</function></funcdef> <paramdef> " 19015"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 19016"<type>raster </type> <parameter>B</parameter> </paramdef> </funcprototype> " 19017"<funcprototype> <funcdef>boolean <function>@</function></funcdef> <paramdef> " 19018"<type>geometry </type> <parameter>A</parameter> </paramdef> <paramdef> " 19019"<type>raster </type> <parameter>B</parameter> </paramdef> </funcprototype> " 19020"<funcprototype> <funcdef>boolean <function>@</function></funcdef> <paramdef> " 19021"<type>raster </type> <parameter>B</parameter> </paramdef> <paramdef> " 19022"<type>geometry </type> <parameter>A</parameter> </paramdef> </funcprototype>" 19023msgstr "" 19024 19025#. Tag: para 19026#: reference_raster.xml:10232 19027#, no-c-format 19028msgid "" 19029"The <varname>@</varname> operator returns <varname>TRUE</varname> if the " 19030"bounding box of raster/geometry A is contained by bounding box of raster/" 19031"geometr B." 19032msgstr "" 19033 19034#. Tag: para 19035#: reference_raster.xml:10235 reference_raster.xml:10355 19036#, no-c-format 19037msgid "This operand will use spatial indexes on the rasters." 19038msgstr "" 19039 19040#. Tag: para 19041#: reference_raster.xml:10237 19042#, no-c-format 19043msgid "Availability: 2.0.0 raster @ raster, raster @ geometry introduced" 19044msgstr "" 19045 19046#. Tag: para 19047#: reference_raster.xml:10238 19048#, no-c-format 19049msgid "Availability: 2.0.5 geometry @ raster introduced" 19050msgstr "" 19051 19052#. Tag: refname 19053#: reference_raster.xml:10251 19054#, no-c-format 19055msgid "<refname>~=</refname>" 19056msgstr "" 19057 19058#. Tag: refpurpose 19059#: reference_raster.xml:10253 19060#, no-c-format 19061msgid "Returns <varname>TRUE</varname> if A's bounding box is the same as B's." 19062msgstr "" 19063 19064#. Tag: funcprototype 19065#: reference_raster.xml:10258 19066#, no-c-format 19067msgid "" 19068"<funcdef>boolean <function>~=</function></funcdef> <paramdef> <type>raster </" 19069"type> <parameter>A</parameter> </paramdef> <paramdef> <type>raster </type> " 19070"<parameter>B</parameter> </paramdef>" 19071msgstr "" 19072 19073#. Tag: para 19074#: reference_raster.xml:10279 19075#, no-c-format 19076msgid "" 19077"The <varname>~=</varname> operator returns <varname>TRUE</varname> if the " 19078"bounding box of raster A is the same as the bounding box of raster B." 19079msgstr "" 19080 19081#. Tag: para 19082#: reference_raster.xml:10291 19083#, no-c-format 19084msgid "" 19085"Very useful usecase is for taking two sets of single band rasters that are " 19086"of the same chunk but represent different themes and creating a multi-band " 19087"raster" 19088msgstr "" 19089 19090#. Tag: programlisting 19091#: reference_raster.xml:10292 19092#, no-c-format 19093msgid "" 19094"SELECT ST_AddBand(prec.rast, alt.rast) As new_rast\n" 19095" FROM prec INNER JOIN alt ON (prec.rast ~= alt.rast);" 19096msgstr "" 19097 19098#. Tag: para 19099#: reference_raster.xml:10297 19100#, no-c-format 19101msgid ", <xref linkend=\"RT_Raster_EQ\"/>" 19102msgstr "" 19103 19104#. Tag: refname 19105#: reference_raster.xml:10303 19106#, no-c-format 19107msgid "<refname>~</refname>" 19108msgstr "" 19109 19110#. Tag: refpurpose 19111#: reference_raster.xml:10305 19112#, no-c-format 19113msgid "" 19114"Returns <varname>TRUE</varname> if A's bounding box is contains B's. Uses " 19115"double precision bounding box." 19116msgstr "" 19117 19118#. Tag: funcsynopsis 19119#: reference_raster.xml:10309 19120#, no-c-format 19121msgid "" 19122"<funcprototype> <funcdef>boolean <function>~</function></funcdef> <paramdef> " 19123"<type>raster </type> <parameter>A</parameter> </paramdef> <paramdef> " 19124"<type>raster </type> <parameter>B</parameter> </paramdef> </funcprototype> " 19125"<funcprototype> <funcdef>boolean <function>~</function></funcdef> <paramdef> " 19126"<type>geometry </type> <parameter>A</parameter> </paramdef> <paramdef> " 19127"<type>raster </type> <parameter>B</parameter> </paramdef> </funcprototype> " 19128"<funcprototype> <funcdef>boolean <function>~</function></funcdef> <paramdef> " 19129"<type>raster </type> <parameter>B</parameter> </paramdef> <paramdef> " 19130"<type>geometry </type> <parameter>A</parameter> </paramdef> </funcprototype>" 19131msgstr "" 19132 19133#. Tag: para 19134#: reference_raster.xml:10352 19135#, no-c-format 19136msgid "" 19137"The <varname>~</varname> operator returns <varname>TRUE</varname> if the " 19138"bounding box of raster/geometry A is contains bounding box of raster/geometr " 19139"B." 19140msgstr "" 19141 19142#. Tag: title 19143#: reference_raster.xml:10370 19144#, no-c-format 19145msgid "Raster and Raster Band Spatial Relationships" 19146msgstr "" 19147 19148#. Tag: refname 19149#: reference_raster.xml:10374 19150#, no-c-format 19151msgid "ST_Contains" 19152msgstr "ST_Contains" 19153 19154#. Tag: refpurpose 19155#: reference_raster.xml:10375 19156#, no-c-format 19157msgid "" 19158"Return true if no points of raster rastB lie in the exterior of raster rastA " 19159"and at least one point of the interior of rastB lies in the interior of " 19160"rastA." 19161msgstr "" 19162 19163#. Tag: funcsynopsis 19164#: reference_raster.xml:10381 19165#, no-c-format 19166msgid "" 19167"<funcprototype> <funcdef>boolean <function>ST_Contains</function></funcdef> " 19168"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19169"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19170"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19171"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19172"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Contains</" 19173"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19174"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19175"parameter> </paramdef> </funcprototype>" 19176msgstr "" 19177 19178#. Tag: para 19179#: reference_raster.xml:10420 19180#, no-c-format 19181msgid "" 19182"Raster rastA contains rastB if and only if no points of rastB lie in the " 19183"exterior of rastA and at least one point of the interior of rastB lies in " 19184"the interior of rastA. If the band number is not provided (or set to NULL), " 19185"only the convex hull of the raster is considered in the test. If the band " 19186"number is provided, only those pixels with value (not NODATA) are considered " 19187"in the test." 19188msgstr "" 19189 19190#. Tag: para 19191#: reference_raster.xml:10425 reference_raster.xml:10518 19192#: reference_raster.xml:10599 reference_raster.xml:10680 19193#: reference_raster.xml:10890 reference_raster.xml:10974 19194#: reference_raster.xml:11054 19195#, no-c-format 19196msgid "" 19197"This function will make use of any indexes that may be available on the " 19198"rasters." 19199msgstr "" 19200 19201#. Tag: para 19202#: reference_raster.xml:10431 19203#, no-c-format 19204msgid "" 19205"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19206"on the raster, e.g. ST_Contains(ST_Polygon(raster), geometry) or " 19207"ST_Contains(geometry, ST_Polygon(raster))." 19208msgstr "" 19209 19210#. Tag: para 19211#: reference_raster.xml:10437 19212#, no-c-format 19213msgid "" 19214"ST_Contains() is the inverse of ST_Within(). So, ST_Contains(rastA, rastB) " 19215"implies ST_Within(rastB, rastA)." 19216msgstr "" 19217 19218#. Tag: programlisting 19219#: reference_raster.xml:10448 19220#, fuzzy, no-c-format 19221msgid "" 19222"-- specified band numbers\n" 19223"SELECT r1.rid, r2.rid, ST_Contains(r1.rast, 1, r2.rast, 1) FROM dummy_rast " 19224"r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 1;\n" 19225"\n" 19226"NOTICE: The first raster provided has no bands\n" 19227" rid | rid | st_contains\n" 19228"-----+-----+-------------\n" 19229" 1 | 1 |\n" 19230" 1 | 2 | f" 19231msgstr "" 19232"SELECT r1.rid, r2.rid, ST_ContainsProperly(r1.rast, 1, r2.rast, 1) FROM " 19233"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19234"\n" 19235" rid | rid | st_containsproperly \n" 19236"-----+-----+---------------------\n" 19237" 2 | 1 | f\n" 19238" 2 | 2 | f" 19239 19240#. Tag: programlisting 19241#: reference_raster.xml:10450 19242#, fuzzy, no-c-format 19243msgid "" 19244"-- no band numbers specified\n" 19245"SELECT r1.rid, r2.rid, ST_Contains(r1.rast, r2.rast) FROM dummy_rast r1 " 19246"CROSS JOIN dummy_rast r2 WHERE r1.rid = 1;\n" 19247" rid | rid | st_contains\n" 19248"-----+-----+-------------\n" 19249" 1 | 1 | t\n" 19250" 1 | 2 | f" 19251msgstr "" 19252"SELECT r1.rid, r2.rid, ST_ContainsProperly(r1.rast, 1, r2.rast, 1) FROM " 19253"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19254"\n" 19255" rid | rid | st_containsproperly \n" 19256"-----+-----+---------------------\n" 19257" 2 | 1 | f\n" 19258" 2 | 2 | f" 19259 19260#. Tag: para 19261#: reference_raster.xml:10454 19262#, no-c-format 19263msgid ", <xref linkend=\"RT_ST_Within\"/>" 19264msgstr ", <xref linkend=\"RT_ST_Within\"/>" 19265 19266#. Tag: refname 19267#: reference_raster.xml:10463 19268#, no-c-format 19269msgid "ST_ContainsProperly" 19270msgstr "ST_ContainsProperly" 19271 19272#. Tag: refpurpose 19273#: reference_raster.xml:10464 19274#, no-c-format 19275msgid "" 19276"Return true if rastB intersects the interior of rastA but not the boundary " 19277"or exterior of rastA." 19278msgstr "" 19279 19280#. Tag: funcsynopsis 19281#: reference_raster.xml:10470 19282#, no-c-format 19283msgid "" 19284"<funcprototype> <funcdef>boolean <function>ST_ContainsProperly</function></" 19285"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 19286"paramdef> <paramdef> <type>integer </type> <parameter>nbandA</parameter> </" 19287"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 19288"paramdef> <paramdef> <type>integer </type> <parameter>nbandB</parameter> </" 19289"paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 19290"<function>ST_ContainsProperly</function></funcdef> <paramdef> <type>raster </" 19291"type> <parameter>rastA</parameter> </paramdef> <paramdef> <type>raster </" 19292"type> <parameter>rastB</parameter> </paramdef> </funcprototype>" 19293msgstr "" 19294"<funcprototype> <funcdef>boolean <function>ST_ContainsProperly</function></" 19295"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 19296"paramdef> <paramdef> <type>integer </type> <parameter>nbandA</parameter> </" 19297"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 19298"paramdef> <paramdef> <type>integer </type> <parameter>nbandB</parameter> </" 19299"paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 19300"<function>ST_ContainsProperly</function></funcdef> <paramdef> <type>raster </" 19301"type> <parameter>rastA</parameter> </paramdef> <paramdef> <type>raster </" 19302"type> <parameter>rastB</parameter> </paramdef> </funcprototype>" 19303 19304#. Tag: para 19305#: reference_raster.xml:10509 19306#, no-c-format 19307msgid "" 19308"Raster rastA contains properly rastB if rastB intersects the interior of " 19309"rastA but not the boundary or exterior of rastA. If the band number is not " 19310"provided (or set to NULL), only the convex hull of the raster is considered " 19311"in the test. If the band number is provided, only those pixels with value " 19312"(not NODATA) are considered in the test." 19313msgstr "" 19314 19315#. Tag: para 19316#: reference_raster.xml:10513 19317#, no-c-format 19318msgid "Raster rastA does not contain properly itself but does contain itself." 19319msgstr "" 19320 19321#. Tag: para 19322#: reference_raster.xml:10524 19323#, no-c-format 19324msgid "" 19325"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19326"on the raster, e.g. ST_ContainsProperly(ST_Polygon(raster), geometry) or " 19327"ST_ContainsProperly(geometry, ST_Polygon(raster))." 19328msgstr "" 19329 19330#. Tag: programlisting 19331#: reference_raster.xml:10535 19332#, fuzzy, no-c-format 19333msgid "" 19334"SELECT r1.rid, r2.rid, ST_ContainsProperly(r1.rast, 1, r2.rast, 1) FROM " 19335"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19336"\n" 19337" rid | rid | st_containsproperly\n" 19338"-----+-----+---------------------\n" 19339" 2 | 1 | f\n" 19340" 2 | 2 | f" 19341msgstr "" 19342"SELECT r1.rid, r2.rid, ST_ContainsProperly(r1.rast, 1, r2.rast, 1) FROM " 19343"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19344"\n" 19345" rid | rid | st_containsproperly \n" 19346"-----+-----+---------------------\n" 19347" 2 | 1 | f\n" 19348" 2 | 2 | f" 19349 19350#. Tag: para 19351#: reference_raster.xml:10539 19352#, no-c-format 19353msgid ", <xref linkend=\"RT_ST_Contains\"/>" 19354msgstr ", <xref linkend=\"RT_ST_Contains\"/>" 19355 19356#. Tag: refname 19357#: reference_raster.xml:10548 19358#, no-c-format 19359msgid "ST_Covers" 19360msgstr "ST_Covers" 19361 19362#. Tag: refpurpose 19363#: reference_raster.xml:10549 19364#, no-c-format 19365msgid "Return true if no points of raster rastB lie outside raster rastA." 19366msgstr "" 19367 19368#. Tag: funcsynopsis 19369#: reference_raster.xml:10555 19370#, no-c-format 19371msgid "" 19372"<funcprototype> <funcdef>boolean <function>ST_Covers</function></funcdef> " 19373"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19374"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19375"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19376"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19377"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Covers</" 19378"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19379"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19380"parameter> </paramdef> </funcprototype>" 19381msgstr "" 19382"<funcprototype> <funcdef>boolean <function>ST_Covers</function></funcdef> " 19383"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19384"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19385"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19386"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19387"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Covers</" 19388"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19389"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19390"parameter> </paramdef> </funcprototype>" 19391 19392#. Tag: para 19393#: reference_raster.xml:10594 19394#, no-c-format 19395msgid "" 19396"Raster rastA covers rastB if and only if no points of rastB lie in the " 19397"exterior of rastA. If the band number is not provided (or set to NULL), only " 19398"the convex hull of the raster is considered in the test. If the band number " 19399"is provided, only those pixels with value (not NODATA) are considered in the " 19400"test." 19401msgstr "" 19402 19403#. Tag: para 19404#: reference_raster.xml:10605 19405#, no-c-format 19406msgid "" 19407"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19408"on the raster, e.g. ST_Covers(ST_Polygon(raster), geometry) or " 19409"ST_Covers(geometry, ST_Polygon(raster))." 19410msgstr "" 19411 19412#. Tag: programlisting 19413#: reference_raster.xml:10616 19414#, fuzzy, no-c-format 19415msgid "" 19416"SELECT r1.rid, r2.rid, ST_Covers(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 19417"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19418"\n" 19419" rid | rid | st_covers\n" 19420"-----+-----+-----------\n" 19421" 2 | 1 | f\n" 19422" 2 | 2 | t" 19423msgstr "" 19424"SELECT r1.rid, r2.rid, ST_Covers(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 19425"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19426"\n" 19427" rid | rid | st_covers \n" 19428"-----+-----+-----------\n" 19429" 2 | 1 | f\n" 19430" 2 | 2 | t" 19431 19432#. Tag: para 19433#: reference_raster.xml:10620 19434#, no-c-format 19435msgid ", <xref linkend=\"RT_ST_CoveredBy\"/>" 19436msgstr ", <xref linkend=\"RT_ST_CoveredBy\"/>" 19437 19438#. Tag: refname 19439#: reference_raster.xml:10629 19440#, no-c-format 19441msgid "ST_CoveredBy" 19442msgstr "ST_CoveredBy" 19443 19444#. Tag: refpurpose 19445#: reference_raster.xml:10630 19446#, no-c-format 19447msgid "Return true if no points of raster rastA lie outside raster rastB." 19448msgstr "" 19449 19450#. Tag: funcsynopsis 19451#: reference_raster.xml:10636 19452#, no-c-format 19453msgid "" 19454"<funcprototype> <funcdef>boolean <function>ST_CoveredBy</function></funcdef> " 19455"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19456"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19457"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19458"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19459"funcprototype> <funcprototype> <funcdef>boolean <function>ST_CoveredBy</" 19460"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19461"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19462"parameter> </paramdef> </funcprototype>" 19463msgstr "" 19464"<funcprototype> <funcdef>boolean <function>ST_CoveredBy</function></funcdef> " 19465"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19466"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19467"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19468"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19469"funcprototype> <funcprototype> <funcdef>boolean <function>ST_CoveredBy</" 19470"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19471"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19472"parameter> </paramdef> </funcprototype>" 19473 19474#. Tag: para 19475#: reference_raster.xml:10675 19476#, no-c-format 19477msgid "" 19478"Raster rastA is covered by rastB if and only if no points of rastA lie in " 19479"the exterior of rastB. If the band number is not provided (or set to NULL), " 19480"only the convex hull of the raster is considered in the test. If the band " 19481"number is provided, only those pixels with value (not NODATA) are considered " 19482"in the test." 19483msgstr "" 19484 19485#. Tag: para 19486#: reference_raster.xml:10686 19487#, no-c-format 19488msgid "" 19489"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19490"on the raster, e.g. ST_CoveredBy(ST_Polygon(raster), geometry) or " 19491"ST_CoveredBy(geometry, ST_Polygon(raster))." 19492msgstr "" 19493 19494#. Tag: programlisting 19495#: reference_raster.xml:10697 19496#, fuzzy, no-c-format 19497msgid "" 19498"SELECT r1.rid, r2.rid, ST_CoveredBy(r1.rast, 1, r2.rast, 1) FROM dummy_rast " 19499"r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19500"\n" 19501" rid | rid | st_coveredby\n" 19502"-----+-----+--------------\n" 19503" 2 | 1 | f\n" 19504" 2 | 2 | t" 19505msgstr "" 19506"SELECT r1.rid, r2.rid, ST_CoveredBy(r1.rast, 1, r2.rast, 1) FROM dummy_rast " 19507"r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19508"\n" 19509" rid | rid | st_coveredby \n" 19510"-----+-----+--------------\n" 19511" 2 | 1 | f\n" 19512" 2 | 2 | t" 19513 19514#. Tag: para 19515#: reference_raster.xml:10701 19516#, no-c-format 19517msgid ", <xref linkend=\"RT_ST_Covers\"/>" 19518msgstr ", <xref linkend=\"RT_ST_Covers\"/>" 19519 19520#. Tag: refname 19521#: reference_raster.xml:10710 19522#, no-c-format 19523msgid "ST_Disjoint" 19524msgstr "ST_Disjoint" 19525 19526#. Tag: refpurpose 19527#: reference_raster.xml:10711 19528#, no-c-format 19529msgid "Return true if raster rastA does not spatially intersect rastB." 19530msgstr "" 19531 19532#. Tag: funcsynopsis 19533#: reference_raster.xml:10717 19534#, no-c-format 19535msgid "" 19536"<funcprototype> <funcdef>boolean <function>ST_Disjoint</function></funcdef> " 19537"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19538"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19539"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19540"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19541"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Disjoint</" 19542"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19543"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19544"parameter> </paramdef> </funcprototype>" 19545msgstr "" 19546"<funcprototype> <funcdef>boolean <function>ST_Disjoint</function></funcdef> " 19547"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19548"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19549"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19550"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19551"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Disjoint</" 19552"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19553"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19554"parameter> </paramdef> </funcprototype>" 19555 19556#. Tag: para 19557#: reference_raster.xml:10756 19558#, no-c-format 19559msgid "" 19560"Raster rastA and rastB are disjointed if they do not share any space " 19561"together. If the band number is not provided (or set to NULL), only the " 19562"convex hull of the raster is considered in the test. If the band number is " 19563"provided, only those pixels with value (not NODATA) are considered in the " 19564"test." 19565msgstr "" 19566 19567#. Tag: para 19568#: reference_raster.xml:10761 19569#, no-c-format 19570msgid "This function does NOT use any indexes." 19571msgstr "" 19572 19573#. Tag: para 19574#: reference_raster.xml:10767 19575#, no-c-format 19576msgid "" 19577"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19578"on the raster, e.g. ST_Disjoint(ST_Polygon(raster), geometry)." 19579msgstr "" 19580 19581#. Tag: programlisting 19582#: reference_raster.xml:10778 19583#, fuzzy, no-c-format 19584msgid "" 19585"-- rid = 1 has no bands, hence the NOTICE and the NULL value for " 19586"st_disjoint\n" 19587"SELECT r1.rid, r2.rid, ST_Disjoint(r1.rast, 1, r2.rast, 1) FROM dummy_rast " 19588"r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19589"\n" 19590"NOTICE: The second raster provided has no bands\n" 19591" rid | rid | st_disjoint\n" 19592"-----+-----+-------------\n" 19593" 2 | 1 |\n" 19594" 2 | 2 | f" 19595msgstr "" 19596"SELECT r1.rid, r2.rid, ST_Within(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 19597"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19598"\n" 19599" rid | rid | st_within \n" 19600"-----+-----+-----------\n" 19601" 2 | 1 | f\n" 19602" 2 | 2 | t" 19603 19604#. Tag: programlisting 19605#: reference_raster.xml:10780 19606#, fuzzy, no-c-format 19607msgid "" 19608"-- this time, without specifying band numbers\n" 19609"SELECT r1.rid, r2.rid, ST_Disjoint(r1.rast, r2.rast) FROM dummy_rast r1 " 19610"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19611"\n" 19612" rid | rid | st_disjoint\n" 19613"-----+-----+-------------\n" 19614" 2 | 1 | t\n" 19615" 2 | 2 | f" 19616msgstr "" 19617"SELECT r1.rid, r2.rid, ST_Within(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 19618"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19619"\n" 19620" rid | rid | st_within \n" 19621"-----+-----+-----------\n" 19622" 2 | 1 | f\n" 19623" 2 | 2 | t" 19624 19625#. Tag: refname 19626#: reference_raster.xml:10793 19627#, no-c-format 19628msgid "ST_Intersects" 19629msgstr "ST_Intersects" 19630 19631#. Tag: refpurpose 19632#: reference_raster.xml:10794 19633#, no-c-format 19634msgid "Return true if raster rastA spatially intersects raster rastB." 19635msgstr "" 19636 19637#. Tag: funcsynopsis 19638#: reference_raster.xml:10798 19639#, no-c-format 19640msgid "" 19641"<funcprototype> <funcdef>boolean <function>ST_Intersects</function></" 19642"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 19643"paramdef> <paramdef> <type>integer </type> <parameter>nbandA</parameter> </" 19644"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 19645"paramdef> <paramdef> <type>integer </type> <parameter>nbandB</parameter> </" 19646"paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 19647"<function>ST_Intersects</function></funcdef> <paramdef> <type>raster </type> " 19648"<parameter>rastA</parameter> </paramdef> <paramdef> <type>raster </type> " 19649"<parameter>rastB</parameter> </paramdef> </funcprototype> <funcprototype> " 19650"<funcdef>boolean <function>ST_Intersects</function></funcdef> <paramdef> " 19651"<type>raster </type> <parameter>rast</parameter> </paramdef> <paramdef> " 19652"<type>integer </type> <parameter>nband</parameter> </paramdef> <paramdef> " 19653"<type>geometry </type> <parameter>geommin</parameter> </paramdef> </" 19654"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Intersects</" 19655"function></funcdef> <paramdef> <type>raster </type> <parameter>rast</" 19656"parameter> </paramdef> <paramdef> <type>geometry </type> <parameter>geommin</" 19657"parameter> </paramdef> <paramdef choice=\"opt\"> <type>integer </type> " 19658"<parameter>nband=NULL</parameter> </paramdef> </funcprototype> " 19659"<funcprototype> <funcdef>boolean <function>ST_Intersects</function></" 19660"funcdef> <paramdef> <type>geometry </type> <parameter>geommin</parameter> </" 19661"paramdef> <paramdef> <type>raster </type> <parameter>rast</parameter> </" 19662"paramdef> <paramdef choice=\"opt\"> <type>integer </type> " 19663"<parameter>nband=NULL</parameter> </paramdef> </funcprototype>" 19664msgstr "" 19665"<funcprototype> <funcdef>boolean <function>ST_Intersects</function></" 19666"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 19667"paramdef> <paramdef> <type>integer </type> <parameter>nbandA</parameter> </" 19668"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 19669"paramdef> <paramdef> <type>integer </type> <parameter>nbandB</parameter> </" 19670"paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 19671"<function>ST_Intersects</function></funcdef> <paramdef> <type>raster </type> " 19672"<parameter>rastA</parameter> </paramdef> <paramdef> <type>raster </type> " 19673"<parameter>rastB</parameter> </paramdef> </funcprototype> <funcprototype> " 19674"<funcdef>boolean <function>ST_Intersects</function></funcdef> <paramdef> " 19675"<type>raster </type> <parameter>rast</parameter> </paramdef> <paramdef> " 19676"<type>integer </type> <parameter>nband</parameter> </paramdef> <paramdef> " 19677"<type>geometry </type> <parameter>geommin</parameter> </paramdef> </" 19678"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Intersects</" 19679"function></funcdef> <paramdef> <type>raster </type> <parameter>rast</" 19680"parameter> </paramdef> <paramdef> <type>geometry </type> <parameter>geommin</" 19681"parameter> </paramdef> <paramdef choice=\"opt\"> <type>integer </type> " 19682"<parameter>nband=NULL</parameter> </paramdef> </funcprototype> " 19683"<funcprototype> <funcdef>boolean <function>ST_Intersects</function></" 19684"funcdef> <paramdef> <type>geometry </type> <parameter>geommin</parameter> </" 19685"paramdef> <paramdef> <type>raster </type> <parameter>rast</parameter> </" 19686"paramdef> <paramdef choice=\"opt\"> <type>integer </type> " 19687"<parameter>nband=NULL</parameter> </paramdef> </funcprototype>" 19688 19689#. Tag: para 19690#: reference_raster.xml:10885 19691#, no-c-format 19692msgid "" 19693"Return true if raster rastA spatially intersects raster rastB. If the band " 19694"number is not provided (or set to NULL), only the convex hull of the raster " 19695"is considered in the test. If the band number is provided, only those pixels " 19696"with value (not NODATA) are considered in the test." 19697msgstr "" 19698 19699#. Tag: para 19700#: reference_raster.xml:10895 19701#, no-c-format 19702msgid "Enhanced: 2.0.0 support raster/raster intersects was introduced." 19703msgstr "" 19704 19705#. Tag: para 19706#: reference_raster.xml:10900 19707#, no-c-format 19708msgid "" 19709"Changed: 2.1.0 The behavior of the ST_Intersects(raster, geometry) variants " 19710"changed to match that of ST_Intersects(geometry, raster)." 19711msgstr "" 19712 19713#. Tag: programlisting 19714#: reference_raster.xml:10909 19715#, fuzzy, no-c-format 19716msgid "" 19717"-- different bands of same raster\n" 19718"SELECT ST_Intersects(rast, 2, rast, 3) FROM dummy_rast WHERE rid = 2;\n" 19719"\n" 19720" st_intersects\n" 19721"---------------\n" 19722" t" 19723msgstr "" 19724"SELECT ST_Width(rast) As rastwidth\n" 19725"FROM dummy_rast WHERE rid=1;\n" 19726"\n" 19727"rastwidth\n" 19728"----------------\n" 19729"10" 19730 19731#. Tag: para 19732#: reference_raster.xml:10914 19733#, no-c-format 19734msgid ", <xref linkend=\"RT_ST_Disjoint\"/>" 19735msgstr ", <xref linkend=\"RT_ST_Disjoint\"/>" 19736 19737#. Tag: refname 19738#: reference_raster.xml:10923 19739#, no-c-format 19740msgid "ST_Overlaps" 19741msgstr "ST_Overlaps" 19742 19743#. Tag: refpurpose 19744#: reference_raster.xml:10924 19745#, no-c-format 19746msgid "" 19747"Return true if raster rastA and rastB intersect but one does not completely " 19748"contain the other." 19749msgstr "" 19750 19751#. Tag: funcsynopsis 19752#: reference_raster.xml:10930 19753#, no-c-format 19754msgid "" 19755"<funcprototype> <funcdef>boolean <function>ST_Overlaps</function></funcdef> " 19756"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19757"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19758"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19759"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19760"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Overlaps</" 19761"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19762"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19763"parameter> </paramdef> </funcprototype>" 19764msgstr "" 19765"<funcprototype> <funcdef>boolean <function>ST_Overlaps</function></funcdef> " 19766"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19767"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19768"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19769"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19770"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Overlaps</" 19771"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19772"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19773"parameter> </paramdef> </funcprototype>" 19774 19775#. Tag: para 19776#: reference_raster.xml:10969 19777#, no-c-format 19778msgid "" 19779"Return true if raster rastA spatially overlaps raster rastB. This means that " 19780"rastA and rastB intersect but one does not completely contain the other. If " 19781"the band number is not provided (or set to NULL), only the convex hull of " 19782"the raster is considered in the test. If the band number is provided, only " 19783"those pixels with value (not NODATA) are considered in the test." 19784msgstr "" 19785 19786#. Tag: para 19787#: reference_raster.xml:10980 19788#, no-c-format 19789msgid "" 19790"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19791"on the raster, e.g. ST_Overlaps(ST_Polygon(raster), geometry)." 19792msgstr "" 19793 19794#. Tag: programlisting 19795#: reference_raster.xml:10991 19796#, no-c-format 19797msgid "" 19798"-- comparing different bands of same raster\n" 19799"SELECT ST_Overlaps(rast, 1, rast, 2) FROM dummy_rast WHERE rid = 2;\n" 19800"\n" 19801" st_overlaps\n" 19802"-------------\n" 19803" f" 19804msgstr "" 19805 19806#. Tag: refname 19807#: reference_raster.xml:11003 19808#, no-c-format 19809msgid "ST_Touches" 19810msgstr "ST_Touches" 19811 19812#. Tag: refpurpose 19813#: reference_raster.xml:11004 19814#, no-c-format 19815msgid "" 19816"Return true if raster rastA and rastB have at least one point in common but " 19817"their interiors do not intersect." 19818msgstr "" 19819 19820#. Tag: funcsynopsis 19821#: reference_raster.xml:11010 19822#, no-c-format 19823msgid "" 19824"<funcprototype> <funcdef>boolean <function>ST_Touches</function></funcdef> " 19825"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19826"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19827"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19828"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19829"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Touches</" 19830"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19831"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19832"parameter> </paramdef> </funcprototype>" 19833msgstr "" 19834"<funcprototype> <funcdef>boolean <function>ST_Touches</function></funcdef> " 19835"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 19836"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 19837"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 19838"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 19839"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Touches</" 19840"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 19841"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 19842"parameter> </paramdef> </funcprototype>" 19843 19844#. Tag: para 19845#: reference_raster.xml:11049 19846#, no-c-format 19847msgid "" 19848"Return true if raster rastA spatially touches raster rastB. This means that " 19849"rastA and rastB have at least one point in common but their interiors do not " 19850"intersect. If the band number is not provided (or set to NULL), only the " 19851"convex hull of the raster is considered in the test. If the band number is " 19852"provided, only those pixels with value (not NODATA) are considered in the " 19853"test." 19854msgstr "" 19855 19856#. Tag: para 19857#: reference_raster.xml:11060 19858#, no-c-format 19859msgid "" 19860"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 19861"on the raster, e.g. ST_Touches(ST_Polygon(raster), geometry)." 19862msgstr "" 19863 19864#. Tag: programlisting 19865#: reference_raster.xml:11071 19866#, fuzzy, no-c-format 19867msgid "" 19868"SELECT r1.rid, r2.rid, ST_Touches(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 19869"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19870"\n" 19871" rid | rid | st_touches\n" 19872"-----+-----+------------\n" 19873" 2 | 1 | f\n" 19874" 2 | 2 | f" 19875msgstr "" 19876"SELECT r1.rid, r2.rid, ST_Touches(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 19877"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 19878"\n" 19879" rid | rid | st_touches \n" 19880"-----+-----+------------\n" 19881" 2 | 1 | f\n" 19882" 2 | 2 | f" 19883 19884#. Tag: refname 19885#: reference_raster.xml:11083 19886#, no-c-format 19887msgid "ST_SameAlignment" 19888msgstr "ST_SameAlignment" 19889 19890#. Tag: refpurpose 19891#: reference_raster.xml:11085 19892#, no-c-format 19893msgid "" 19894"Returns true if rasters have same skew, scale, spatial ref, and offset " 19895"(pixels can be put on same grid without cutting into pixels) and false if " 19896"they don't with notice detailing issue." 19897msgstr "" 19898 19899#. Tag: funcsynopsis 19900#: reference_raster.xml:11089 19901#, no-c-format 19902msgid "" 19903"<funcprototype> <funcdef>boolean <function>ST_SameAlignment</function></" 19904"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 19905"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 19906"paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 19907"<function>ST_SameAlignment</function></funcdef> <paramdef> <type>double " 19908"precision </type> <parameter>ulx1</parameter> </paramdef> <paramdef> " 19909"<type>double precision </type> <parameter>uly1</parameter> </paramdef> " 19910"<paramdef> <type>double precision </type> <parameter>scalex1</parameter> </" 19911"paramdef> <paramdef> <type>double precision </type> <parameter>scaley1</" 19912"parameter> </paramdef> <paramdef> <type>double precision </type> " 19913"<parameter>skewx1</parameter> </paramdef> <paramdef> <type>double precision " 19914"</type> <parameter>skewy1</parameter> </paramdef> <paramdef> <type>double " 19915"precision </type> <parameter>ulx2</parameter> </paramdef> <paramdef> " 19916"<type>double precision </type> <parameter>uly2</parameter> </paramdef> " 19917"<paramdef> <type>double precision </type> <parameter>scalex2</parameter> </" 19918"paramdef> <paramdef> <type>double precision </type> <parameter>scaley2</" 19919"parameter> </paramdef> <paramdef> <type>double precision </type> " 19920"<parameter>skewx2</parameter> </paramdef> <paramdef> <type>double precision " 19921"</type> <parameter>skewy2</parameter> </paramdef> </funcprototype> " 19922"<funcprototype> <funcdef>boolean <function>ST_SameAlignment</function></" 19923"funcdef> <paramdef> <type>raster set </type> <parameter>rastfield</" 19924"parameter> </paramdef> </funcprototype>" 19925msgstr "" 19926"<funcprototype> <funcdef>boolean <function>ST_SameAlignment</function></" 19927"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 19928"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 19929"paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 19930"<function>ST_SameAlignment</function></funcdef> <paramdef> <type>double " 19931"precision </type> <parameter>ulx1</parameter> </paramdef> <paramdef> " 19932"<type>double precision </type> <parameter>uly1</parameter> </paramdef> " 19933"<paramdef> <type>double precision </type> <parameter>scalex1</parameter> </" 19934"paramdef> <paramdef> <type>double precision </type> <parameter>scaley1</" 19935"parameter> </paramdef> <paramdef> <type>double precision </type> " 19936"<parameter>skewx1</parameter> </paramdef> <paramdef> <type>double precision " 19937"</type> <parameter>skewy1</parameter> </paramdef> <paramdef> <type>double " 19938"precision </type> <parameter>ulx2</parameter> </paramdef> <paramdef> " 19939"<type>double precision </type> <parameter>uly2</parameter> </paramdef> " 19940"<paramdef> <type>double precision </type> <parameter>scalex2</parameter> </" 19941"paramdef> <paramdef> <type>double precision </type> <parameter>scaley2</" 19942"parameter> </paramdef> <paramdef> <type>double precision </type> " 19943"<parameter>skewx2</parameter> </paramdef> <paramdef> <type>double precision " 19944"</type> <parameter>skewy2</parameter> </paramdef> </funcprototype> " 19945"<funcprototype> <funcdef>boolean <function>ST_SameAlignment</function></" 19946"funcdef> <paramdef> <type>raster set </type> <parameter>rastfield</" 19947"parameter> </paramdef> </funcprototype>" 19948 19949#. Tag: para 19950#: reference_raster.xml:11168 19951#, no-c-format 19952msgid "" 19953"Non-Aggregate version (Variants 1 and 2): Returns true if the two rasters " 19954"(either provided directly or made using the values for upperleft, scale, " 19955"skew and srid) have the same scale, skew, srid and at least one of any of " 19956"the four corners of any pixel of one raster falls on any corner of the grid " 19957"of the other raster. Returns false if they don't and a NOTICE detailing the " 19958"alignment issue." 19959msgstr "" 19960 19961#. Tag: para 19962#: reference_raster.xml:11172 19963#, no-c-format 19964msgid "" 19965"Aggregate version (Variant 3): From a set of rasters, returns true if all " 19966"rasters in the set are aligned. The ST_SameAlignment() function is an " 19967"\"aggregate\" function in the terminology of PostgreSQL. That means that it " 19968"operates on rows of data, in the same way the SUM() and AVG() functions do." 19969msgstr "" 19970 19971#. Tag: para 19972#: reference_raster.xml:11177 19973#, no-c-format 19974msgid "Enhanced: 2.1.0 addition of Aggegrate variant" 19975msgstr "" 19976 19977#. Tag: title 19978#: reference_raster.xml:11181 19979#, no-c-format 19980msgid "Examples: Rasters" 19981msgstr "" 19982 19983#. Tag: programlisting 19984#: reference_raster.xml:11183 19985#, no-c-format 19986msgid "" 19987"SELECT ST_SameAlignment(\n" 19988" ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0),\n" 19989" ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0)\n" 19990") as sm;\n" 19991"\n" 19992"sm\n" 19993"----\n" 19994"t" 19995msgstr "" 19996"SELECT ST_SameAlignment(\n" 19997" ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0),\n" 19998" ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0)\n" 19999") as sm;\n" 20000"\n" 20001"sm\n" 20002"----\n" 20003"t" 20004 20005#. Tag: programlisting 20006#: reference_raster.xml:11184 20007#, no-c-format 20008msgid "" 20009"SELECT ST_SameAlignment(A.rast,b.rast)\n" 20010" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B;\n" 20011"\n" 20012" NOTICE: The two rasters provided have different SRIDs\n" 20013"NOTICE: The two rasters provided have different SRIDs\n" 20014" st_samealignment\n" 20015"------------------\n" 20016" t\n" 20017" f\n" 20018" f\n" 20019" f" 20020msgstr "" 20021"SELECT ST_SameAlignment(A.rast,b.rast)\n" 20022" FROM dummy_rast AS A CROSS JOIN dummy_rast AS B;\n" 20023"\n" 20024" NOTA: I due raster forniti hanno SRID differenti\n" 20025"\n" 20026" st_samealignment\n" 20027"------------------\n" 20028" t\n" 20029" f\n" 20030" f\n" 20031" f" 20032 20033#. Tag: para 20034#: reference_raster.xml:11188 20035#, no-c-format 20036msgid "" 20037", <xref linkend=\"RT_ST_NotSameAlignmentReason\"/>, <xref linkend=" 20038"\"RT_ST_MakeEmptyRaster\"/>" 20039msgstr "" 20040 20041#. Tag: refname 20042#: reference_raster.xml:11198 20043#, no-c-format 20044msgid "ST_NotSameAlignmentReason" 20045msgstr "" 20046 20047#. Tag: refpurpose 20048#: reference_raster.xml:11199 20049#, no-c-format 20050msgid "" 20051"<refpurpose>Returns text stating if rasters are aligned and if not aligned, " 20052"a reason why.</refpurpose>" 20053msgstr "" 20054 20055#. Tag: funcprototype 20056#: reference_raster.xml:11204 20057#, no-c-format 20058msgid "" 20059"<funcdef>text <function>ST_NotSameAlignmentReason</function></funcdef> " 20060"<paramdef><type>raster </type><parameter>rastA</parameter></paramdef> " 20061"<paramdef><type>raster </type><parameter>rastB</parameter></paramdef>" 20062msgstr "" 20063 20064#. Tag: para 20065#: reference_raster.xml:11214 20066#, no-c-format 20067msgid "" 20068"<para>Returns text stating if rasters are aligned and if not aligned, a " 20069"reason why.</para>" 20070msgstr "" 20071 20072#. Tag: para 20073#: reference_raster.xml:11217 20074#, no-c-format 20075msgid "" 20076"If there are several reasons why the rasters are not aligned, only one " 20077"reason (the first test to fail) will be returned." 20078msgstr "" 20079 20080#. Tag: programlisting 20081#: reference_raster.xml:11227 20082#, no-c-format 20083msgid "" 20084"SELECT\n" 20085" ST_SameAlignment(\n" 20086" ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0),\n" 20087" ST_MakeEmptyRaster(1, 1, 0, 0, 1.1, 1.1, 0, 0)\n" 20088" ),\n" 20089" ST_NotSameAlignmentReason(\n" 20090" ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0),\n" 20091" ST_MakeEmptyRaster(1, 1, 0, 0, 1.1, 1.1, 0, 0)\n" 20092" )\n" 20093";\n" 20094"\n" 20095" st_samealignment | st_notsamealignmentreason\n" 20096"------------------+-------------------------------------------------\n" 20097" f | The rasters have different scales on the X axis\n" 20098"(1 row)" 20099msgstr "" 20100 20101#. Tag: para 20102#: reference_raster.xml:11232 20103#, no-c-format 20104msgid ", <xref linkend=\"RT_ST_SameAlignment\"/>" 20105msgstr "" 20106 20107#. Tag: refname 20108#: reference_raster.xml:11241 20109#, no-c-format 20110msgid "ST_Within" 20111msgstr "ST_Within" 20112 20113#. Tag: refpurpose 20114#: reference_raster.xml:11242 20115#, no-c-format 20116msgid "" 20117"Return true if no points of raster rastA lie in the exterior of raster rastB " 20118"and at least one point of the interior of rastA lies in the interior of " 20119"rastB." 20120msgstr "" 20121 20122#. Tag: funcsynopsis 20123#: reference_raster.xml:11248 20124#, no-c-format 20125msgid "" 20126"<funcprototype> <funcdef>boolean <function>ST_Within</function></funcdef> " 20127"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 20128"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 20129"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 20130"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 20131"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Within</" 20132"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 20133"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 20134"parameter> </paramdef> </funcprototype>" 20135msgstr "" 20136"<funcprototype> <funcdef>boolean <function>ST_Within</function></funcdef> " 20137"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 20138"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 20139"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 20140"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> </" 20141"funcprototype> <funcprototype> <funcdef>boolean <function>ST_Within</" 20142"function></funcdef> <paramdef> <type>raster </type> <parameter>rastA</" 20143"parameter> </paramdef> <paramdef> <type>raster </type> <parameter>rastB</" 20144"parameter> </paramdef> </funcprototype>" 20145 20146#. Tag: para 20147#: reference_raster.xml:11287 20148#, no-c-format 20149msgid "" 20150"Raster rastA is within rastB if and only if no points of rastA lie in the " 20151"exterior of rastB and at least one point of the interior of rastA lies in " 20152"the interior of rastB. If the band number is not provided (or set to NULL), " 20153"only the convex hull of the raster is considered in the test. If the band " 20154"number is provided, only those pixels with value (not NODATA) are considered " 20155"in the test." 20156msgstr "" 20157 20158#. Tag: para 20159#: reference_raster.xml:11298 20160#, no-c-format 20161msgid "" 20162"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 20163"on the raster, e.g. ST_Within(ST_Polygon(raster), geometry) or " 20164"ST_Within(geometry, ST_Polygon(raster))." 20165msgstr "" 20166 20167#. Tag: para 20168#: reference_raster.xml:11304 20169#, no-c-format 20170msgid "" 20171"ST_Within() is the inverse of ST_Contains(). So, ST_Within(rastA, rastB) " 20172"implies ST_Contains(rastB, rastA)." 20173msgstr "" 20174 20175#. Tag: programlisting 20176#: reference_raster.xml:11315 20177#, fuzzy, no-c-format 20178msgid "" 20179"SELECT r1.rid, r2.rid, ST_Within(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 20180"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 20181"\n" 20182" rid | rid | st_within\n" 20183"-----+-----+-----------\n" 20184" 2 | 1 | f\n" 20185" 2 | 2 | t" 20186msgstr "" 20187"SELECT r1.rid, r2.rid, ST_Within(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 " 20188"CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 20189"\n" 20190" rid | rid | st_within \n" 20191"-----+-----+-----------\n" 20192" 2 | 1 | f\n" 20193" 2 | 2 | t" 20194 20195#. Tag: para 20196#: reference_raster.xml:11319 20197#, no-c-format 20198msgid "" 20199", <xref linkend=\"RT_ST_Contains\"/>, <xref linkend=\"RT_ST_DWithin\"/>, " 20200"<xref linkend=\"RT_ST_DFullyWithin\"/>" 20201msgstr "" 20202", <xref linkend=\"RT_ST_Contains\"/>, <xref linkend=\"RT_ST_DWithin\"/>, " 20203"<xref linkend=\"RT_ST_DFullyWithin\"/>" 20204 20205#. Tag: refname 20206#: reference_raster.xml:11330 20207#, no-c-format 20208msgid "ST_DWithin" 20209msgstr "ST_DWithin" 20210 20211#. Tag: refpurpose 20212#: reference_raster.xml:11331 20213#, no-c-format 20214msgid "" 20215"Return true if rasters rastA and rastB are within the specified distance of " 20216"each other." 20217msgstr "" 20218"Return true if rasters rastA and rastB are within the specified distance of " 20219"each other." 20220 20221#. Tag: funcsynopsis 20222#: reference_raster.xml:11337 20223#, no-c-format 20224msgid "" 20225"<funcprototype> <funcdef>boolean <function>ST_DWithin</function></funcdef> " 20226"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 20227"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 20228"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 20229"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> " 20230"<paramdef> <type>double precision </type> <parameter>distance_of_srid</" 20231"parameter> </paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 20232"<function>ST_DWithin</function></funcdef> <paramdef> <type>raster </type> " 20233"<parameter>rastA</parameter> </paramdef> <paramdef> <type>raster </type> " 20234"<parameter>rastB</parameter> </paramdef> <paramdef> <type>double precision </" 20235"type> <parameter>distance_of_srid</parameter> </paramdef> </funcprototype>" 20236msgstr "" 20237"<funcprototype> <funcdef>boolean <function>ST_DWithin</function></funcdef> " 20238"<paramdef> <type>raster </type> <parameter>rastA</parameter> </paramdef> " 20239"<paramdef> <type>integer </type> <parameter>nbandA</parameter> </paramdef> " 20240"<paramdef> <type>raster </type> <parameter>rastB</parameter> </paramdef> " 20241"<paramdef> <type>integer </type> <parameter>nbandB</parameter> </paramdef> " 20242"<paramdef> <type>double precision </type> <parameter>distance_of_srid</" 20243"parameter> </paramdef> </funcprototype> <funcprototype> <funcdef>boolean " 20244"<function>ST_DWithin</function></funcdef> <paramdef> <type>raster </type> " 20245"<parameter>rastA</parameter> </paramdef> <paramdef> <type>raster </type> " 20246"<parameter>rastB</parameter> </paramdef> <paramdef> <type>double precision </" 20247"type> <parameter>distance_of_srid</parameter> </paramdef> </funcprototype>" 20248 20249#. Tag: para 20250#: reference_raster.xml:11384 20251#, no-c-format 20252msgid "" 20253"Return true if rasters rastA and rastB are within the specified distance of " 20254"each other. If the band number is not provided (or set to NULL), only the " 20255"convex hull of the raster is considered in the test. If the band number is " 20256"provided, only those pixels with value (not NODATA) are considered in the " 20257"test." 20258msgstr "" 20259 20260#. Tag: para 20261#: reference_raster.xml:11388 reference_raster.xml:11481 20262#, no-c-format 20263msgid "" 20264"The distance is specified in units defined by the spatial reference system " 20265"of the rasters. For this function to make sense, the source rasters must " 20266"both be of the same coordinate projection, having the same SRID." 20267msgstr "" 20268 20269#. Tag: para 20270#: reference_raster.xml:11399 20271#, no-c-format 20272msgid "" 20273"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 20274"on the raster, e.g. ST_DWithin(ST_Polygon(raster), geometry)." 20275msgstr "" 20276 20277#. Tag: programlisting 20278#: reference_raster.xml:11410 20279#, fuzzy, no-c-format 20280msgid "" 20281"SELECT r1.rid, r2.rid, ST_DWithin(r1.rast, 1, r2.rast, 1, 3.14) FROM " 20282"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 20283"\n" 20284" rid | rid | st_dwithin\n" 20285"-----+-----+------------\n" 20286" 2 | 1 | f\n" 20287" 2 | 2 | t" 20288msgstr "" 20289"SELECT r1.rid, r2.rid, ST_DWithin(r1.rast, 1, r2.rast, 1, 3.14) FROM " 20290"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 20291"\n" 20292" rid | rid | st_dwithin \n" 20293"-----+-----+------------\n" 20294" 2 | 1 | f\n" 20295" 2 | 2 | t" 20296 20297#. Tag: para 20298#: reference_raster.xml:11414 20299#, no-c-format 20300msgid ", <xref linkend=\"RT_ST_DFullyWithin\"/>" 20301msgstr ", <xref linkend=\"RT_ST_DFullyWithin\"/>" 20302 20303#. Tag: refname 20304#: reference_raster.xml:11423 20305#, no-c-format 20306msgid "ST_DFullyWithin" 20307msgstr "ST_DFullyWithin" 20308 20309#. Tag: refpurpose 20310#: reference_raster.xml:11424 20311#, no-c-format 20312msgid "" 20313"Return true if rasters rastA and rastB are fully within the specified " 20314"distance of each other." 20315msgstr "" 20316 20317#. Tag: funcsynopsis 20318#: reference_raster.xml:11430 20319#, no-c-format 20320msgid "" 20321"<funcprototype> <funcdef>boolean <function>ST_DFullyWithin</function></" 20322"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 20323"paramdef> <paramdef> <type>integer </type> <parameter>nbandA</parameter> </" 20324"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 20325"paramdef> <paramdef> <type>integer </type> <parameter>nbandB</parameter> </" 20326"paramdef> <paramdef> <type>double precision </type> " 20327"<parameter>distance_of_srid</parameter> </paramdef> </funcprototype> " 20328"<funcprototype> <funcdef>boolean <function>ST_DFullyWithin</function></" 20329"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 20330"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 20331"paramdef> <paramdef> <type>double precision </type> " 20332"<parameter>distance_of_srid</parameter> </paramdef> </funcprototype>" 20333msgstr "" 20334"<funcprototype> <funcdef>boolean <function>ST_DFullyWithin</function></" 20335"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 20336"paramdef> <paramdef> <type>integer </type> <parameter>nbandA</parameter> </" 20337"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 20338"paramdef> <paramdef> <type>integer </type> <parameter>nbandB</parameter> </" 20339"paramdef> <paramdef> <type>double precision </type> " 20340"<parameter>distance_of_srid</parameter> </paramdef> </funcprototype> " 20341"<funcprototype> <funcdef>boolean <function>ST_DFullyWithin</function></" 20342"funcdef> <paramdef> <type>raster </type> <parameter>rastA</parameter> </" 20343"paramdef> <paramdef> <type>raster </type> <parameter>rastB</parameter> </" 20344"paramdef> <paramdef> <type>double precision </type> " 20345"<parameter>distance_of_srid</parameter> </paramdef> </funcprototype>" 20346 20347#. Tag: para 20348#: reference_raster.xml:11477 20349#, no-c-format 20350msgid "" 20351"Return true if rasters rastA and rastB are fully within the specified " 20352"distance of each other. If the band number is not provided (or set to NULL), " 20353"only the convex hull of the raster is considered in the test. If the band " 20354"number is provided, only those pixels with value (not NODATA) are considered " 20355"in the test." 20356msgstr "" 20357 20358#. Tag: para 20359#: reference_raster.xml:11492 20360#, no-c-format 20361msgid "" 20362"To test the spatial relationship of a raster and a geometry, use ST_Polygon " 20363"on the raster, e.g. ST_DFullyWithin(ST_Polygon(raster), geometry)." 20364msgstr "" 20365 20366#. Tag: programlisting 20367#: reference_raster.xml:11503 20368#, fuzzy, no-c-format 20369msgid "" 20370"SELECT r1.rid, r2.rid, ST_DFullyWithin(r1.rast, 1, r2.rast, 1, 3.14) FROM " 20371"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 20372"\n" 20373" rid | rid | st_dfullywithin\n" 20374"-----+-----+-----------------\n" 20375" 2 | 1 | f\n" 20376" 2 | 2 | t" 20377msgstr "" 20378"SELECT r1.rid, r2.rid, ST_DFullyWithin(r1.rast, 1, r2.rast, 1, 3.14) FROM " 20379"dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;\n" 20380"\n" 20381" rid | rid | st_dfullywithin \n" 20382"-----+-----+-----------------\n" 20383" 2 | 1 | f\n" 20384" 2 | 2 | t" 20385 20386#. Tag: para 20387#: reference_raster.xml:11507 20388#, no-c-format 20389msgid ", <xref linkend=\"RT_ST_DWithin\"/>" 20390msgstr ", <xref linkend=\"RT_ST_DWithin\"/>" 20391 20392#. Tag: para 20393#: reference_raster.xml:11519 20394#, no-c-format 20395msgid "" 20396"This section documents various gotchas and tips related to PostGIS Raster." 20397msgstr "" 20398 20399#. Tag: title 20400#: reference_raster.xml:11522 20401#, no-c-format 20402msgid "Raster Tips" 20403msgstr "" 20404 20405#. Tag: title 20406#: reference_raster.xml:11525 20407#, no-c-format 20408msgid "Out-DB Rasters" 20409msgstr "" 20410 20411#. Tag: title 20412#: reference_raster.xml:11528 20413#, no-c-format 20414msgid "Directory containing many files" 20415msgstr "" 20416 20417#. Tag: para 20418#: reference_raster.xml:11529 20419#, no-c-format 20420msgid "" 20421"When GDAL opens a file, GDAL eagerly scans the directory of that file to " 20422"build a catalog of other files. If this directory contains many files (e.g. " 20423"thousands, millions), opening that file becomes extremely slow (especially " 20424"if that file happens to be on a network drive such as NFS)." 20425msgstr "" 20426 20427#. Tag: para 20428#: reference_raster.xml:11532 20429#, no-c-format 20430msgid "" 20431"To control this behavior, GDAL provides the following environment variable: " 20432"<ulink url=\"https://trac.osgeo.org/gdal/wiki/" 20433"ConfigOptions#GDAL_DISABLE_READDIR_ON_OPEN\">GDAL_DISABLE_READDIR_ON_OPEN</" 20434"ulink>. Set <varname>GDAL_DISABLE_READDIR_ON_OPEN</varname> to " 20435"<varname>TRUE</varname> to disable directory scanning." 20436msgstr "" 20437 20438#. Tag: para 20439#: reference_raster.xml:11536 20440#, no-c-format 20441msgid "" 20442"In Ubuntu (and assuming you are using PostgreSQL's packages for Ubuntu), " 20443"<varname>GDAL_DISABLE_READDIR_ON_OPEN</varname> can be set in <emphasis>/etc/" 20444"postgresql/POSTGRESQL_VERSION/CLUSTER_NAME/environment</emphasis> (where " 20445"POSTGRESQL_VERSION is the version of PostgreSQL, e.g. 9.6 and CLUSTER_NAME " 20446"is the name of the cluster, e.g. maindb). You can also set PostGIS " 20447"environment variables here as well." 20448msgstr "" 20449 20450#. Tag: programlisting 20451#: reference_raster.xml:11539 20452#, no-c-format 20453msgid "" 20454"# environment variables for postmaster process\n" 20455"# This file has the same syntax as postgresql.conf:\n" 20456"# VARIABLE = simple_value\n" 20457"# VARIABLE2 = 'any value!'\n" 20458"# I. e. you need to enclose any value which does not only consist of " 20459"letters,\n" 20460"# numbers, and '-', '_', '.' in single quotes. Shell commands are not\n" 20461"# evaluated.\n" 20462"POSTGIS_GDAL_ENABLED_DRIVERS = 'ENABLE_ALL'\n" 20463"\n" 20464"POSTGIS_ENABLE_OUTDB_RASTERS = 1\n" 20465"\n" 20466"<emphasis role=\"strong\">GDAL_DISABLE_READDIR_ON_OPEN = 'TRUE'</emphasis>" 20467msgstr "" 20468 20469#. Tag: title 20470#: reference_raster.xml:11545 20471#, no-c-format 20472msgid "Maximum Number of Open Files" 20473msgstr "" 20474 20475#. Tag: para 20476#: reference_raster.xml:11547 20477#, no-c-format 20478msgid "" 20479"The maximum number of open files permitted by Linux and PostgreSQL are " 20480"typically conservative (typically 1024 open files per process) given the " 20481"assumption that the system is consumed by human users. For Out-DB Rasters, a " 20482"single valid query can easily exceed this limit (e.g. a dataset of 10 year's " 20483"worth of rasters with one raster for each day containing minimum and maximum " 20484"temperatures and we want to know the absolute min and max value for a pixel " 20485"in that dataset)." 20486msgstr "" 20487 20488#. Tag: para 20489#: reference_raster.xml:11551 20490#, no-c-format 20491msgid "" 20492"The easiest change to make is the following PostgreSQL setting: <ulink url=" 20493"\"https://www.postgresql.org/docs/current/static/runtime-config-resource." 20494"html#GUC-MAX-FILES-PER-PROCESS\">max_files_per_process</ulink>. The default " 20495"is set to 1000, which is far too low for Out-DB Rasters. A safe starting " 20496"value could be 65536 but this really depends on your datasets and the " 20497"queries run against those datasets. This setting can only be made on server " 20498"start and probably only in the PostgreSQL configuration file (e.g. " 20499"<emphasis>/etc/postgresql/POSTGRESQL_VERSION/CLUSTER_NAME/postgresql.conf</" 20500"emphasis> in Ubuntu environments)." 20501msgstr "" 20502 20503#. Tag: programlisting 20504#: reference_raster.xml:11554 20505#, no-c-format 20506msgid "" 20507"...\n" 20508"# - Kernel Resource Usage -\n" 20509"\n" 20510"<emphasis role=\"strong\">max_files_per_process = 65536</emphasis> " 20511"# min 25\n" 20512" # (change requires restart)\n" 20513"..." 20514msgstr "" 20515 20516#. Tag: para 20517#: reference_raster.xml:11557 20518#, no-c-format 20519msgid "" 20520"The major change to make is the Linux kernel's open files limits. There are " 20521"two parts to this:" 20522msgstr "" 20523 20524#. Tag: para 20525#: reference_raster.xml:11561 20526#, no-c-format 20527msgid "<para>Maximum number of open files for the entire system</para>" 20528msgstr "" 20529 20530#. Tag: para 20531#: reference_raster.xml:11564 20532#, no-c-format 20533msgid "<para>Maximum number of open files per process</para>" 20534msgstr "" 20535 20536#. Tag: title 20537#: reference_raster.xml:11570 20538#, no-c-format 20539msgid "<title>Maximum number of open files for the entire system</title>" 20540msgstr "" 20541 20542#. Tag: para 20543#: reference_raster.xml:11572 20544#, no-c-format 20545msgid "" 20546"You can inspect the current maximum number of open files for the entire " 20547"system with the following example:" 20548msgstr "" 20549 20550#. Tag: programlisting 20551#: reference_raster.xml:11576 20552#, no-c-format 20553msgid "" 20554"$ sysctl -a | grep fs.file-max\n" 20555"fs.file-max = 131072" 20556msgstr "" 20557 20558#. Tag: para 20559#: reference_raster.xml:11578 20560#, no-c-format 20561msgid "" 20562"If the value returned is not large enough, add a file to <emphasis>/etc/" 20563"sysctl.d/</emphasis> as per the following example:" 20564msgstr "" 20565 20566#. Tag: programlisting 20567#: reference_raster.xml:11582 20568#, no-c-format 20569msgid "" 20570"$ echo \"fs.file-max = 6145324\" >> /etc/sysctl.d/fs.conf\n" 20571"\n" 20572"$ cat /etc/sysctl.d/fs.conf\n" 20573"fs.file-max = 6145324\n" 20574"\n" 20575"$ sysctl -p --system\n" 20576"* Applying /etc/sysctl.d/fs.conf ...\n" 20577"fs.file-max = 2097152\n" 20578"* Applying /etc/sysctl.conf ...\n" 20579"\n" 20580"$ sysctl -a | grep fs.file-max\n" 20581"fs.file-max = 6145324" 20582msgstr "" 20583 20584#. Tag: title 20585#: reference_raster.xml:11586 20586#, no-c-format 20587msgid "<title>Maximum number of open files per process</title>" 20588msgstr "" 20589 20590#. Tag: para 20591#: reference_raster.xml:11588 20592#, no-c-format 20593msgid "" 20594"We need to increase the maximum number of open files per process for the " 20595"PostgreSQL server processes." 20596msgstr "" 20597 20598#. Tag: para 20599#: reference_raster.xml:11592 20600#, no-c-format 20601msgid "" 20602"To see what the current PostgreSQL service processes are using for maximum " 20603"number of open files, do as per the following example (make sure to have " 20604"PostgreSQL running):" 20605msgstr "" 20606 20607#. Tag: programlisting 20608#: reference_raster.xml:11596 20609#, no-c-format 20610msgid "" 20611"$ ps aux | grep postgres\n" 20612"postgres 31713 0.0 0.4 179012 17564 pts/0 S Dec26 0:03 /home/" 20613"dustymugs/devel/postgresql/sandbox/10/usr/local/bin/postgres -D /home/" 20614"dustymugs/devel/postgresql/sandbox/10/pgdata\n" 20615"postgres 31716 0.0 0.8 179776 33632 ? Ss Dec26 0:01 postgres: " 20616"checkpointer process\n" 20617"postgres 31717 0.0 0.2 179144 9416 ? Ss Dec26 0:05 postgres: " 20618"writer process\n" 20619"postgres 31718 0.0 0.2 179012 8708 ? Ss Dec26 0:06 postgres: " 20620"wal writer process\n" 20621"postgres 31719 0.0 0.1 179568 7252 ? Ss Dec26 0:03 postgres: " 20622"autovacuum launcher process\n" 20623"postgres 31720 0.0 0.1 34228 4124 ? Ss Dec26 0:09 postgres: " 20624"stats collector process\n" 20625"postgres 31721 0.0 0.1 179308 6052 ? Ss Dec26 0:00 postgres: " 20626"bgworker: logical replication launcher\n" 20627"\n" 20628"$ cat /proc/31718/limits\n" 20629"Limit Soft Limit Hard Limit Units\n" 20630"Max cpu time unlimited unlimited seconds\n" 20631"Max file size unlimited unlimited bytes\n" 20632"Max data size unlimited unlimited bytes\n" 20633"Max stack size 8388608 unlimited bytes\n" 20634"Max core file size 0 unlimited bytes\n" 20635"Max resident set unlimited unlimited bytes\n" 20636"Max processes 15738 15738 " 20637"processes\n" 20638"<emphasis role=\"strong\">Max open files 1024 " 20639"4096 files</emphasis>\n" 20640"Max locked memory 65536 65536 bytes\n" 20641"Max address space unlimited unlimited bytes\n" 20642"Max file locks unlimited unlimited locks\n" 20643"Max pending signals 15738 15738 signals\n" 20644"Max msgqueue size 819200 819200 bytes\n" 20645"Max nice priority 0 0\n" 20646"Max realtime priority 0 0\n" 20647"Max realtime timeout unlimited unlimited us" 20648msgstr "" 20649 20650#. Tag: para 20651#: reference_raster.xml:11598 20652#, no-c-format 20653msgid "" 20654"In the example above, we inspected the open files limit for Process 31718. " 20655"It doesn't matter which PostgreSQL process, any of them will do. The " 20656"response we are interested in is <emphasis>Max open files</emphasis>." 20657msgstr "" 20658 20659#. Tag: para 20660#: reference_raster.xml:11602 20661#, no-c-format 20662msgid "" 20663"We want to increase <emphasis>Soft Limit</emphasis> and <emphasis>Hard " 20664"Limit</emphasis> of <emphasis>Max open files</emphasis> to be greater than " 20665"the value we specified for the PostgreSQL setting " 20666"<varname>max_files_per_process</varname>. In our example, we set " 20667"<varname>max_files_per_process</varname> to 65536." 20668msgstr "" 20669 20670#. Tag: para 20671#: reference_raster.xml:11606 20672#, no-c-format 20673msgid "" 20674"In Ubuntu (and assuming you are using PostgreSQL's packages for Ubuntu), the " 20675"easiest way to change the <emphasis>Soft Limit</emphasis> and <emphasis>Hard " 20676"Limit</emphasis> is to edit <emphasis role=\"strong\">/etc/init.d/" 20677"postgresql</emphasis> (SysV) or <emphasis role=\"strong\">/lib/systemd/" 20678"system/postgresql*.service</emphasis> (systemd)." 20679msgstr "" 20680 20681#. Tag: para 20682#: reference_raster.xml:11610 20683#, no-c-format 20684msgid "" 20685"Let's first address the SysV Ubuntu case where we add <emphasis role=\"strong" 20686"\">ulimit -H -n 262144</emphasis> and <emphasis role=\"strong\">ulimit -n " 20687"131072</emphasis> to <emphasis role=\"strong\">/etc/init.d/postgresql</" 20688"emphasis>." 20689msgstr "" 20690 20691#. Tag: programlisting 20692#: reference_raster.xml:11614 20693#, no-c-format 20694msgid "" 20695"...\n" 20696"case \"$1\" in\n" 20697" start|stop|restart|reload)\n" 20698" if [ \"$1\" = \"start\" ]; then\n" 20699" create_socket_directory\n" 20700" fi\n" 20701" if [ -z \"`pg_lsclusters -h`\" ]; then\n" 20702" log_warning_msg 'No PostgreSQL clusters exist; see \"man " 20703"pg_createcluster\"'\n" 20704" exit 0\n" 20705" fi\n" 20706"<emphasis role=\"strong\">\n" 20707" ulimit -H -n 262144\n" 20708" ulimit -n 131072\n" 20709"</emphasis>\n" 20710" for v in $versions; do\n" 20711" $1 $v || EXIT=$?\n" 20712" done\n" 20713" exit ${EXIT:-0}\n" 20714" ;;\n" 20715" status)\n" 20716"..." 20717msgstr "" 20718 20719#. Tag: para 20720#: reference_raster.xml:11616 20721#, no-c-format 20722msgid "" 20723"Now to address the systemd Ubuntu case. We will add <emphasis role=\"strong" 20724"\">LimitNOFILE=131072</emphasis> to every <emphasis role=\"strong\">/lib/" 20725"systemd/system/postgresql*.service</emphasis> file in the <emphasis role=" 20726"\"strong\">[Service]</emphasis> section." 20727msgstr "" 20728 20729#. Tag: programlisting 20730#: reference_raster.xml:11620 20731#, no-c-format 20732msgid "" 20733"...\n" 20734"[Service]\n" 20735"<emphasis role=\"strong\">\n" 20736"LimitNOFILE=131072\n" 20737"</emphasis>\n" 20738"...\n" 20739"\n" 20740"[Install]\n" 20741"WantedBy=multi-user.target\n" 20742"..." 20743msgstr "" 20744 20745#. Tag: para 20746#: reference_raster.xml:11622 20747#, no-c-format 20748msgid "" 20749"After making the necessary systemd changes, make sure to reload the daemon" 20750msgstr "" 20751 20752#. Tag: programlisting 20753#: reference_raster.xml:11626 20754#, no-c-format 20755msgid "systemctl daemon-reload" 20756msgstr "" 20757 20758#~ msgid "ST_MapAlgebra" 20759#~ msgstr "ST_MapAlgebra" 20760 20761#~ msgid "" 20762#~ "<funcdef>record <function>ST_BandMetaData</function></funcdef> " 20763#~ "<paramdef><type>raster </type><parameter>rast</parameter></paramdef> " 20764#~ "<paramdef choice=\"opt\"><type>integer </type><parameter>bandnum=1</" 20765#~ "parameter></paramdef>" 20766#~ msgstr "" 20767#~ "<funcdef>record <function>ST_BandMetaData</function></funcdef> " 20768#~ "<paramdef><type>raster </type><parameter>rast</parameter></paramdef> " 20769#~ "<paramdef choice=\"opt\"><type>integer </type><parameter>bandnum=1</" 20770#~ "parameter></paramdef>" 20771 20772#~ msgid "" 20773#~ "<funcdef>geometry <function>ST_PixelAsPoints</function></funcdef> " 20774#~ "<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 20775#~ "<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 20776#~ "parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 20777#~ "<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 20778#~ msgstr "" 20779#~ "<funcdef>geometry <function>ST_PixelAsPoints</function></funcdef> " 20780#~ "<paramdef><type>raster </type> <parameter>rast</parameter></paramdef> " 20781#~ "<paramdef choice=\"opt\"><type>integer </type> <parameter>band=1</" 20782#~ "parameter></paramdef> <paramdef choice=\"opt\"><type>boolean </type> " 20783#~ "<parameter>exclude_nodata_value=TRUE</parameter></paramdef>" 20784 20785#~ msgid "JPEG Output Examples" 20786#~ msgstr "Esempio di uscita JPEG" 20787