Commit b53691f7 authored by duminil's avatar duminil
Browse files

Moving stuff

parent cf707aa3
Showing with 6 additions and 7 deletions
+6 -7
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
import com.ximpleware.NavException; import com.ximpleware.NavException;
import com.ximpleware.XPathEvalException; import com.ximpleware.XPathEvalException;
import com.ximpleware.XPathParseException; import com.ximpleware.XPathParseException;
import eu.simstadt.lowlevelgmlparser.BuildingXmlNode; import eu.simstadt.regionchooser.citygml_parser.BuildingXmlNode;
import eu.simstadt.lowlevelgmlparser.CityGmlIterator; import eu.simstadt.regionchooser.citygml_parser.CityGmlIterator;
public class RegionExtractor public class RegionExtractor
......
package eu.simstadt.lowlevelgmlparser; package eu.simstadt.regionchooser.citygml_parser;
import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.GeometryFactory;
......
package eu.simstadt.lowlevelgmlparser; package eu.simstadt.regionchooser.citygml_parser;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
...@@ -20,7 +20,6 @@ public class CityGmlIterator implements Iterable<BuildingXmlNode> ...@@ -20,7 +20,6 @@ public class CityGmlIterator implements Iterable<BuildingXmlNode>
private AutoPilot buildingsFinder; private AutoPilot buildingsFinder;
private VTDNav navigator; private VTDNav navigator;
private long offsetAndLength;
private int buildingOffset = 0; private int buildingOffset = 0;
private int buildingLength = 0; private int buildingLength = 0;
private Path citygmlPath; private Path citygmlPath;
...@@ -28,7 +27,7 @@ public class CityGmlIterator implements Iterable<BuildingXmlNode> ...@@ -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 * 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 * 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. * Based on VTD XML, it provides a Building iterator.
* *
...@@ -60,7 +59,7 @@ public boolean hasNext() { ...@@ -60,7 +59,7 @@ public boolean hasNext() {
@Override @Override
public BuildingXmlNode next() { public BuildingXmlNode next() {
try { try {
offsetAndLength = navigator.getElementFragment(); long offsetAndLength = navigator.getElementFragment();
buildingOffset = (int) offsetAndLength; buildingOffset = (int) offsetAndLength;
buildingLength = (int) (offsetAndLength >> 32); buildingLength = (int) (offsetAndLength >> 32);
return new BuildingXmlNode(navigator, buildingOffset, buildingLength); return new BuildingXmlNode(navigator, buildingOffset, buildingLength);
......
Supports Markdown
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