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

Add home territory #587

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

juggler31
Copy link

@juggler31 juggler31 commented Nov 26, 2024

Ajout d'une carte territoire ainsi que la liste des espèces sur celui-ci.
L'affichage de cette carte est en mailles.

Ce commit intègre tout les changements lié au floutage des données en fonction du niveau de sensiblité
d'une observation.
@juggler31 juggler31 force-pushed the add_home_territory branch 2 times, most recently from 3c5ebf7 to 54d9940 Compare November 26, 2024 14:27
s.id_nomenclature_sensitivity,
st_transform(a.geom, 4326) AS geom
FROM synthese.synthese s
JOIN synthese.tmp_cor_area_synthse sa ON sa.id_synthese = s.id_synthese
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cor_area_synthese et pas tmp_cor_area_synthse

@@ -0,0 +1,45 @@
IMPORT FOREIGN SCHEMA gn_synthese
LIMIT TO (gn_synthese.tmp_cor_area_synthse)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cor_area_synthese et pas tmp_cor_area_synthse

Comment on lines 126 to 141
sql = """
SELECT obs.cd_ref, obs.id_maille, obs.nbr,-- obs.annee, obs.id_observations,
tax.lb_nom, tax.nom_vern, tax.group2_inpn,
medias.url, medias.chemin, medias.id_media,
m.geojson_4326 AS geom,
m.type_code
FROM atlas.vm_observations_mailles obs
JOIN atlas.vm_taxons tax ON tax.cd_ref = obs.cd_ref
JOIN (SELECT DISTINCT id_area, geojson_4326, type_code from atlas.vm_cor_area_synthese) m ON m.id_area=obs.id_maille
LEFT JOIN atlas.vm_medias medias
ON medias.cd_ref = obs.cd_ref AND medias.id_type = 1
GROUP BY obs.cd_ref, obs.id_maille, obs.nbr,
tax.lb_nom, tax.nom_vern, tax.group2_inpn,
medias.url, medias.chemin, medias.id_media,
m.geojson_4326,
m.type_code
"""
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idée d'optimisation:

SELECT obs.cd_ref, obs.id_maille, obs.nbr, obs.type_code,
       tax.lb_nom, tax.nom_vern, tax.group2_inpn,
       medias.url, medias.chemin, medias.id_media,
       st_asgeojson(m.geojson_maille) AS geom
FROM atlas.vm_observations_mailles obs
         JOIN atlas.vm_taxons tax ON tax.cd_ref = obs.cd_ref
         JOIN atlas.t_mailles_territoire m ON m.id_maille=obs.id_maille
         LEFT JOIN atlas.vm_medias medias
                   ON medias.cd_ref = obs.cd_ref AND medias.id_type = 1
GROUP BY obs.cd_ref, obs.id_maille, obs.nbr,
         tax.lb_nom, tax.nom_vern, tax.group2_inpn,
         medias.url, medias.chemin, medias.id_media,
         m.geojson_maille,
         obs.type_code

Ajout d'une carte territoire ainsi que la liste des espèces sur celui-ci.
L'affichage de cette carte est en mailles.
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

Successfully merging this pull request may close these issues.

1 participant