Commit 03af9c2b authored by Commandre Benjamin's avatar Commandre Benjamin
Browse files

Correction problème projection gdal

parent fbd6b623
......@@ -128,19 +128,20 @@ class Archive():
# Processus to convert the UTM shapefile
# in decimal degrees shapefile with ogr2ogr in command line
utm_outfile = "{0}/UTM_{1}".format(os.path.split(self.emprise)[0], os.path.split(self.emprise)[1])
# utm_outfile = "{0}/UTM_{1}".format(os.path.split(self.emprise)[0], os.path.split(self.emprise)[1])
if os.path.exists(utm_outfile):
os.remove(utm_outfile)
# if os.path.exists(utm_outfile):
# os.remove(utm_outfile)
# wgs84 : 4326
self.vector_projection_with_epsg(self.emprise, utm_outfile, epsg=4326)
# self.vector_projection_with_epsg(self.emprise, utm_outfile, epsg=4326)
# To get shapefile extent
# Avec import ogr
driver = ogr.GetDriverByName('ESRI Shapefile')
# Open shapefile
data_source = driver.Open(utm_outfile, 0)
# data_source = driver.Open(utm_outfile, 0)
data_source = driver.Open(self.emprise, 0)
if data_source is None:
self.logger.error('Could not open file')
......@@ -153,14 +154,10 @@ class Archive():
## Close source data
data_source.Destroy()
area_coord_corner = str(extent_[2]) + ',' + str(extent_[0]) + ',' + str(extent_[3]) + ',' + str(extent_[1])
return "{},{},{},{}".format(extent_[0], extent_[2], extent_[1], extent_[3])
def listing_by_tile(self):
nbImage = 0
for tuile in self.liste_tuiles :
self.requete['location'] = tuile
......
[donnees]
# chemin/vers/shapefile/emprise
# Le shapefile doit en géographie WGS84 (EPSG:4326)
chemin_emprise =
# chemin/vers/shapefile/zone_etude
# Si vide, zone d'étude = emprise
# Le shapefile doit en géographie WGS84 (EPSG:4326)
chemin_zone_etude =
# Liste des tuiles Sentinel2 à télécharger
......@@ -36,7 +38,7 @@ chemin =
# - Tuile (Regroupe les images en fonction de la tuile sentinel2 auquelle elles correspondent )
groupe = Tuile
# Vrai si extraction des images des archives, faux si téléchagement de celles-ci
# "True" si extraction des images des archives, "False" si téléchagement de celles-ci
extraction = False
[theia]
......
Markdown is supported
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