Skip to content

Commit

Permalink
feat(db): filter out vm_l_areas with intersection
Browse files Browse the repository at this point in the history
And exclude M1,M5,M10,COM (COM must be removed when vm_l_areas will be
used for COM also)
  • Loading branch information
Maxime Vergez committed Oct 12, 2022
1 parent ee64457 commit 7a2830f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/atlas_with_extended_areas.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ FROM
ref_geo.l_areas a
JOIN atlas.vm_bib_areas_types t
ON t.id_type = a.id_type
JOIN atlas.t_layer_territoire tlt
ON st_intersects(st_transform(a.geom, 4326) , tlt.the_geom)
WHERE
enable = TRUE AND
type_code IN ('M10', 'COM', 'ZNIEFF1', 'ZNIEFF2')
t.type_code NOT IN ('M1', 'M5', 'M10', 'COM')
WITH DATA;

CREATE UNIQUE INDEX vm_l_areas_id_area_idx
Expand Down

0 comments on commit 7a2830f

Please sign in to comment.