|
52 | 52 | "outputs": [], |
53 | 53 | "source": [ |
54 | 54 | "# Choose a region to operate on (Here, a predefined region for Aachen, Germany is used)\n", |
55 | | - "regionPath = gl._test_data_['aachenShapefile.shp']\n", |
| 55 | + "regionPath = gl._test_data_[\"aachenShapefile.shp\"]\n", |
56 | 56 | "\n", |
57 | 57 | "# Initialize ExclusionCalculator object\n", |
58 | 58 | "ec = gl.ExclusionCalculator(regionPath, srs=3035, pixelSize=100)" |
|
147 | 147 | "clcRasterPath = gl._test_data_[\"clc-aachen_clipped.tif\"]\n", |
148 | 148 | "\n", |
149 | 149 | "# Apply exclusion\n", |
150 | | - "ec.excludeRasterType(clcRasterPath, value=(12,22))\n", |
| 150 | + "ec.excludeRasterType(clcRasterPath, value=(12, 22))\n", |
151 | 151 | "\n", |
152 | 152 | "# Visualize\n", |
153 | 153 | "ec.draw()" |
|
194 | 194 | ], |
195 | 195 | "source": [ |
196 | 196 | "# Apply exclusion\n", |
197 | | - "ec.excludeRasterType(clcRasterPath, value=(1,2), buffer=1000)\n", |
| 197 | + "ec.excludeRasterType(clcRasterPath, value=(1, 2), buffer=1000)\n", |
198 | 198 | "\n", |
199 | 199 | "# Visualize\n", |
200 | 200 | "ec.draw()" |
|
404 | 404 | "## Apply exclusions from the given set\n", |
405 | 405 | "ec.excludeSet(\n", |
406 | 406 | " exclusion_set=exclusion_set,\n", |
407 | | - " clc=gl._test_data_['clc-aachen_clipped.tif'],\n", |
| 407 | + " clc=gl._test_data_[\"clc-aachen_clipped.tif\"],\n", |
408 | 408 | " osm_roads=gl._test_data_[\"aachenRoads.shp\"],\n", |
409 | 409 | ")\n", |
410 | 410 | "\n", |
|
459 | 459 | "source": [ |
460 | 460 | "ec_p = gl.ExclusionCalculator(regionPath, srs=3035, pixelSize=100)\n", |
461 | 461 | "\n", |
462 | | - "ec_p.excludePrior(\"agriculture_proximity\", value=(None,0))\n", |
463 | | - "ec_p.excludePrior(\"settlement_proximity\", value=(None,1000))\n", |
464 | | - "ec_p.excludePrior(\"roads_main_proximity\", value=(None,200))\n", |
465 | | - " \n", |
| 462 | + "ec_p.excludePrior(\"agriculture_proximity\", value=(None, 0))\n", |
| 463 | + "ec_p.excludePrior(\"settlement_proximity\", value=(None, 1000))\n", |
| 464 | + "ec_p.excludePrior(\"roads_main_proximity\", value=(None, 200))\n", |
| 465 | + "\n", |
466 | 466 | "ec_p.draw()" |
467 | 467 | ] |
468 | 468 | }, |
|
507 | 507 | "source": [ |
508 | 508 | "## Set the initial value to those we computer previously\n", |
509 | 509 | "ec = gl.ExclusionCalculator(\n", |
510 | | - " regionPath, \n", |
511 | | - " srs=3035, \n", |
512 | | - " pixelSize=100, \n", |
513 | | - " initialValue=\"aachens_best_pv_spots.tif\")\n", |
| 510 | + " regionPath, srs=3035, pixelSize=100, initialValue=\"aachens_best_pv_spots.tif\"\n", |
| 511 | + ")\n", |
514 | 512 | "\n", |
515 | 513 | "\n", |
516 | 514 | "## Draw the result\n", |
|
546 | 544 | } |
547 | 545 | ], |
548 | 546 | "source": [ |
549 | | - "ax = ec.drawWithSmopyBasemap(zoom=11, figsize=(40,20))" |
| 547 | + "ax = ec.drawWithSmopyBasemap(zoom=11, figsize=(40, 20))" |
550 | 548 | ] |
551 | 549 | }, |
552 | 550 | { |
|
0 commit comments