|
|
|
@ -15,7 +15,7 @@ clean_tmp () {
|
|
|
|
|
}
|
|
|
|
|
trap clean_tmp EXIT
|
|
|
|
|
|
|
|
|
|
echo "[+] Ingesting IPE ata."
|
|
|
|
|
echo "[+] Ingesting IPE data."
|
|
|
|
|
echo " The following files will be ingested."
|
|
|
|
|
echo ""
|
|
|
|
|
ipeFiles=$(find "${fullIpeDirPath}" -name '*.csv')
|
|
|
|
@ -53,7 +53,13 @@ UPDATE ipe SET ImmeubleGeoPoint =
|
|
|
|
|
2154)
|
|
|
|
|
,4326);
|
|
|
|
|
EOF
|
|
|
|
|
sqlite3 "${fullDbPath}" < "${tmpSql}"
|
|
|
|
|
|
|
|
|
|
echo "[+] Creating Rtree index (spatial index). We're almost done."
|
|
|
|
|
cat > "${tmpSql}" <<EOF
|
|
|
|
|
SELECT load_extension("mod_spatialite");
|
|
|
|
|
SELECT CreateSpatialIndex('ipe','ImmeubleGeoPoint');
|
|
|
|
|
EOF
|
|
|
|
|
sqlite3 "${fullDbPath}" < "${tmpSql}"
|
|
|
|
|
|
|
|
|
|
echo "[+] SQLite database generated at ${fullDbPath}"
|
|
|
|
|