... | ... | @@ -47,7 +47,7 @@ axe.tick_params(labelsize=fs_label,length=4, direction ="inout") |
|
|
## Morocco shapefile
|
|
|
```
|
|
|
def plot_region (axe):
|
|
|
region_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Maroc_Regions_Provinces/REGION.shp")
|
|
|
region_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Shapefiles_Maroc_Regions_Provinces/REGION.shp")
|
|
|
for shaperecord in region_sf.shapeRecords():
|
|
|
shape = shaperecord.shape
|
|
|
points = np.array(shape.points)
|
... | ... | @@ -57,7 +57,7 @@ def plot_region (axe): |
|
|
return ()
|
|
|
|
|
|
def plot_morocco (axe):
|
|
|
morocco_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Maroc_Regions_Provinces/maroc_adm0.shp")
|
|
|
morocco_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Shapefiles_Maroc_Regions_Provinces/maroc_adm0.shp")
|
|
|
for shaperecord in morocco_sf.shapeRecords():
|
|
|
shape = shaperecord.shape
|
|
|
points = np.array(shape.points)
|
... | ... | @@ -67,7 +67,7 @@ def plot_morocco (axe): |
|
|
return ()
|
|
|
|
|
|
def plot_province (axe):
|
|
|
province_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Maroc_Regions_Provinces/PROVINCE.shp")
|
|
|
province_sf = shp.Reader("/home/marie/nextCloud/Documents/lpjml5_maroc/python_toolbox/Shapefiles_Maroc_Regions_Provinces/PROVINCE.shp")
|
|
|
for shape in province_sf.shapes():
|
|
|
points = np.array(shape.points)
|
|
|
intervals = list(shape.parts) + [len(shape.points)]
|
... | ... | |