[I3geo-OSGEO] Exemplo .MAP - Exibir imagem RASTER vindo do POSTGIS
Germano Jucá
germano.canix em gmail.com
Segunda Novembro 14 10:49:03 PST 2016
Estou tentando conectar um arquivo .map numa tabela do Postgres migrada a
partir de uma imagem .tif. Usei o executável raster2pgsql para gerar a
tabela e inserir os dados.
Quero exibir essa imagem de satélite convertida na interface Google Maps do
I3GEO.
*ARQUIVO .MAP:*
MAP
FONTSET "../symbols/fontes.txt"
SYMBOLSET "../symbols/simbolosv6.sym"
LAYER
NAME teste
TYPE raster
METADATA
"wms_title" "teste"
END
STATUS ON
DATA "PG:host=localhost port=5432 dbname='cogerh' user='postgres'
password='postgres' schema='public' table='teste'"
PROCESSING "NODATA=-9999"
PROCESSING "SCALE=AUTO"
END
END
*TABELA DO BANCO:*
CREATE TABLE teste
(
rid serial NOT NULL,
rast raster,
CONSTRAINT teste_pkey PRIMARY KEY (rid),
CONSTRAINT enforce_height_rast CHECK (st_height(rast) = 4999),
CONSTRAINT enforce_max_extent_rast CHECK (st_envelope(rast) @
'0103000020E61000000100000005000000AE6E314C3EC5124132B763D2CE626241AE6E314C3EC512413A0904D0036F6241B3AF3B00DE4B14413A0904D0036F6241B3AF3B00DE4B144132B763D2CE626241AE6E314C3EC5124132B763D2CE626241'::geometry),
CONSTRAINT enforce_nodata_values_rast CHECK
(_raster_constraint_nodata_values(rast) =
'{NULL,NULL,NULL,NULL,NULL}'::numeric[]),
CONSTRAINT enforce_num_bands_rast CHECK (st_numbands(rast) = 5),
CONSTRAINT enforce_out_db_rast CHECK (_raster_constraint_out_db(rast) =
'{f,f,f,f,f}'::boolean[]),
CONSTRAINT enforce_pixel_types_rast CHECK
(_raster_constraint_pixel_types(rast) =
'{8BUI,8BUI,8BUI,8BUI,8BUI}'::text[]),
CONSTRAINT enforce_same_alignment_rast CHECK (st_samealignment(rast,
'0100000000AB93774E02011440AB93774E020114C0AE6E314C3EC512413A0904D0036F624100000000000000000000000000000000E610000001000100'::raster)),
CONSTRAINT enforce_scalex_rast CHECK (round(st_scalex(rast)::numeric, 10)
= round(5.00098536114539, 10)),
CONSTRAINT enforce_scaley_rast CHECK (round(st_scaley(rast)::numeric, 10)
= round(- 5.00098536114539, 10)),
CONSTRAINT enforce_srid_rast CHECK (st_srid(rast) = 4326),
CONSTRAINT enforce_width_rast CHECK (st_width(rast) = 4999)
)
WITH (
OIDS=FALSE
);
ALTER TABLE teste
OWNER TO postgres;
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.osgeo.org/pipermail/i3geo/attachments/20161114/0dbe2f7b/attachment.html>
Mais detalhes sobre a lista de discussão i3geo