Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mayer
CircularGreenSimCity
Commits
c4182e82
Commit
c4182e82
authored
May 12, 2024
by
Eric Duminil
Browse files
Updated "tests" for Marieke
parent
00ed1cf4
Changes
1
Show whitespace changes
Inline
Side-by-side
enrich-citygml-with-greenarea/src/test/java/de/hft/stuttgart/citygml/green/alkis/AlkisGreenEnricherTest.java
View file @
c4182e82
...
...
@@ -4,28 +4,33 @@ import java.io.File;
import
org.junit.jupiter.api.Test
;
import
de.hft.stuttgart.citygml.green.osm.GreenEnricher
;
class
AlkisGreenEnricherTest
{
class
AlkisGreenEnricherTest
{
// @Test
// void testAlkisGreen() throws Exception {
// //NOTE: From https://transfer.hft-stuttgart.de/gitlab/circulargreensimcity/circulargreensimcity/-/wikis/Fallstudien/Gromb%C3%BChl
// //NOTE: From
// https://transfer.hft-stuttgart.de/gitlab/circulargreensimcity/circulargreensimcity/-/wikis/Fallstudien/Gromb%C3%BChl
// Path outputGML = Paths.get("data/Grombühl_v4_case_study_alkis_test.gml");
// Files.deleteIfExists(outputGML);
// assertFalse(Files.exists(outputGML));
// String[] args = new String[] { "data/Grombühl_v4_case_study.gml", // Input GML
// String[] args = new String[] { "data/Grombühl_v4_case_study.gml", // Input
// GML
// "data/tn_09663/Nutzung.shp", // ALKIS Data
// //NOTE: From https://transfer.hft-stuttgart.de/gitlab/circulargreensimcity/circulargreensimcity/-/issues/26#note_6544
// "data/Trees/Trees_realisticScenario_20240201.shp", // Added trees, in Baumkatasterformat,
// //NOTE: From
// https://transfer.hft-stuttgart.de/gitlab/circulargreensimcity/circulargreensimcity/-/issues/26#note_6544
// "data/Trees/Trees_realisticScenario_20240201.shp", // Added trees, in
// Baumkatasterformat,
// "alkis_test", // Output GML suffix
// "POLYGON((9.946874 49.803172, 9.949785 49.803205, 9.952122 49.803312, 9.953435 49.803089, 9.956488 49.803150, 9.955465 49.802374, 9.953216 49.800916, 9.952371 49.800676, 9.951810 49.800509, 9.949172 49.800829, 9.946792 49.800796, 9.946874 49.803172))"
// "POLYGON((9.946874 49.803172, 9.949785 49.803205, 9.952122 49.803312,
// 9.953435 49.803089, 9.956488 49.803150, 9.955465 49.802374, 9.953216
// 49.800916, 9.952371 49.800676, 9.951810 49.800509, 9.949172 49.800829,
// 9.946792 49.800796, 9.946874 49.803172))"
// };
// AlkisGreenEnricher.main(args);
// assertTrue(Files.exists(outputGML));
// }
@Test
void
test
Green
()
throws
Exception
{
void
test
MariekeGanzesGebiet
()
throws
Exception
{
File
folder
=
new
File
(
"data/Marieke/ganzes_gebiet/"
);
String
gml
=
"Grombühl_BA_IST.gml"
;
File
[]
shapefiles
=
folder
.
listFiles
((
dir
,
name
)
->
name
.
endsWith
(
".shp"
));
...
...
@@ -38,6 +43,32 @@ class AlkisGreenEnricherTest
};
GreenEnricher
.
main
(
args
);
}
}
@Test
void
testMariekeSpezial
()
throws
Exception
{
File
[]
folders
=
{
new
File
(
"data/Marieke/75Bäume/"
),
new
File
(
"data/Marieke/250Bäume/Abstand5m"
),
new
File
(
"data/Marieke/250Bäume/Abstand15m/49_801844__49_802502__9_948075__9_949534_15m_Block24"
),
new
File
(
"data/Marieke/250Bäume/Abstand15m/49_802605__49_804087__9_94036__9_948417_15m_Block7-11_14-17"
),
new
File
(
"data/Marieke/500Bäume/Abstand10m/49_801844__49_802502__9_948075__9_949534_10m_block_24"
),
new
File
(
"data/Marieke/500Bäume/Abstand10m/49_802605__49_804087__9_94036__9_948417_10m_block_7-11_14-17"
),
};
for
(
File
folder
:
folders
)
{
String
gml
=
folder
.
listFiles
((
dir
,
name
)
->
name
.
endsWith
(
".gml"
))[
0
].
getName
();
File
[]
shapefiles
=
folder
.
listFiles
((
dir
,
name
)
->
name
.
endsWith
(
".shp"
));
for
(
File
shapefile
:
shapefiles
)
{
System
.
out
.
println
(
shapefile
);
String
extension
=
shapefile
.
getName
().
replaceAll
(
"\\.shp"
,
""
);
String
[]
args
=
new
String
[]
{
folder
.
toPath
().
resolve
(
gml
).
toString
(),
// Input GML
shapefile
.
toString
(),
// Added trees, in Baumkatasterformat,
extension
,
// Output GML suffix
};
GreenEnricher
.
main
(
args
);
}
}
// assertTrue(Files.exists(outputGML));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment