Skip to content
Snippets Groups Projects
Commit 4137b25d authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

fizing ownership problems with files within downloaded zip archive.

parent 35b7573f
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,10 @@ PASSWORD=$3
# geology
mkdir -p ./temp
wget -O ./temp/temp.zip -N "https://ostr-backend-prod.azurewebsites.net/server/api/core/bitstreams/a2141be1-5afb-41c7-9588-a135734c0f8a/content"
unzip -d ./temp/ ./temp/temp.zip
unzip -o -d ./temp/ ./temp/temp.zip
ogr2ogr -f MySQL MySQL:FACT_mine,host=$HOST,user=$USER,password=$PASSWORD ./temp/data/ArcMap9_ArcReader9/AllThemesMerged/gen.shp -nln geology -update -overwrite -lco engine=Aria -t_srs EPSG:4326
chmod -R u+w temp/
rm -r ./temp
chmod -R u+w ./temp/
rm -rf ./temp
# single mineral maps
declare -a minerals=("phosphate" "podchrome" "laterite" "ree" "carbonatite" "nicrpge" "sedcu" "porcu" "sedexmvt" "sedznpb" "vms" "potash")
......@@ -19,16 +19,16 @@ for m in "${minerals[@]}"
do
mkdir -p ./temp
wget -O ./temp/temp.zip -N "https://mrdata.usgs.gov/${m}/${m}-csv.zip"
unzip -d ./temp/ ./temp/temp.zip
unzip -o -d ./temp/ ./temp/temp.zip
ogr2ogr -f MySQL MySQL:FACT_mine,host=$HOST,user=$USER,password=$PASSWORD ./temp/${m}/${m}.shp -nln ${m} -update -overwrite -lco engine=Aria -t_srs EPSG:4326
chmod -R u+w temp/
rm -r ./temp
chmod -R u+w ./temp/
rm -rf ./temp
done
# Global distribution of selected mines, deposits, and districts of critical minerals
mkdir -p ./temp
wget -O ./temp/temp.zip -N "https://www.sciencebase.gov/catalog/file/get/594d3c8ee4b062508e39b332?name=PP1802_CritMin_Shapefiles.zip"
unzip -d ./temp/ ./temp/temp.zip
unzip -o -d ./temp/ ./temp/temp.zip
ogr2ogr -f MySQL MySQL:FACT_mine,host=$HOST,user=$USER,password=$PASSWORD ./temp/PP1802_CritMin_pts.shp -nln global_selected -update -overwrite -lco engine=Aria -t_srs EPSG:4326
chmod -R u+w temp/
rm -r ./temp
chmod -R u+w ./temp/
rm -rf ./temp
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment