Commit b53691f7 authored by duminil's avatar duminil
Browse files

Moving stuff

parent cf707aa3
......@@ -12,8 +12,8 @@
import com.ximpleware.NavException;
import com.ximpleware.XPathEvalException;
import com.ximpleware.XPathParseException;
import eu.simstadt.lowlevelgmlparser.BuildingXmlNode;
import eu.simstadt.lowlevelgmlparser.CityGmlIterator;
import eu.simstadt.regionchooser.citygml_parser.BuildingXmlNode;
import eu.simstadt.regionchooser.citygml_parser.CityGmlIterator;
public class RegionExtractor
......
package eu.simstadt.lowlevelgmlparser;
package eu.simstadt.regionchooser.citygml_parser;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory;
......
package eu.simstadt.lowlevelgmlparser;
package eu.simstadt.regionchooser.citygml_parser;
import java.io.IOException;
import java.nio.file.Files;
......@@ -20,7 +20,6 @@ public class CityGmlIterator implements Iterable<BuildingXmlNode>
private AutoPilot buildingsFinder;
private VTDNav navigator;
private long offsetAndLength;
private int buildingOffset = 0;
private int buildingLength = 0;
private Path citygmlPath;
......@@ -28,7 +27,7 @@ public class CityGmlIterator implements Iterable<BuildingXmlNode>
/*
* Simple class to parse a CityGML and extract cityObjectMember XML nodes and their coordinates. Since the
* coordinates are extracted for RegionChooser, it's okay to not be perfectly robust, but it should be fast and not
* use much memory.
* use much memory. A SaxParser would use even less memory but might be harder to code and slower to run.
*
* Based on VTD XML, it provides a Building iterator.
*
......@@ -60,7 +59,7 @@ public boolean hasNext() {
@Override
public BuildingXmlNode next() {
try {
offsetAndLength = navigator.getElementFragment();
long offsetAndLength = navigator.getElementFragment();
buildingOffset = (int) offsetAndLength;
buildingLength = (int) (offsetAndLength >> 32);
return new BuildingXmlNode(navigator, buildingOffset, buildingLength);
......
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