Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
agg2graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
semu
agg2graph
Commits
447f430f
Commit
447f430f
authored
10 years ago
by
semu
Browse files
Options
Downloads
Patches
Plain Diff
replaced irritating description
parent
d00cafbe
Branches
master
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
agg2graph/src/de/fub/agg2graph/graph/RamerDouglasPeuckerFilter.java
+8
-8
8 additions, 8 deletions
...src/de/fub/agg2graph/graph/RamerDouglasPeuckerFilter.java
agg2graph/src/de/fub/agg2graph/traclus/Benchmark.java
+1
-1
1 addition, 1 deletion
agg2graph/src/de/fub/agg2graph/traclus/Benchmark.java
with
9 additions
and
9 deletions
agg2graph/src/de/fub/agg2graph/graph/RamerDouglasPeuckerFilter.java
+
8
−
8
View file @
447f430f
...
@@ -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
max
Segment
Length
=
100
;
// meters
private
double
max
Edge
Length
=
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
.
max
Segment
Length
=
maxSegmentLength
;
this
.
max
Edge
Length
=
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
getMax
Segment
Length
()
{
public
double
getMax
Edge
Length
()
{
return
max
Segment
Length
;
return
max
Edge
Length
;
}
}
public
void
setMax
Segment
Length
(
double
maxSegmentLength
)
{
public
void
setMax
Edge
Length
(
double
maxSegmentLength
)
{
this
.
max
Segment
Length
=
maxSegmentLength
;
this
.
max
Edge
Length
=
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
>
max
Segment
Length
)
{
if
(
dist
>
max
Edge
Length
)
{
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
/
max
Segment
Length
));
conn
,
(
int
)
Math
.
ceil
(
dist
/
max
Edge
Length
));
for
(
AggConnection
newConn
:
newConnections
)
{
for
(
AggConnection
newConn
:
newConnections
)
{
result
.
add
(
newConn
.
getTo
());
result
.
add
(
newConn
.
getTo
());
}
}
...
...
This diff is collapsed.
Click to expand it.
agg2graph/src/de/fub/agg2graph/traclus/Benchmark.java
+
1
−
1
View file @
447f430f
...
@@ -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
.
setMax
Segment
Length
(
maxSegmentLength
);
((
OsmExporter
)
exporter
).
rdpf
.
setMax
Edge
Length
(
maxSegmentLength
);
// configure xml document
// configure xml document
((
OsmExporter
)
exporter
).
uid
=
properties
.
getProperty
(
"output.uid"
);
((
OsmExporter
)
exporter
).
uid
=
properties
.
getProperty
(
"output.uid"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment