Commit b24dcb53 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

split data and geo db generation

parent a371da34
...@@ -123,6 +123,9 @@ prepare_db_info() { ...@@ -123,6 +123,9 @@ prepare_db_info() {
# En a-t-on besoin ? # En a-t-on besoin ?
# Creates and fill ref_org table from data_orga # Creates and fill ref_org table from data_orga
$SQLITE3 $SQLITE_DB < $LIB_DIR/db/create_ref_org_table.sql || exit 1 $SQLITE3 $SQLITE_DB < $LIB_DIR/db/create_ref_org_table.sql || exit 1
}
prepare_georef_db() {
if [ -e $SQLITE_GEOREF_DB ]; then if [ -e $SQLITE_GEOREF_DB ]; then
name=`basename $SQLITE_GEOREF_DB` name=`basename $SQLITE_GEOREF_DB`
...@@ -140,6 +143,7 @@ prepare_db_info() { ...@@ -140,6 +143,7 @@ prepare_db_info() {
$PYTHON $LIB_DIR/db/shp2csv.py --csv_delimiter tab $RSC_DIR/ADE_1-1_SHP_LAMB93_FR/EPCI.shp $GEO_TEMP_DIR/ae_metropole_epci.tsv || exit 1 $PYTHON $LIB_DIR/db/shp2csv.py --csv_delimiter tab $RSC_DIR/ADE_1-1_SHP_LAMB93_FR/EPCI.shp $GEO_TEMP_DIR/ae_metropole_epci.tsv || exit 1
$PYTHON $LIB_DIR/db/shp2csv.py --csv_delimiter tab $RSC_DIR/IAU-IDF/Intercommunalites_de_la_Region_IledeFrance_au_1er_janvier_2018.shp $GEO_TEMP_DIR/iau_ept.tsv || exit 1 $PYTHON $LIB_DIR/db/shp2csv.py --csv_delimiter tab $RSC_DIR/IAU-IDF/Intercommunalites_de_la_Region_IledeFrance_au_1er_janvier_2018.shp $GEO_TEMP_DIR/iau_ept.tsv || exit 1
# Imports Geo CSVs into GeoRefDB # Imports Geo CSVs into GeoRefDB
$PYTHON $LIB_DIR/db/csv_sqlite_import.py --csv_delimiter tab $GEO_TEMP_DIR/ae_metropole_region.tsv $SQLITE_GEOREF_DB || exit 1 $PYTHON $LIB_DIR/db/csv_sqlite_import.py --csv_delimiter tab $GEO_TEMP_DIR/ae_metropole_region.tsv $SQLITE_GEOREF_DB || exit 1
$PYTHON $LIB_DIR/db/csv_sqlite_import.py --csv_delimiter tab $GEO_TEMP_DIR/ae_metropole_departement.tsv $SQLITE_GEOREF_DB || exit 1 $PYTHON $LIB_DIR/db/csv_sqlite_import.py --csv_delimiter tab $GEO_TEMP_DIR/ae_metropole_departement.tsv $SQLITE_GEOREF_DB || exit 1
...@@ -161,4 +165,5 @@ download_and_filter_datagouv_data ...@@ -161,4 +165,5 @@ download_and_filter_datagouv_data
download_and_merge_opendatasoft_data download_and_merge_opendatasoft_data
download_siren_info download_siren_info
prepare_cog_info prepare_cog_info
prepare_db_info prepare_db_info
\ No newline at end of file prepare_georef_db
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment