good
This commit is contained in:
parent
c995f12f8b
commit
8dc939d761
44 changed files with 3540 additions and 2159478 deletions
|
|
@ -50,13 +50,10 @@
|
|||
" sys.path.insert(0, str(ROOT))\n",
|
||||
"\n",
|
||||
"from pipeline.transform.tree_density import ( # noqa: E402\n",
|
||||
" DEFAULT_TOW_TYPES,\n",
|
||||
" _layers,\n",
|
||||
" _metric_columns,\n",
|
||||
" _parse_csv_arg,\n",
|
||||
" _postcode_points,\n",
|
||||
" _tow_dataset_path,\n",
|
||||
" _where_for_tow_types,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"DATA_DIR = ROOT / \"property-data\"\n",
|
||||
|
|
@ -72,7 +69,6 @@
|
|||
"BOUNDARY_EXPANSION_M = 50\n",
|
||||
"CANDIDATE_SAMPLE_SIZE = 60\n",
|
||||
"\n",
|
||||
"tow_types = _parse_csv_arg(\",\".join(DEFAULT_TOW_TYPES))\n",
|
||||
"density_col, area_col, count_col, height_col = _metric_columns(50)\n"
|
||||
]
|
||||
},
|
||||
|
|
@ -127,14 +123,12 @@
|
|||
"def intersecting_tow_features(dataset_path: str, layer_names: list[str], target_bng):\n",
|
||||
" bbox = target_bng.bounds\n",
|
||||
" rows = []\n",
|
||||
" where = _where_for_tow_types(tow_types)\n",
|
||||
"\n",
|
||||
" for layer in layer_names:\n",
|
||||
" with pyogrio.open_arrow(\n",
|
||||
" dataset_path,\n",
|
||||
" layer=layer,\n",
|
||||
" columns=[\"Woodland_Type\", \"TOW_Area_M\", \"MEANHT\"],\n",
|
||||
" where=where,\n",
|
||||
" bbox=bbox,\n",
|
||||
" batch_size=4096,\n",
|
||||
" use_pyarrow=True,\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue