Git Product home page Git Product logo

Comments (1)

JinIgarashi avatar JinIgarashi commented on September 23, 2024

I just checked vectortiles by QGIS, and data is no problem. All of pipe length data is inside vectortiles.

image

The result of the following SQL is also OK.

vt/config.js

Lines 491 to 527 in 53d37ba

pipeline_year as (
SELECT
z.wss_id,
CASE WHEN z.pipe_length_lt_5_years IS NULL THEN '' ELSE '<=5year: ' || z.pipe_length_lt_5_years || E' m\n' END ||
CASE WHEN z.pipe_length_lt_10_years IS NULL THEN '' ELSE '<=10year: ' || z.pipe_length_lt_10_years || E' m\n' END ||
CASE WHEN z.pipe_length_lt_15_years IS NULL THEN '' ELSE '<=15year: ' || z.pipe_length_lt_15_years || E' m\n' END ||
CASE WHEN z.pipe_length_lt_20_years IS NULL THEN '' ELSE '<=20year: ' || z.pipe_length_lt_20_years || E' m\n' END ||
CASE WHEN z.pipe_length_gt_20_years IS NULL THEN '' ELSE '20<year: ' || z.pipe_length_gt_20_years || E' m\n' END ||
CASE WHEN z.pipe_length_unknown_years IS NULL THEN '' ELSE 'Unknown: ' || z.pipe_length_unknown_years || E' m\n' END as pipe_length
FROM(
SELECT
y.wss_id,
SUM(CASE WHEN y.diff_const_year BETWEEN 0 AND 5 THEN round(pipe_length,2) END) as pipe_length_lt_5_years,
SUM(CASE WHEN y.diff_const_year BETWEEN 6 AND 10 THEN round(pipe_length,2) END) as pipe_length_lt_10_years,
SUM(CASE WHEN y.diff_const_year BETWEEN 11 AND 15 THEN round(pipe_length,2) END) as pipe_length_lt_15_years,
SUM(CASE WHEN y.diff_const_year BETWEEN 16 AND 20 THEN round(pipe_length,2) END) as pipe_length_lt_20_years,
SUM(CASE WHEN y.diff_const_year > 20 THEN round(pipe_length,2) END) as pipe_length_gt_20_years,
SUM(CASE WHEN y.diff_const_year IS NULL THEN round(pipe_length,2) END) as pipe_length_unknown_years
FROM (
SELECT
x.wss_id,
x.diff_const_year,
sum(x.pipe_length) as pipe_length
FROM (
SELECT
pipeline.wss_id,
cast(to_char(current_timestamp, 'YYYY') as integer) - COALESCE(pipeline.rehabilitation_year, pipeline.construction_year) as diff_const_year,
cast(ST_LENGTH(ST_TRANSFORM(pipeline.geom, 32736)) as numeric) as pipe_length
FROM pipeline
INNER JOIN wss ON pipeline.wss_id = wss.wss_id
) x
GROUP BY
x.wss_id,
x.diff_const_year) y
GROUP BY
y.wss_id
)z

I am not very sure why all of text can't appear in popup. But I suspect it is matter of mapbox-gl-popup plugin.

from vt.

Related Issues (6)

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.