Commit 90070463 authored by duminil's avatar duminil
Browse files

Buildings and trees.

parent 01bb185d
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));
}
}
}
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