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

Added conversion to EPSG:4326

parent 98be597c
No related branches found
No related tags found
1 merge request!1New branch with fixed history
...@@ -29,6 +29,7 @@ us_trans | 79.84| 94216| ...@@ -29,6 +29,7 @@ us_trans | 79.84| 94216|
``` ```
![tables schema](FACT_power.png "Tables in DB") ![tables schema](FACT_power.png "Tables in DB")
**All spatial objects are converted to EPSG:4326.**
--- ---
## Notes ## Notes
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
mkdir -p ./temp mkdir -p ./temp
wget -N 'https://zenodo.org/records/3349843/files/JRC-PPDB-OPEN.ver0.91.zip?download=1' -O ./temp/power.zip wget -N 'https://zenodo.org/records/3349843/files/JRC-PPDB-OPEN.ver0.91.zip?download=1' -O ./temp/power.zip
unzip -d ./temp/ ./temp/power.zip unzip -d ./temp/ ./temp/power.zip
ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= temp/JRC_OPEN_UNITS.csv -oo X_POSSIBLE_NAMES=lon -oo Y_POSSIBLE_NAMES=lat -oo KEEP_GEOM_COLUMNS=NO -nln eu_gen -update -overwrite -lco engine=Aria -skipfailures ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= temp/JRC_OPEN_UNITS.csv -oo X_POSSIBLE_NAMES=lon -oo Y_POSSIBLE_NAMES=lat -oo KEEP_GEOM_COLUMNS=NO -nln eu_gen -update -overwrite -lco engine=Aria -skipfailures -t_srs EPSG:4326
rm -r ./temp rm -r ./temp
# Transmission 2023 # Transmission 2023
mkdir -p ./temp mkdir -p ./temp
cp ./inputs/EU_power.zip ./temp/power.zip cp ./inputs/EU_power.zip ./temp/power.zip
unzip -d ./temp/ ./temp/power.zip unzip -d ./temp/ ./temp/power.zip
ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= ./temp/EU_power_lines.shp -nln eu_trans -update -overwrite -lco engine=Aria -skipfailures ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= ./temp/EU_power_lines.shp -nln eu_trans -update -overwrite -lco engine=Aria -skipfailures -t_srs EPSG:4326
rm -r ./temp rm -r ./temp
# US # US
...@@ -21,11 +21,11 @@ rm -r ./temp ...@@ -21,11 +21,11 @@ rm -r ./temp
mkdir -p ./temp mkdir -p ./temp
wget -N 'https://opendata.arcgis.com/api/v3/datasets/bf5c5110b1b944d299bb683cdbd02d2a_0/downloads/data?format=shp&spatialRefId=4326&where=1%3D1' -O ./temp/power.zip wget -N 'https://opendata.arcgis.com/api/v3/datasets/bf5c5110b1b944d299bb683cdbd02d2a_0/downloads/data?format=shp&spatialRefId=4326&where=1%3D1' -O ./temp/power.zip
unzip -d ./temp/ ./temp/power.zip unzip -d ./temp/ ./temp/power.zip
ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= temp/Power_Plants.shp -nln us_gen -update -overwrite -lco engine=Aria -skipfailures ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= temp/Power_Plants.shp -nln us_gen -update -overwrite -lco engine=Aria -skipfailures -t_srs EPSG:4326
rm -r ./temp rm -r ./temp
# Transmission 2023 # Transmission 2023
mkdir -p ./temp mkdir -p ./temp
wget -N 'https://opendata.arcgis.com/api/v3/datasets/5739e7eb28654df3b3157452ad12f4c6_0/downloads/data?format=shp&spatialRefId=4326&where=1%3D1' -O ./temp/power.zip wget -N 'https://opendata.arcgis.com/api/v3/datasets/5739e7eb28654df3b3157452ad12f4c6_0/downloads/data?format=shp&spatialRefId=4326&where=1%3D1' -O ./temp/power.zip
unzip -d ./temp/ ./temp/power.zip unzip -d ./temp/ ./temp/power.zip
ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= ./temp/Electric_Power_Transmission_Lines.shp -nln us_trans -update -overwrite -lco engine=Aria -skipfailures ogr2ogr -f MySQL MySQL:FACT_power,host=,user=root,password= ./temp/Electric_Power_Transmission_Lines.shp -nln us_trans -update -overwrite -lco engine=Aria -skipfailures -t_srs EPSG:4326
rm -r ./temp rm -r ./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