Utilização de Banco de dados espacial para aplicações em Saneamento

Narcélio de Sá
Analista de Geoprocessamento - CAGECE




Desenvolver e implantar uma solução baseada em inteligência geográfica para a gestão de cadastro compreendendo a obtenção e atualização de informações comerciais e técnicas de redes de água e esgoto numa base de dados georreferenciada integrada para utilização pelas diversas áreas da Companhia.
Objetivo do Projeto:



Melhorar a confiabilidade do cadastro da Cagece:
Benefícios do Projeto:




Cadastro de Redes de Água
Cadastro de Clientes
Cadastro de Redes de Esgoto
Cadastro de Equipamentos


Possibilitar a integração com outros sistemas da Cagece, tais como: Prax,Siscope, ERP, COA, COE, etc.
Possibilitar simulação de situações de rede.
Benefícios do Projeto:





Etapas de trabalho para
estruturação do Cadastro em GIS:
1ª Etapa
2ª Etapa
3ª Etapa
Conversão, Adequação
e atualização
da Base Cadastral
Controle de
Qualidade
Edição, Processamento e Análise
específica para Saneamento



Infraestrutura Atual:



Interface do usuário
Banco de Dados
Web Service
QGIS
PostgreSQL + PostGIS
Geoserver
Infraestrutura Open Source



Infraestrutura Atual:



Infraestrutura Open Source













Banco de Dados Espacial



O que é um banco de dados?
Uma das definições de banco de dados afirma que se trata de uma coleção de informações que se relacionam de modo que criem algum sentido, isto é, é uma estrutura bem organizada de dados que permite a extração de informações. Assim, são muito importantes para empresas e tornaram-se a principal peça dos sistemas de informação.



PostgreSQL
O PostgreSQL é um projeto open source coordenado pelo PostgreSQL Global Development Group.

1982 - Projeto Ingres, desenvolvido na Universidade de Berkeley, Califórnia.
1986 - Nasce o projeto pós-Ingres com o objetivo de resolver problemas com o modelo de banco de dados relacional.
1993 - O projeto é abandonado pela Universidade de Berkeley.
1994 - O projeto foi renomeado para Postgres95 como software open source.


PostgreSQL
1996 - o projeto foi renomeado para PostgreSQL , na sua versão 6.0
2017 - Lançada a versão 10.1 do PostgreSQL.
É considerado um dos SGBDs de código aberto mais avançados do mundo.











Porque o PostgreSQL?



Funcionalidades
Desempenho
Custo
Escalabilidade


“Enterprise” | 1 Dual-Core | 2 Quad-Core |
---|---|---|
Oracle | $40,000 | $160,000 |
IBM DB2 | $36,400 | $145,600 |
MS SQL Server | $25,000 | $50,000 |
IBM Informix | $50,000 | $200,000 |
PostgreSQL | $0 | $0 |
2007
Custo do hardware $5,000
Custo do banco de dados $50,000
1997
Custo do hardware $50,000
Custo do banco de dados $50,000


Porque o PostgreSQL?
- Consultas complexas
- Chaves estrangeiras
- Integridade transacional
- Controle de concorrência multi-versão
- Suporte ao modelo híbrido objeto-relacional
- Ele tem facilidade de Acesso
- Gatilhos
- Visões
- Linguagem Procedural em várias linguagens (PL/pgSQL, PL/Python, PL/Java, PL/Perl) para Procedimentos armazenados
- Indexação por texto
- Estrutura para guardar dados Georeferenciados PostGIS


Postgis
O PostGIS é uma extensão espacial gratuita e de código fonte livre que implementa a especificação padrão da Open Geospatial Consortium (OGC).
Permite o uso de objetos GIS (Sistemas de Informação Geográfica) ser armazenado em banco de dados.
PostGIS inclui suporte para índices espaciais GiST e R-Tree, além de funções para análise básica e processamento de objetos GIS.



Geometrias Suportadas
O PostGIS suporta os seguintes tipos de Geometrias especificados pela OGC:
Point;
Linestring;
Polygon;
Multipoint;
Multilinestring;
Multipolygon;
GeometryCollection.

Cases de Estudo


Projeto de Cadastro Georreferenciado
CAGECE - IGEO



O que é o Geocoding
A geocodificação é o processo de converter endereços (como nome da rua e número) em coordenadas geográficas (latitude e longitude) que permitem a inserção de marcadores de local em um mapa ou o posicionamento do mapa.



A geocodificação é uma tarefa que envolve múltiplos conjuntos de dados e processos, todos os quais trabalham em conjunto. Um geocodificador é composto por dois componentes importantes: um conjunto de dados de referência e o algoritmo de geocodificação.
Serviços de Geocodificação:
Google
Mapbox
Here
BingMaps
CloudMade



Como Funciona o Geocoding
Entrada dos dados: Lista de endereços
Consulta: Verificação da relação entre os endereços enviados e os presentes na base de referência
Resultado: Lat , Long



Precisão do resultado

"ROOFTOP"
"RANGE_INTERPOLATED"
"GEOMETRIC_CENTER"
"APPROXIMATE"
*Google API location_type


Precisão do resultado

"ROOFTOP"
"RANGE_INTERPOLATED"
"GEOMETRIC_CENTER"
"APPROXIMATE"
*Google API location_type


Precisão do resultado

"ROOFTOP"
"RANGE_INTERPOLATED"
"GEOMETRIC_CENTER"
"APPROXIMATE"
*Google API location_type


Precisão do resultado
"ROOFTOP"
"RANGE_INTERPOLATED"
"GEOMETRIC_CENTER"
"APPROXIMATE"
*Google API location_type



Desafios do Geocoding
Formatação do Endereço
Consultas ambíguas
Dependência de Base de dados Externa
Custo benefício do serviço
Av. Dr. Lauro Vieira Chaves, 1030 Vila União, Fortaleza – CE, 60420-280
6289
9%
6289
Logradouros não amigáveis ao geocoding.(S.D.O, SDO , ST-,RUA DISPONÍVEL )
dos Logradouros cadastrados no PRAX
Imóveis não localizáveis


Georreferenciamento por interpolação IGEO-PRAX




Metodologia
Campo:
Medição dos Lotes
Geração do Overlay
Cadastro no PRAX


Escritório:
Carga dos dados do PRAX
Geração de perímetro de Referência
Interpolação dos dados
Controle de Qualidade


Medição dos Lotes

Rua Coronel Jucá
R. Henriqueta Galeno
R. Beni Carvalho
R. Monsenhor Catão
UNIDADE: UNMTL
SETOR: 6
QUADRA: 7


Geração dos Overlays




Geração de perímetro de Referência

Rua Coronel Jucá
R. Henriqueta Galeno
R. Beni Carvalho
R. Monsenhor Catão


Interpolação dos dados dos lotes

Rua Coronel Jucá
R. Henriqueta Galeno
R. Beni Carvalho
R. Monsenhor Catão
759
749
739
731
719
709
sn
738
750
762
768
780
796
1396
1704
1720


Controle de Qualidade

Rua Coronel Jucá
R. Henriqueta Galeno
R. Beni Carvalho
R. Monsenhor Catão
759
719
709
sn


Imóvel 759


Georreferenciamento por interpolação IGEO-PRAX




Trigger para georreferenciamento de clientes


Resultados:
Agilidade / Precisão no Cadastro
Integração com o PRAX
Atualização semiautomática
Dados podem ser disponibilizados em json via Geoserver:
http://172.25.131.53:8080/geoserver/IGEO/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=IGEO:ponto_imovel&CQL_FILTER=IMO_COD_INSCRICAO=265381&outputFormat=application%2Fjson
Fatores de complicação:
Problemas no cadastro dos lotes no PRAX
Comunicação entre o PRAX e o IGEO



Dados do geocoding Google
Setores (7,8,9,10)
PRAX: 10.457
Google: 3.845
Resultado: 36,76 %



Dados do geocoding IGEO
Setores (7,8,9,10)
PRAX: 10.457
IGEO: 9.846
Resultado: 94,15 %



Dados do geocoding Google
Setores (7,8,9,10)



Dados do geocoding IGEO
Setores (7,8,9,10)


1196495
230000
21
22
9
IMÓVEIS CAPITAL
IMÓVEIS IGEO
% MAPEADO
DIAS DE TRABALHO
ESTAGIÁRIOS
Números Maio/2017


1196495
1115608
96
154
14
IMÓVEIS CAPITAL
IMÓVEIS IGEO
% MAPEADO
DIAS DE TRABALHO
ESTAGIÁRIOS
Números Novembro /2017





Integração com os sistemas Cagece



Mapa dos serviços executados



Mapa dos serviços executados



Monitorar OS



Cadastro de Redes




Mapa das redes de Água da RMF



Cadastro de atributos da rede de água



Mapa das redes de Esgoto da RMF



Cadastro de atributos da rede de esgoto



Arqueologia Cartográfica



Verificação de Fluxo de rede



Verificação de Fluxo de rede



Verificação de Fluxo de rede


Integração com o EPANET










Simulação de Perda de carga
Situação Atual



Simulação de Perda de carga
Com empreendimentos



Simulação de Perda de carga
Com empreendimentos + Melhorias na Rede


Perspectivas Futuras...



Obrigado

GISday UFC 2017
By Narcélio de Sá Pereira Filho
GISday UFC 2017
- 433