-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
full fua testing for
simplify_network()
(#41)
* curate full FUA testing data * add full fua simplify_network() tests * bump 4/5 tolerance to 0.2 – test_simplify_network_full_fua() * try uploading osberved artifacts * try uploading osberved artifacts [2] * try uploading osberved artifacts [3] * try uploading osberved artifacts [4] * try uploading osberved artifacts [5] * try uploading osberved artifacts [6] * try uploading osberved artifacts [7] * try uploading osberved artifacts [8] * try uploading osberved artifacts [9] * try uploading osberved artifacts [10] * upload osberved artifacts * try uploading osberved artifacts [11] * try uploading osberved artifacts [12] * known simplified from ci_artifacts-ubuntu-latest-py312_sgeop-latest * run equality tests only on Ubuntu + latest/dev CI envs * codecov --------- Co-authored-by: Martin Fleischmann <[email protected]>
- Loading branch information
1 parent
92579a9
commit 5c033a4
Showing
17 changed files
with
202 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# FUA testing data | ||
|
||
## Contents | ||
|
||
* This `README.md` | ||
* `generate_simplified.py` – see [sgeop#7](https://github.com/uscuni/sgeop/issues/7) | ||
* Data | ||
* There is a directory for each FUA listed below that contains 2 files: | ||
* `original.parquet`: The original input street network derived from [OSM](https://www.openstreetmap.org/about) via [OSMNX](https://osmnx.readthedocs.io/en/stable/). | ||
* `simplified.parquet`: The simplified street network following our algorithm with *default parameters*. | ||
|
||
## FUA Information | ||
|
||
| FUA | City | Shortand | | ||
| --- | --- | --- | | ||
| 1133 | Aleppo, Syria, Middle East / Asia | `aleppo_1133` | | ||
| 869 | Auckland, New Zealand, Oceania / Asia | `auckland_869` | | ||
| 809 | Douala, Cameroon, Africa | `douala_809` | | ||
| 1656 | Liège, Belgium, Europe | `liege_1656` | | ||
| 4617 | Bucaramanga, Colombia, S. America | `bucaramanga_4617` | | ||
| 4881 | Salt Lake City, Utah, USA, N. America | `slc_4881` | | ||
|
||
--------------------------------------- | ||
|
||
Copyright (c) 2024-, sgeop Developers |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import logging | ||
import pathlib | ||
import time | ||
|
||
import geopandas | ||
|
||
import sgeop | ||
|
||
start_time = time.time() | ||
|
||
logging.basicConfig( | ||
filename="simplified_generation.log", | ||
filemode="a", | ||
format="%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s", | ||
datefmt="%H:%M:%S", | ||
level=logging.NOTSET, | ||
) | ||
logger = logging.getLogger(__name__) | ||
|
||
logging.info("") | ||
logging.info("") | ||
logging.info(" |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|") | ||
logging.info(" | Generating Simplified Street Networks |") | ||
logging.info(" |_______________________________________|") | ||
logging.info("") | ||
logging.info("") | ||
logging.info("") | ||
|
||
fua_city = { | ||
1133: "aleppo", | ||
869: "auckland", | ||
4617: "bucaramanga", | ||
809: "douala", | ||
1656: "liege", | ||
4881: "slc", | ||
} | ||
|
||
# dict of cityname: fua ID | ||
city_fua = {c: f for f, c in fua_city.items()} | ||
|
||
for city, fua in city_fua.items(): | ||
|
||
t1 = time.time() | ||
aoi = f"{city}_{fua}" | ||
|
||
logging.info("") | ||
logging.info("") | ||
logging.info("") | ||
logging.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>") | ||
logging.info("") | ||
logging.info("") | ||
logging.info(f" ** {aoi} **") | ||
logging.info("") | ||
logging.info("") | ||
|
||
# input data | ||
original = geopandas.read_parquet(pathlib.Path(aoi, "original.parquet")) | ||
|
||
# output data | ||
simplified = sgeop.simplify_network(original) | ||
simplified.to_parquet(pathlib.Path(aoi, "simplified.parquet")) | ||
|
||
t2 = round((time.time() - t1) / 60.0, 2) | ||
|
||
logging.info("") | ||
logging.info("") | ||
logging.info(f"\t{aoi} runtime: {t2} minutes") | ||
logging.info("") | ||
logging.info("") | ||
logging.info("") | ||
logging.info("<<<< ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") | ||
logging.info("") | ||
|
||
endtime_time = round((time.time() - start_time) / 60.0, 2) | ||
|
||
logging.info("") | ||
logging.info("") | ||
logging.info(f"Total runtime: {endtime_time} minutes") | ||
logging.info( | ||
"=========================================================================" | ||
) | ||
logging.info("") | ||
logging.info("") |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters