Skip to content
Snippets Groups Projects
Commit 447f430f authored by semu's avatar semu
Browse files

replaced irritating description

parent d00cafbe
Branches master
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ import de.fub.agg2graph.structs.Path; ...@@ -41,7 +41,7 @@ import de.fub.agg2graph.structs.Path;
*/ */
public class RamerDouglasPeuckerFilter { public class RamerDouglasPeuckerFilter {
private double epsilon = 0.0; private double epsilon = 0.0;
private double maxSegmentLength = 100; // meters private double maxEdgeLength = 100; // meters
public RamerDouglasPeuckerFilter() { public RamerDouglasPeuckerFilter() {
} }
...@@ -55,7 +55,7 @@ public class RamerDouglasPeuckerFilter { ...@@ -55,7 +55,7 @@ public class RamerDouglasPeuckerFilter {
public RamerDouglasPeuckerFilter(double epsilon, double maxSegmentLength) { public RamerDouglasPeuckerFilter(double epsilon, double maxSegmentLength) {
this(epsilon); this(epsilon);
this.maxSegmentLength = maxSegmentLength; this.maxEdgeLength = maxSegmentLength;
} }
public List<ILocation> getRemovablePoints(List<? extends ILocation> data) { public List<ILocation> getRemovablePoints(List<? extends ILocation> data) {
...@@ -66,12 +66,12 @@ public class RamerDouglasPeuckerFilter { ...@@ -66,12 +66,12 @@ public class RamerDouglasPeuckerFilter {
return epsilon; return epsilon;
} }
public double getMaxSegmentLength() { public double getMaxEdgeLength() {
return maxSegmentLength; return maxEdgeLength;
} }
public void setMaxSegmentLength(double maxSegmentLength) { public void setMaxEdgeLength(double maxSegmentLength) {
this.maxSegmentLength = maxSegmentLength; this.maxEdgeLength = maxSegmentLength;
} }
protected List<ILocation> getRemovablePoints( protected List<ILocation> getRemovablePoints(
...@@ -168,11 +168,11 @@ public class RamerDouglasPeuckerFilter { ...@@ -168,11 +168,11 @@ public class RamerDouglasPeuckerFilter {
result.add(lastNode); result.add(lastNode);
} }
double dist = GPSCalc.getDistance(lastNode, thisNode); double dist = GPSCalc.getDistance(lastNode, thisNode);
if (dist > maxSegmentLength) { if (dist > maxEdgeLength) {
AggConnection conn = lastNode.getConnectionTo(thisNode); AggConnection conn = lastNode.getConnectionTo(thisNode);
if (conn != null) { if (conn != null) {
List<AggConnection> newConnections = agg.splitConnection( List<AggConnection> newConnections = agg.splitConnection(
conn, (int) Math.ceil(dist / maxSegmentLength)); conn, (int) Math.ceil(dist / maxEdgeLength));
for (AggConnection newConn : newConnections) { for (AggConnection newConn : newConnections) {
result.add(newConn.getTo()); result.add(newConn.getTo());
} }
......
...@@ -654,7 +654,7 @@ public class Benchmark { ...@@ -654,7 +654,7 @@ public class Benchmark {
double rpdfEpsilon = Double.parseDouble(properties.getProperty("output.rpdfEpsilon")); double rpdfEpsilon = Double.parseDouble(properties.getProperty("output.rpdfEpsilon"));
double maxSegmentLength = Double.parseDouble(properties.getProperty("output.maxSegmentLength")); double maxSegmentLength = Double.parseDouble(properties.getProperty("output.maxSegmentLength"));
((OsmExporter) exporter).rdpf = new RamerDouglasPeuckerFilter(rpdfEpsilon); ((OsmExporter) exporter).rdpf = new RamerDouglasPeuckerFilter(rpdfEpsilon);
((OsmExporter) exporter).rdpf.setMaxSegmentLength(maxSegmentLength); ((OsmExporter) exporter).rdpf.setMaxEdgeLength(maxSegmentLength);
// configure xml document // configure xml document
((OsmExporter) exporter).uid = properties.getProperty("output.uid"); ((OsmExporter) exporter).uid = properties.getProperty("output.uid");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment