Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
90070463
Commit
90070463
authored
8 years ago
by
duminil
Browse files
Options
Download
Email Patches
Plain Diff
Buildings and trees.
parent
01bb185d
master
develop
migrate_to_Java11
0.2.2
0.1.0
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/eu/simstadt/regionchooser/test/CitygmlParserTests.java
+25
-0
test/eu/simstadt/regionchooser/test/CitygmlParserTests.java
with
25 additions
and
0 deletions
+25
-0
test/eu/simstadt/regionchooser/test/CitygmlParserTests.java
0 → 100644
+
25
-
0
View file @
90070463
package
eu.simstadt.regionchooser.test
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
org.junit.Test
;
import
eu.simstadt.regionchooser.citygml_parser.BuildingXmlNode
;
import
eu.simstadt.regionchooser.citygml_parser.CityGmlIterator
;
public
class
CitygmlParserTests
{
@Test
public
void
testExtractCoordsFromStuttgart
()
throws
Throwable
{
Path
repo
=
Paths
.
get
(
"../TestRepository"
);
Path
citygmlPath
=
repo
.
resolve
(
"Stuttgart.proj/Stuttgart_buildings_and_trees.gml"
);
CityGmlIterator
buildingXmlNodes
=
new
CityGmlIterator
(
citygmlPath
);
for
(
BuildingXmlNode
buildingXmlNode
:
buildingXmlNodes
)
{
double
x
=
buildingXmlNode
.
getCenterOfMass
().
getX
();
double
y
=
buildingXmlNode
.
getCenterOfMass
().
getY
();
assertFalse
(
"Coordinate should be a double"
,
Double
.
isNaN
(
x
));
assertFalse
(
"Coordinate should be a double"
,
Double
.
isNaN
(
y
));
}
}
}
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets