@0e1 o sql_view abaixo está correto? Não sei como adicionar uma variável com espaço
sql_view: |-
SELECT gid, tipo de lo || ' ' || logradouro AS via_name, numero do AS house_number, geom FROM $(tabname)
------ BR-PI-Teresina ------
------ Layer tipo geoaddress_full ------
-- Incluindo dados do arquivo-1 do package-7600004501101 na base ingest1 --
Nome-hash do arquivo-1: 6d00a6246765ac93ce682e94282ecc0ed38cfdc1e7a6e936f53341414fd5269a.zip
Tabela do layer: pk7600004501101_p1_geoaddress
Sub-arquivos do arquivo-1 com o conteúdo alvo: Lotes_endereco
Tema dos sub-arquivos: Geo-endereços
Run with tmux and sudo! (DANGER: seems not idempotent on psql)
luis
Above user is root? If not, you have permissions for all paths?
[Press ENTER to continue or Ctrl+C to quit]
psql postgres://postgres@localhost/ingest1 -c "DROP TABLE IF EXISTS pk7600004501101_p1_geoaddress CASCADE"
DROP TABLE
Extracting ....
cd /tmp/sandbox/_pkBR451_001; 7z x -y /var/www/preserv.addressforall.org/download/6d00a6246765ac93ce682e94282ecc0ed38cfdc1e7a6e936f53341414fd5269a.zip "Lotes_endereco" ; chmod -R a+rwx . > /dev/null
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs DO-Regular (306F2),ASM,AES-NI)
Scanning the drive for archives:
1 file, 13201744 bytes (13 MiB)
Path = /var/www/preserv.addressforall.org/download/6d00a6246765ac93ce682e94282ecc0ed38cfdc1e7a6e936f53341414fd5269a.zip
Type = zip
Physical Size = 13201744
Everything is Ok
Files: 6
Size: 534146239
Compressed: 13201744
Conferindo se SRID 31983 está configurado:
[Press ENTER to continue or Ctrl+C to quit]
Executando shp2pgsql ...
cd /tmp/sandbox/_pkBR451_001; shp2pgsql -D -s 31983 "Lotes_endereco.shp" pk7600004501101_p1_geoaddress | psql -q postgres://postgres@localhost/ingest1 2> /dev/null
Field id is an FTDouble with width 24 and precision 15
Field numero do is an FTDouble with width 24 and precision 15
Shapefile type: MultiPoint
Postgis type: MULTIPOINT[2]
addgeometrycolumn
psql postgres://postgres@localhost/ingest1 -c "CREATE VIEW vw1_pk7600004501101_p1_geoaddress AS SELECT gid, tipo de lo || ' ' || logradouro AS via_name, numero do AS house_number, geom FROM pk7600004501101_p1_geoaddress"
ERROR: syntax error at or near "lo"
LINE 1: ...600004501101_p1_geoaddress AS SELECT gid, tipo de lo || ' ' ...
^
make: *** [makefile:67: geoaddress] Error 1
@0e1 o sql_view abaixo está correto? Não sei como adicionar uma variável com espaço