-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New indicators to investigate LCZ classification #937
Conversation
… a territory: spatial distribution of objects, measurement of heterogeneity, neighborhood analyses, distribution of objects according to geographical directions, distances between objects...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job !
tablesToDrop << lcz_count_lod | ||
datasource.execute(""" | ||
drop table if exists $lcz_count_lod; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation ? For readability reason, would be better further right
tablesToDrop << lcz_count_lod_mode | ||
datasource.execute(""" | ||
create index on $lcz_count_lod(ID_ROW_LOD_${i}, ID_COL_LOD_${i}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
tablesToDrop << grid_lod_level_final | ||
datasource.execute(""" | ||
CREATE INDEX on $lcz_count_lod_mode(ID_ROW_LOD_${i}, ID_COL_LOD_${i}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
* Create a multi-scale grid and aggregate the LCZ_PRIMARY indicators for each level of the grid. | ||
* For each level, the adjacent cells are preserved as well as the number of urban and natural cells. | ||
* To distinguish between LCZ cells with the same count per level, a weight is used corresponding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a weight is used TO SELECT ONLY ONE LCZ TYPE, corresponding...
* @param datasource connection to the database | ||
* @param grid_indicators a grid that contains for each cell the LCZ_PRIMARY | ||
* @param nb_levels number of aggregate levels. Default is 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the default value 2 instead of 1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope 1
|
||
|
||
/** | ||
* @author Erwan Bocher (CNRS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suppose to be in spatial unit class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class will be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a new class ? I suppose having those in grid indicators would make the job ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand well, everything will be moved in the spatial unit class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was the initial code. All methods will be moved in the good place.
void multiscaleLCZGridTest() { | ||
//Data for test | ||
h2GIS.execute(""" | ||
--Grid values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure but is this test have an equal number of LCZ for one situation and thus has to use the weights to check that the weigths are OK ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weights are always used
@@ -225,4 +227,128 @@ class SpatialUnitsTests { | |||
def countRows = postGIS.firstRow "select count(*) as numberOfRows from $outputTable" | |||
assert 100 == countRows.numberOfRows | |||
} | |||
|
|||
@Test | |||
void sprawlAreasTest1() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is in one test for sprawling you test the "collapsing distance" to remove some objects being long but so thin that they disappear ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would not it be more reasonable to have these tests in gridIndicatorsTest since the methods belong to the gridIndicator class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class will be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all super comments
* @param datasource connection to the database | ||
* @param grid_indicators a grid that contains for each cell the LCZ_PRIMARY | ||
* @param nb_levels number of aggregate levels. Default is 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope 1
void multiscaleLCZGridTest() { | ||
//Data for test | ||
h2GIS.execute(""" | ||
--Grid values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weights are always used
@@ -225,4 +227,128 @@ class SpatialUnitsTests { | |||
def countRows = postGIS.firstRow "select count(*) as numberOfRows from $outputTable" | |||
assert 100 == countRows.numberOfRows | |||
} | |||
|
|||
@Test | |||
void sprawlAreasTest1() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
This PR proposes new indicators to investigate the characteristics of a territory: spatial distribution of objects, measurement of heterogeneity, neighborhood analyses, distribution of objects according to geographical directions, distances between objects...
Below some outputs on Dijon
Extract sprawl areas
Inside distances to sprawl areas
Outside distances to sprawl areas
Inside cool LCZ distances to sprawl areas
Multiscale grid with adajacent cell values (3*3)
Sprawl surface by compass direction