3liz / lizmap-pgrouting-module

PgRouting module for Lizmap
https://docs.3liz.org/lizmap-pgrouting-module/
6 stars 8 forks source link

Update install.pgsql.sql #44

Open Antoviscomi opened 1 year ago

Antoviscomi commented 1 year ago
Gustry commented 3 months ago

Sorry @Antoviscomi for the late reply

Is this PR still needed ? Is-it not fixed ?

Antoviscomi commented 3 months ago

Sorry @Antoviscomi for the late reply

Is this PR still needed ? Is-it not fixed ?

@Gustry I didn't read anymore about of this error since 3.6.6 or later, so i think it's fixed or now compatible with install.pgsql.sql new versions. But my pgrouting db it's configured with this PR in, so, I don't know it's still needed @nboisteault @rldhont can tell us more about

Antoviscomi commented 3 months ago

@Gustry I reopened this because of in current install.pgsql.sql there isn't lg.geom call, but i remembered that my pgrouting db it's configured with a local install.pgsql.sql edited by me at the error time, so the error message doesn't appear anymore

Antoviscomi commented 1 month ago

@Gustry i've noticed that in new version of pgrouting module (1.1.2) of install.psql.sql lg.geom in not more required in GROUP BY in the

`point_interest as (
        SELECT
        'FeatureCollection' As type,
        array_to_json(array_agg(f)) As features
        FROM (
            SELECT
                'Feature' AS type,
                Concat(
                    'poi',
                    '.',
                    "id") AS id,
                ST_AsGeoJSON(ST_Transform(lg.geom, 4326))::json As geometry,
                row_to_json(
                    ( SELECT l FROM
                        (
                            SELECT MIN(s.seq) AS seq, lg.id, lg.label, lg.type, lg.description
                        ) As l
                    )
                ) As properties
            FROM pgrouting.routing_poi As lg
            JOIN source as s
                ON ST_DWithin(ST_Transform(s.geom, 2154), lg.geom, 1)
            GROUP BY s.seq, lg.id, lg.label, lg.type, lg.description
            ORDER BY s.seq
        ) AS f
    )
`

query, in LWC 3.8.x (but I'm not sure is the same for previous versions: 3.6.x and 3.7.x). Let me know