2 402
edições
(view v002) |
|||
Linha 96: | Linha 96: | ||
Column | Type | Collation | Nullable | Default | Column | Type | Collation | Nullable | Default | ||
---------------+-------------+-----------+----------+--------- | ---------------+-------------+-----------+----------+--------- | ||
| bit varying | | | | |||
isolabel_ext | text | | | | isolabel_ext | text | | | | ||
cindex | text | | | | cindex | text | | | | ||
Linha 110: | Linha 110: | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
DROP view if exists report.v002_osmc_coverage_l0_geoms | |||
; | |||
CREATE VIEW report.v002_osmc_coverage_l0_geoms AS | CREATE VIEW report.v002_osmc_coverage_l0_geoms AS | ||
select isolabel_ext,cbits, | select row_number() OVER (ORDER BY cbits) AS gid, *, | ||
isolabel_ext ||'+'||cbits_b16 as afacode | |||
from ( | |||
select isolabel_ext,cbits, | |||
natcod.vbit_to_baseh(substring(cbits,11)::bit varying, 16) AS cbits_b16, | natcod.vbit_to_baseh(substring(cbits,11)::bit varying, 16) AS cbits_b16, | ||
geom_srid4326 | geom_srid4326 | ||
from osmc.coverage where is_country and isolabel_ext IN ('BR','CO','CM') | |||
) t | |||
; | ; | ||
</syntaxhighlight> | </syntaxhighlight>Resultado da view no QGIS: | ||
[[Arquivo:Report v002.png|centro|semmoldura|620x620px]] | |||
== Ver também == | ===Sem recorte=== | ||
* [[osmc:Metodologia/Algoritmo SQL/Issues]] | ... | ||
==Ver também == | |||
*[[osmc:Metodologia/Algoritmo SQL/Issues]] | |||
------ | ------ |
edições