Git Product home page Git Product logo

Comments (14)

paumas avatar paumas commented on July 28, 2024

Taip, tu visiškai teisus. Anksčiau mes naudojome TileStash, o jau kažkur metus jau naudojame Tegola, tad docker kontaineriai nėra sutvarkyti.

from vector-map.

tomass avatar tomass commented on July 28, 2024

Jei jūs sutvarkysite softo pakėlimo dalį - aš galėsiu pažiūrėti/pakomentuoti, ką reikia duombazėje padaryti, kad viskas gražiai pakiltų.

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

@tomass could not register providers: error fetching geometry type for layer (landuse8): ERROR: relation "gen_forest" does not exist (SQLSTATE 42P01)

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

gen_building.sql irgi failina:

psql:/src/db/gen_building.sql:76: ERROR:  function stc_simplify_building(geometry, integer) does not exist
LINE 1: ... gen_building set status = 'DONE', way = st_multi(stc_simpli...

from vector-map.

tomass avatar tomass commented on July 28, 2024

landuse8 sluoksniui reikia gen_forest lentos, kurioje yra generalizuoti miškai.
Iš principo po pirmo duomenų importo į db reikia paleisti generalizacijos funkcionalumą:

gen_way.sql
gen_water.sql
gen_building.sql
gen_forest.sql
gen_protected.sql

Jį reikia periodiškai iš naujo paleisti (atnaujinti). Bet šitie veiksmai užima nemažai laiko, tai tarkim openmap.lt atveju jie daromi tik kas savaitę.

Norint paleisti gen_buildiing reikia sudiegti funkcijas, kurios yra aplanke „db/func“. Iš principo reikia sudiegti visas funkcijas iš „func“ aplanko. sukurti visas lenteles ir mview'us iš „db/tables“ aplanko.

Ir čia dar ne viskas :-) Dar reikia po db atnaujinimo paleisti „db/update_water_label.sql“, kuri atnaujins vandens telkinių kartografines (išlankstytas pagal geometriją) etiketes. Jos kol kas turistiniame stiliuje (map.json) nenaudojamos (naudojamos topografiniame ir upių stiliuose), bet kaladėlėse ši info yra, tai be šitos info tegola skųsis (alternatyviai galima tegoloje atjungti sluoksnius labels_c ir labels_p)

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

Pridėjau docker exec -u postgres $CONTAINER_DB sh -c 'cat /src/db/func/*.sql | psql osm -f -'
Bandau generuoti building, ziuresiu kaip forest poto elgsis; Pastebejau kad kaikurie iš jų lėti...

https://github.com/openmaplt/vector-map/pull/293/files#diff-6f52613feaa16005aa471443d8ed37d4R14

#293

from vector-map.

tomass avatar tomass commented on July 28, 2024

Lėti, nes toks jau tas daiktas generalizacija. Bet be jos smulkesniuose masteliuose arba reikia atsisakyti braižyti kai kuriuos objektų tipus, arba kaladėlės žiauriai apsikrauna (kaladėlės dydis pradeda siekti 1-2Mb) ir tada tik patys naujausi greičiausi telefonai sugeba parodyti žemėlapį.

from vector-map.

xor22h avatar xor22h commented on July 28, 2024
psql:/src/db/gen_building.sql:180: NOTICE:  === Invalid geometry for gen_building.id=2921514
DO
UPDATE 820485
DELETE 455853
UPDATE 3241317
psql:/src/db/gen_building.sql:190: ERROR:  syntax error at or near ";"
LINE 1: drop function gen_building_temp;

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

@tomass praejau buildings ir forest, ir kitas gen. Dabar beda coastline.

matau yra scriptas

#!/bin/bash
wget http://data.openstreetmapdata.com/water-polygons-split-3857.zip
unzip water-polygons-split-3857.zip
shp2pgsql -s 3857 -dDI water-polygons-split-3857/water_polygons.shp coastline_tmp | psql gis
rm -rf water-polygons-split-3857*
psql gis < recreate_coastline.sql
pg_dump gis -t coastline -c > coastline.sql
rm coastline.sql.bz2
bzip2 coastline.sql

bet gaunu 404

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

radau kitoje vietoje: https://osmdata.openstreetmap.de/download/coastlines-split-3857.zip Tikiuosi tai ko reikia :D

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

Correct file: https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip

from vector-map.

xor22h avatar xor22h commented on July 28, 2024

Radau kad coastline.sql.bz2 repositorijoje yra, bet:

SET
SET
SET
SET
SET
 set_config 
------------
 
(1 row)

SET
SET
SET
ERROR:  index "coastline_geometry" does not exist
ERROR:  table "coastline" does not exist
SET
SET
CREATE TABLE
ERROR:  role "tomas" does not exist
COPY 37
CREATE INDEX

Docker'is jokio Tomas nepazysta. :(

from vector-map.

tomass avatar tomass commented on July 28, 2024

ERROR dėl „index/table does not exist“ - nes leidžiama pirmą kartą, o automatiškai sugeneruotame skripte neįdėti „IF EXISTS“.
role „tomas“ does not exist, kiek matau dėl šitos eilutės:
ALTER TABLE public.coastline OWNER TO tomas;
Žodžiu irgi galima ignoruoti. Toliau matosi „COPY 37“ reiškia ir lentą sukūrė, ir duomenis sudėjo (žodžiu viskas turėtų veikti).
Aš pabandysiu naujai atsiųstą vandens poligonų failą (ačiū už nuorodą) ir įdėsiu naujai sugeneruotą coastline.sql.bz2

from vector-map.

tomass avatar tomass commented on July 28, 2024

Šitas ištaiso nuorodą į vandens duomenų failą ir atnaujina coastline duomenis.
#295

from vector-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.