{"id":7373,"date":"2018-09-27T07:30:31","date_gmt":"2018-09-27T10:30:31","guid":{"rendered":"http:\/\/www.fernandoquadro.com.br\/html\/?p=7373"},"modified":"2018-09-21T09:22:20","modified_gmt":"2018-09-21T12:22:20","slug":"o-elemento-channelselection-agora-aceita-expressoes-no-sld","status":"publish","type":"post","link":"https:\/\/www.fernandoquadro.com.br\/html\/2018\/09\/27\/o-elemento-channelselection-agora-aceita-expressoes-no-sld\/","title":{"rendered":"O elemento ChannelSelection agora aceita express\u00f5es no SLD"},"content":{"rendered":"<p>A partir do GeoServer 2.14-RC \u200b\u200b\u00e9 poss\u00edvel que sejam utilizadas express\u00f5es em elementos SourceChannelName quando voc\u00ea estiver criando seu estilo SLD para uma camada raster, permitindo assim a sele\u00e7\u00e3o din\u00e2mica de canais. Isso \u00e9 uma boa not\u00edcias para qualquer pessoa que esteja criando aplicativos que exibam dados multiespectrais ou hiperespectrais, evitando assim a necessidade de construir muitos estilos diferentes para as v\u00e1rias combina\u00e7\u00f5es de cores que lhe possam ser interessantes.<\/p>\n<p>Aqui est\u00e1 um exemplo de SLD:<\/p>\n<pre>\r\n&lt;RasterSymbolizer&gt;\r\n&nbsp;&nbsp;&lt;ChannelSelection&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;RedChannel&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SourceChannelName&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Function&nbsp;name=\"env\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Literal&gt;B1&lt;\/ogc:Literal&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Literal&gt;2&lt;\/ogc:Literal&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/ogc:Function&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/SourceChannelName&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/RedChannel&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;GreenChannel&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SourceChannelName&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Function&nbsp;name=\"env\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Literal&gt;B2&lt;\/ogc:Literal&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Literal&gt;5&lt;\/ogc:Literal&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/ogc:Function&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/SourceChannelName&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/GreenChannel&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;BlueChannel&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SourceChannelName&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Function&nbsp;name=\"env\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Literal&gt;B3&lt;\/ogc:Literal&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ogc:Literal&gt;7&lt;\/ogc:Literal&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/ogc:Function&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/SourceChannelName&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/BlueChannel&gt;\r\n&nbsp;&nbsp;&lt;\/ChannelSelection&gt;\r\n&lt;RasterSymbolizer&gt;\r\n<\/pre>\n<p>Fonte: <a href=\"http:\/\/blog.geoserver.org\/2018\/08\/28\/geoserver-2-14-rc-released\/\" rel=\"noopener\" target=\"_blank\">GeoServer Blog<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A partir do GeoServer 2.14-RC \u200b\u200b\u00e9 poss\u00edvel que sejam utilizadas express\u00f5es em elementos SourceChannelName quando voc\u00ea estiver criando seu estilo SLD para uma camada raster, permitindo assim a sele\u00e7\u00e3o din\u00e2mica de canais. Isso \u00e9 uma boa not\u00edcias para qualquer pessoa&#8230; <a class=\"more-link\" href=\"https:\/\/www.fernandoquadro.com.br\/html\/2018\/09\/27\/o-elemento-channelselection-agora-aceita-expressoes-no-sld\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":275,"featured_media":7376,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[187,214],"class_list":["post-7373","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gis","tag-raster","tag-sld"],"_links":{"self":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts\/7373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/users\/275"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/comments?post=7373"}],"version-history":[{"count":2,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts\/7373\/revisions"}],"predecessor-version":[{"id":7375,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/posts\/7373\/revisions\/7375"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/media\/7376"}],"wp:attachment":[{"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/media?parent=7373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/categories?post=7373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fernandoquadro.com.br\/html\/wp-json\/wp\/v2\/tags?post=7373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}