-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: develop
Are you sure you want to change the base?
Add home territory #587
Conversation
juggler31
commented
Nov 26, 2024
•
edited
Loading
edited
Ce commit intègre tout les changements lié au floutage des données en fonction du niveau de sensiblité d'une observation.
3c5ebf7
to
54d9940
Compare
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
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 | ||
""" |
There was a problem hiding this comment.
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.
54d9940
to
abeb1cb
Compare