Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
datacirco-prepare-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
DataCirco
datacirco-prepare-data
Commits
8342fbc7
Commit
8342fbc7
authored
4 months ago
by
benoit-cty
Browse files
Options
Downloads
Patches
Plain Diff
Admin Express
parent
a489f32f
No related branches found
No related tags found
2 merge requests
!55
Mise à jour de DataCirco
,
!54
Mise à jour de DataCirco
Pipeline
#20066
passed
4 months ago
Stage: init
Stage: download
Stage: populate_db
Stage: export_json
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
05_download_ign.sh
+4
-4
4 additions, 4 deletions
05_download_ign.sh
with
4 additions
and
4 deletions
05_download_ign.sh
+
4
−
4
View file @
8342fbc7
...
...
@@ -7,7 +7,7 @@ set -e
# Get the full command line, assuming the password part is always first if it exists
FULL_COMMAND
=
$(
poetry run python datacirco/connexion_db.py |
tail
-1
)
# Extract the password value if it exists
PGPASSWORD
=
$(
echo
$FULL_COMMAND
|
grep
-oP
'PGPASSWORD=\K[^ ]+'
||
true
;
)
PGPASSWORD
=
$(
echo
$FULL_COMMAND
|
grep
-oP
'PGPASSWORD=\K[^ ]+'
||
true
;
)
# Conditionally export PGPASSWORD if it is not empty
if
[
-n
"
$PGPASSWORD
"
]
;
then
...
...
@@ -42,15 +42,15 @@ cd $GEO
## découpage administratif
# -nc, --no-clobber: skip downloads that would download to existing files.
wget
--no-clobber
https://data.geopf.fr/telechargement/download/ADMIN-EXPRESS/ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
4
-0
1-22
/ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
4
-0
1-22
.7z
wget
--no-clobber
https://data.geopf.fr/telechargement/download/ADMIN-EXPRESS/ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
5
-0
2-17
/ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
5
-0
2-17
.7z
## découpages administrativs - ADMIN-EXPRESS (IGN)
7z x ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
4
-0
1-22
.7z
7z x ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
5
-0
2-17
.7z
for
ADMIN
in
COMMUNE DEPARTEMENT REGION CANTON EPCI CHFLIEU_COMMUNE ARRONDISSEMENT_MUNICIPAL
do
PG_USE_COPY
=
1 ogr2ogr
-f
pgdump /vsistdout/ ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
4
-0
1-22
/ADMIN-EXPRESS/1_DONNEES_LIVRAISON_2024-01-00184/ADE_3-2_SHP_WGS84G_FRA-ED202
4
-0
1-22
/
$ADMIN
.shp
\
PG_USE_COPY
=
1 ogr2ogr
-f
pgdump /vsistdout/ ADMIN-EXPRESS_3-2__SHP_WGS84G_FRA_202
5
-0
2-17
/ADMIN-EXPRESS/1_DONNEES_LIVRAISON_2024-01-00184/ADE_3-2_SHP_WGS84G_FRA-ED202
5
-0
2-17
/
$ADMIN
.shp
\
-t_srs
EPSG:4326
-nln
ign_
$ADMIN
-nlt
geometry |
$PSQL_COMMAND_LINE
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment