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
5107625c
Commit
5107625c
authored
3 months ago
by
Benoît Courty
Browse files
Options
Downloads
Patches
Plain Diff
debug geo
parent
00881bfa
Branches
Branches containing commit
No related tags found
1 merge request
!56
Fix may 2025
Pipeline
#20382
failed
3 months ago
Stage: init
Stage: download
Stage: populate_db
Stage: export_json
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
datacirco/map.py
+1
-1
1 addition, 1 deletion
datacirco/map.py
populate_db/geographie.py
+7
-0
7 additions, 0 deletions
populate_db/geographie.py
with
8 additions
and
1 deletion
datacirco/map.py
+
1
−
1
View file @
5107625c
...
...
@@ -77,7 +77,7 @@ class Carto:
if
self
.
data
.
population
.
carreaux_densite_population_2021
:
carreaux
=
self
.
data
.
population
.
carreaux_densite_population_2021
else
:
raise
ValueError
(
"
Pas de données de densité de population pour 202
0
!
"
)
raise
ValueError
(
"
Pas de données de densité de population pour 202
1
!
"
)
# elif self.data.population.carreaux_densite_population_2018:
# carreaux = self.data.population.carreaux_densite_population_2018
# else:
...
...
This diff is collapsed.
Click to expand it.
populate_db/geographie.py
+
7
−
0
View file @
5107625c
...
...
@@ -56,7 +56,14 @@ utilitaires.execute_command(
run
(
"
TRUNCATE iris_ge
"
)
# Check if the directory exists and have files
if
not
glob
.
glob
(
"
IRIS-GE*/*/*/*/*.SHP
"
):
print
(
"
Aucun fichier IRIS-GE trouvé dans le répertoire.
"
)
print
(
"
Vérifiez que le fichier est bien présent et relancez le script.
"
)
exit
(
1
)
for
shp
in
glob
.
glob
(
"
IRIS-GE*/*/*/*/*.SHP
"
):
print
(
f
"
Import de
{
shp
}
"
)
utilitaires
.
execute_command
(
f
"
PG_USE_COPY=yes ogr2ogr -f pgdump /vsistdout/
{
shp
}
-nln iris_ge -nlt geometry -t_srs EPSG:4326 -LCO CREATE_TABLE=OFF |
{
database_command_line
}
"
)
...
...
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