Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Geotrek : type_sol et pdipr_inscription #20

Open
IdrissaD opened this issue Apr 13, 2022 · 0 comments
Open

Export Geotrek : type_sol et pdipr_inscription #20

IdrissaD opened this issue Apr 13, 2022 · 0 comments

Comments

@IdrissaD
Copy link
Collaborator

Comme vu en #15, on pourrait renseigner les champs type_sol et pdipr_inscription en passant par la table core_pathaggregation.
Dans l'idée (non fonctionnel) :

WITH paths_trek AS (
    SELECT path_id
     FROM core_pathaggregation cpa
       JOIN selected_t t
         ON t.topo_object_id = cpa.topo_object_id
),
network_id AS (
    SELECT id
      FROM core_network
    WHERE network ILIKE '%PDIPR%'
           OR network ILIKE '%Plan Départemental des Itinéraires de Promenade et de Randonnée%')
SELECT *
 FROM paths_trek pt
   JOIN core_path_networks cpn
     ON NOT (pt.path_id = cpn.path_id
                     AND cpn.network_id IN (SELECT id FROM network_id))

Pour les sols :

  • obtention de tous les id de core_topology WHERE kind = 'LANDEDGE' qui ont un path_id en commun avec notre trek dans core_pathaggregation
  • agrégation au sein d'une array de tous les land_physicaltype associés aux land_landedge associés aux core_topology précédemment obtenus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant