Skip to content

Commit 4a04e7f

Browse files
committed
wip
1 parent cc6a685 commit 4a04e7f

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

.env.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ATLAS_DROP_SCHEMA="false"
1717

1818
# Set parameters for Docker installation scripts run when the Atlas container starts
1919
# Equivalent to the parameters set in the settings.ini file.
20-
ATLAS_TYPE_TERRITOIRE="PEC"
2120
ATLAS_TYPE_CODE="COM,EPCI"
2221
ATLAS_TYPE_MAILLE="M5"
2322
ATLAS_ALTITUDES="0 500 1000 1500 2000 2500 3000 3500 4000"

data/atlas/02.ref_geo.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ CREATE MATERIALIZED VIEW atlas.vm_cor_areas AS
7676
FROM atlas.vm_l_areas vla
7777
JOIN atlas.vm_bib_areas_types b USING(id_type)
7878
JOIN dep on
79+
-- on fait un buffer négatif de 10 m sur les département pour éviter la double
80+
-- intersections des zonages administratifs (eg: commune).
7981
st_intersects(st_buffer(dep.geom_local, -10), vla.geom_local)
8082
WHERE b.type_code in (SELECT * FROM string_to_table(:'type_code', ','))
8183
-- On laisse volontairement l'autointersection département - département pour les fiche territoire des départements !

docs/installation.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,17 @@ NOTES :
106106

107107
La table `zoning` doit être remplie en indicant l'identifiant de son type de 'zone' (table `bib_areas_types``).
108108

109-
Pour accelérer l'installation, vous pouvez "désactiver" certaines communes du ``ref_geo``, dont vous ne vous servez pas. Voir l'exemple de requête ci-dessous :
109+
Pour accelérer l'installation, vous pouvez "désactiver" certains zonage du ``ref_geo``, dont vous ne vous servez pas. Voir l'exemple de requête ci-dessous :
110110

111111
::
112112

113-
UPDATE ref_geo.l_areas set enable = false where id_type = 25 AND id_area NOT in (
114-
select a.id_area from ref_geo.l_areas a
115-
join ref_geo.li_municipalities m ON a.id_area = m.id_area
116-
where insee_dep in ('MON_CODE_DEPARTEMENT', 'MON_CODE_DEPARTEMENT_BIS')
113+
update ref_geo.l_areas
114+
set enable = false where not st_intersects(geom,
115+
(
116+
select st_union(geom)
117+
from ref_geo.l_areas la
118+
where la.id_type = 26 and area_code in ('38', '05', '74')
119+
)
117120
)
118121

119122
:note:

install_db.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function checkDockerVariables() {
174174
local vars=(
175175
'POSTGRES_USER' 'POSTGRES_PASSWORD' 'POSTGRES_HOST' 'POSTGRES_DB' 'POSTGRES_PORT' \
176176
'ATLAS_DROP_SCHEMA' \
177-
'ATLAS_TYPE_TERRITOIRE' 'ATLAS_TYPE_CODE' 'ATLAS_TYPE_MAILLE' 'ATLAS_ALTITUDES' \
177+
'ATLAS_TYPE_CODE' 'ATLAS_ALTITUDES', 'ATLAS_TYPE_MAILLE' \
178178
'ATLAS_MOST_OBSERVED_TIME'
179179
)
180180
for i in "${!vars[@]}"; do
@@ -386,7 +386,6 @@ function createAtlasSchemaEntities() {
386386
time_start="${SECONDS}"
387387
executeFile data/atlas/${script} \
388388
-v "ON_ERROR_STOP=1" \
389-
-v type_territoire="${type_territoire}" \
390389
-v type_code="${type_code}" \
391390
-v type_maille="${type_maille}" \
392391
-v insert_altitudes_values="${insert_altitudes_values}" \

utils.bash

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ function convertDockerVariables() {
339339
altitudes=(${ATLAS_ALTITUDES})
340340

341341
# Assign other variables
342-
type_territoire="${ATLAS_TYPE_TERRITOIRE}"
343342
type_code="${ATLAS_TYPE_CODE}"
344343
type_maille="${ATLAS_TYPE_MAILLE}"
345344
time="${ATLAS_MOST_OBSERVED_TIME}"

0 commit comments

Comments
 (0)