Commit 1a6df8e
Avoid pickling shapely object in Exposures.write_hdf5 (#1051)
* refactor Exposures.write_hdf5 and .from_hdf5: use wkb instead of pickle for geometry serialization
* refactor Exposures.write_hdf5
* change of plan: just pickle geometries in wkb format
* Update climada/entity/exposures/base.py
Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>
* abandon shapely pickling
* simplify wkb columns collection
* simplify wkb conversion
* cosmetics
---------
Co-authored-by: Lukas Riedel <34276446+peanutfun@users.noreply.github.com>1 parent 51b66fa commit 1a6df8e
File tree
3 files changed
+48
-27
lines changed- climada/entity/exposures
- test
3 files changed
+48
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
1131 | 1132 | | |
1132 | 1133 | | |
1133 | 1134 | | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
| 1135 | + | |
| 1136 | + | |
1138 | 1137 | | |
1139 | 1138 | | |
1140 | 1139 | | |
| |||
1146 | 1145 | | |
1147 | 1146 | | |
1148 | 1147 | | |
| 1148 | + | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1188 | 1196 | | |
1189 | 1197 | | |
1190 | 1198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
| 381 | + | |
| 382 | + | |
383 | 383 | | |
384 | | - | |
385 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
386 | 389 | | |
387 | 390 | | |
388 | 391 | | |
| |||
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
395 | | - | |
| 398 | + | |
396 | 399 | | |
397 | 400 | | |
398 | 401 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
405 | 408 | | |
406 | | - | |
| 409 | + | |
407 | 410 | | |
408 | 411 | | |
409 | | - | |
| 412 | + | |
410 | 413 | | |
411 | 414 | | |
412 | | - | |
| 415 | + | |
413 | 416 | | |
414 | 417 | | |
415 | | - | |
| 418 | + | |
416 | 419 | | |
417 | 420 | | |
418 | | - | |
| 421 | + | |
419 | 422 | | |
420 | 423 | | |
421 | | - | |
| 424 | + | |
422 | 425 | | |
423 | 426 | | |
424 | | - | |
| 427 | + | |
425 | 428 | | |
426 | 429 | | |
427 | | - | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
431 | | - | |
432 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
433 | 442 | | |
434 | | - | |
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
| |||
0 commit comments