Skip to content
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

Replace mitre buffer by the default round #956

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ String createTSU(JdbcDataSource datasource, String inputTableName, String inputz
}
if (inputzone) {
String polygons = postfix("polygons")
// todo: put 'mitre' instead of 'round' whenever JTS has been updated to version 1.20
datasource.execute("""DROP TABLE IF EXISTS $polygons;
CREATE TABLE $polygons as SELECT EXPLOD_ID AS $COLUMN_ID_NAME, ST_SETSRID(ST_BUFFER(ST_BUFFER(the_geom,-0.01, 'join=mitre'), 0.01, 'join=mitre'), $epsg) AS the_geom FROM
CREATE TABLE $polygons as SELECT EXPLOD_ID AS $COLUMN_ID_NAME, ST_SETSRID(ST_BUFFER(ST_BUFFER(the_geom,-0.01, 2), 0.01, 2), $epsg) AS the_geom FROM
ST_EXPLODE('(SELECT ST_POLYGONIZE(ST_UNION(ST_NODE(ST_ACCUM(the_geom)))) AS the_geom
FROM $inputTableName)')
""".toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,11 @@ class WorkflowGeoIndicatorsTest {

//Check building_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE BUILDING_FRACTION>0".toString())
assertEquals(70, countResult.count)
assertEquals(73, countResult.count)

//Check high_vegetation_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE high_vegetation_fraction>0".toString())
assertEquals(18, countResult.count)
assertEquals(22, countResult.count)

//Check high_vegetation_water_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE high_vegetation_water_fraction>0".toString())
Expand All @@ -593,7 +593,7 @@ class WorkflowGeoIndicatorsTest {

//Check high_vegetation_road_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE high_vegetation_road_fraction>0".toString())
assertEquals(20, countResult.count)
assertEquals(21, countResult.count)

//Check high_vegetation_impervious_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE high_vegetation_impervious_fraction>0".toString())
Expand All @@ -605,7 +605,7 @@ class WorkflowGeoIndicatorsTest {

//Check low_vegetation_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE low_vegetation_fraction>0".toString())
assertEquals(50, countResult.count)
assertEquals(55, countResult.count)

//Check low_vegetation_fraction > 0
countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE impervious_fraction>0".toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ class WorflowOSMTest extends WorkflowAbstractTest {
def nominatim = org.orbisgis.geoclimate.osmtools.OSMTools.Utilities.getNominatimData(location)
def grid_size = 100
location = nominatim.bbox
//location=[43.214935,5.336351,43.244890,5.383558]
location=[63.4, 12.8, 63.6, 13]
def osm_parmeters = [
"description" : "Example of configuration file to run the OSM workflow and store the result in a folder",
"geoclimatedb": [
Expand All @@ -677,7 +677,7 @@ class WorflowOSMTest extends WorkflowAbstractTest {

"indicatorUse": ["LCZ", "UTRF", "TEB"]

],"grid_indicators": [
]/*,"grid_indicators": [
"x_size": grid_size,
"y_size": grid_size,
//"rowCol": true,
Expand All @@ -694,7 +694,7 @@ class WorflowOSMTest extends WorkflowAbstractTest {
"SPRAWL_AREAS",
"SPRAWL_DISTANCES", "SPRAWL_COOL_DISTANCE"],
//"lcz_lod":2
]/*, "worldpop_indicators": true,
]*/ /*, "worldpop_indicators": true,

"road_traffic" : true,
"noise_indicators" : [
Expand Down
Loading