Commit bd0a108f authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Added explanations to

parent 070c02cc
......@@ -29,16 +29,26 @@ In broad terms, `` contains tools to:
The core function of the tools, which is called by `` is `generate_country_industrial_cells()`. The following figures illustrate the functions that it calls and the process as a whole.
After the input points are retrieved from the SERA input files, unique points are identified according to a certain input precision. The coordinates (longitude, latitude) that "should be" the same are identified by rounding the coordinates according to a certain number of decimal places and identifying unique values at that precision level. This is done using strings and dictionaries that store the original and new coordinates. The cells dataframe is finally updated to reflect the new adjusted coordinates and geometries.
<img src="Images/industrial_30arcsec_approach_07.png" width="600">
<img src="Images/industrial_30arcsec_approach_08.png" width="600">
Steps indicated in purple and magenta in the figures that follow are only executed if the input parameters `consistency_checks` and `autoadjust_overlap_gap` are True, respectively. These steps assess whether there are any overlaps/gaps left in between neighbouring cells and adjust the geometries when this is the case. In the case of gaps, geometries are not adjusted if the cells are in diagonal with respect to one another and they participate of other cases of intersection, as this can lead to contradictory adjustments of the geometries in each step because one pair of cells that intersect each other are adjusted at a time.
Cells are only trimmed as per country boundaries after the consistency checks. Otherwise, checks that look at the distance between the resulting cell centroids and the original points and the final aras of the cells would be meaningless, because the trimmed geometry cannot guarantee such consistencies with the original input points.
<img src="Images/industrial_30arcsec_approach_09.png" width="600">
Gaps are identified by generating an enlarged version of the cells (i.e. increasing their dimensions), searching for subsequent intersections (so as to know which cells are neighbours of which other cells), and then subtracting the original cell geometries to these intersections. This resulting geometry is analysed to decide whether a gap exists between the cells or not.
<img src="Images/industrial_30arcsec_approach_10.png" width="600">
<img src="Images/industrial_30arcsec_approach_11.png" width="600">
Which coordinates need to be adjusted is determined by first identifying the relative position of one cell with respect to the other.
<img src="Images/industrial_30arcsec_approach_12.png" width="600">
<img src="Images/industrial_30arcsec_approach_13.png" width="600">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment