Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
giscience
big-data
ohsome
oshdb-examples
Commits
042bf61a
Verified
Commit
042bf61a
authored
Jul 19, 2021
by
Johannes Visintini
Browse files
fix two minor issues by SonarLint
parent
280e5363
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/heigit/ohsome/oshdb/examples/analyses/DistinctContributors.java
View file @
042bf61a
...
...
@@ -6,6 +6,7 @@ import org.heigit.ohsome.oshdb.OSHDBBoundingBox;
import
org.heigit.ohsome.oshdb.OSHDBTimestamp
;
import
org.heigit.ohsome.oshdb.api.db.OSHDBH2
;
import
org.heigit.ohsome.oshdb.api.mapreducer.OSMContributionView
;
import
org.heigit.ohsome.oshdb.util.mappable.OSMContribution
;
import
org.heigit.ohsome.oshdb.util.time.OSHDBTimestamps.Interval
;
import
org.heigit.ohsome.oshdb.util.time.TimestampFormatter
;
...
...
@@ -27,7 +28,7 @@ public class DistinctContributors {
.
areaOfInterest
(
new
OSHDBBoundingBox
(
71.45
,
-
1.16
,
74.7
,
7.47
))
// maldives
.
timestamps
(
"2007-01-01"
,
"2017-12-01"
,
Interval
.
MONTHLY
)
.
filter
(
"type:way and highway=*"
)
.
map
(
k
->
k
.
getContributorUserId
()
)
.
map
(
OSMContribution:
:
getContributorUserId
)
.
aggregateByTimestamp
()
.
countUniq
();
}
...
...
src/main/java/org/heigit/ohsome/oshdb/tutorial/TutorialChart.java
View file @
042bf61a
...
...
@@ -43,10 +43,9 @@ public class TutorialChart extends ApplicationFrame {
.
iterator
();
while
(
it
.
hasNext
())
{
Map
.
Entry
<
OSHDBTimestamp
,
Map
<
ContributionType
,
Integer
>>
ff
=
it
.
next
();
Arrays
.
asList
(
ContributionType
.
values
()).
forEach
((
ContributionType
contribType
)
->
{
a
.
addValue
(
ff
.
getValue
().
get
(
contribType
),
contribType
,
ff
.
getKey
());
});
Arrays
.
asList
(
ContributionType
.
values
()).
forEach
((
ContributionType
contribType
)
->
a
.
addValue
(
ff
.
getValue
().
get
(
contribType
),
contribType
,
ff
.
getKey
()));
}
return
a
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment