diff --git a/data/shapefile/limite_caribe/limite_caribe.cpg b/data/shapefile/limite_caribe/limite_caribe.cpg new file mode 100644 index 0000000..3ad133c --- /dev/null +++ b/data/shapefile/limite_caribe/limite_caribe.cpg @@ -0,0 +1 @@ +UTF-8 \ No newline at end of file diff --git a/data/shapefile/limite_caribe/limite_caribe.dbf b/data/shapefile/limite_caribe/limite_caribe.dbf new file mode 100644 index 0000000..1df20ef Binary files /dev/null and b/data/shapefile/limite_caribe/limite_caribe.dbf differ diff --git a/data/shapefile/limite_caribe/limite_caribe.prj b/data/shapefile/limite_caribe/limite_caribe.prj new file mode 100644 index 0000000..f45cbad --- /dev/null +++ b/data/shapefile/limite_caribe/limite_caribe.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/data/shapefile/limite_caribe/limite_caribe.sbn b/data/shapefile/limite_caribe/limite_caribe.sbn new file mode 100644 index 0000000..61caade Binary files /dev/null and b/data/shapefile/limite_caribe/limite_caribe.sbn differ diff --git a/data/shapefile/limite_caribe/limite_caribe.sbx b/data/shapefile/limite_caribe/limite_caribe.sbx new file mode 100644 index 0000000..3a2dc26 Binary files /dev/null and b/data/shapefile/limite_caribe/limite_caribe.sbx differ diff --git a/data/shapefile/limite_caribe/limite_caribe.shp b/data/shapefile/limite_caribe/limite_caribe.shp new file mode 100644 index 0000000..e030553 Binary files /dev/null and b/data/shapefile/limite_caribe/limite_caribe.shp differ diff --git a/data/shapefile/limite_caribe/limite_caribe.shx b/data/shapefile/limite_caribe/limite_caribe.shx new file mode 100644 index 0000000..2c2fdda Binary files /dev/null and b/data/shapefile/limite_caribe/limite_caribe.shx differ diff --git a/data/shapefile/limite_caribe/limite_caribe.xml b/data/shapefile/limite_caribe/limite_caribe.xml new file mode 100644 index 0000000..02a3e4d --- /dev/null +++ b/data/shapefile/limite_caribe/limite_caribe.xml @@ -0,0 +1,2 @@ + +20240911091853001.0FALSEDefineProjection World_Countries GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]Union "América #;cuenca_total #" C:\Users\wiloc\Documents\ArcGIS\Default.gdb\América_Union2 ALL # GAPSUnion "América_Union2 #;cuenca_total #" "C:\Users\Irma Ayes\Desktop\CPs para arcgis\CHIRPS\AMERICA.shp" ALL # GAPSAMERICA002file://\\AYES\C$\Users\Irma Ayes\Desktop\CPs para arcgis\CHIRPS\AMERICA.shpLocal Area Network0.000GeographicGCS_WGS_1984Angular Unit: Degree (0.017453)<GeographicCoordinateSystem xsi:type='typens:GeographicCoordinateSystem' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.1'><WKT>GEOGCS[&quot;GCS_WGS_1984&quot;,DATUM[&quot;D_WGS_1984&quot;,SPHEROID[&quot;WGS_1984&quot;,6378137.0,298.257223563]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot;,4326]]</WKT><XOrigin>-400</XOrigin><YOrigin>-400</YOrigin><XYScale>11258999068426.238</XYScale><ZOrigin>-100000</ZOrigin><ZScale>10000</ZScale><MOrigin>-100000</MOrigin><MScale>10000</MScale><XYTolerance>8.983152841195215e-009</XYTolerance><ZTolerance>0.001</ZTolerance><MTolerance>0.001</MTolerance><HighPrecision>true</HighPrecision><LeftLongitude>-180</LeftLongitude><WKID>4326</WKID><LatestWKID>4326</LatestWKID></GeographicCoordinateSystem>20180814094203002018081409420300file://Local Area NetworkShapefile0.000Dataset copied.2014123015234100Dataset copied.2015010214291900Dataset copied.2015010214452600 Version 6.2 (Build 9200) ; Esri ArcGIS 10.1.0.3035AMERICAdatasetEPSG7.9.40SimpleFALSE0FALSEFALSEAMERICAFeature Class0FIDFIDOID400Internal feature number.EsriSequential unique whole numbers that are automatically generated.OBJECTIDOBJECTIDInteger990Internal feature number.EsriSequential unique whole numbers that are automatically generated.FID_AméricFID_AméricInteger990ShapeShapeGeometry000Feature geometry.EsriCoordinates defining the features.FID_Amér_1FID_Amér_1Integer990PAÍSPAÍSString10000FID_cuencaFID_cuencaInteger990AREAAREADouble1900Shape_LengShape_LengDouble1900Shape_AreaShape_AreaDouble1900Area of feature in internal units squared.EsriPositive real numbers that are automatically generated.FID_cuen_1FID_cuen_1Integer990AREA_1AREA_1Double1918620180814 diff --git a/src/postprocessing/export_average.py b/src/postprocessing/export_average.py index f1340ad..085a120 100644 --- a/src/postprocessing/export_average.py +++ b/src/postprocessing/export_average.py @@ -111,11 +111,22 @@ def export_raster(dataset, file_name, specific_variable, output_path, inputs_pat print(f"Raster for: {specific_variable} day: {date} created successfully") - new_raster_filename = cut_rasters(raster_filename, shp_path) + + new_raster_filename = raster_filename.replace(os.path.basename(raster_filename), os.path.basename(raster_filename).replace("_raster","")) + + shape_cut_path = os.path.join(shape_path, "limites_municipales", "limite_municipal.shp") + + if "d02" in file_name: + + new_raster_filename = cut_rasters(raster_filename, shp_path) + else: + os.rename(raster_filename, new_raster_filename) + shape_cut_path = os.path.join(shape_path, "limite_caribe", "limite_caribe.shp") + print(f"Raster for: {specific_variable} day: {date} cut successfully as '{new_raster_filename}'") - generate_image(new_raster_filename, search_csv(os.path.join(data_path, "ranges"), specific_variable), data_path, os.path.join(shape_path, "limites_municipales", "limite_municipal.shp")) + generate_image(new_raster_filename, search_csv(os.path.join(data_path, "ranges"), specific_variable), data_path, shape_cut_path) return var_output