You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by mi...@apache.org on 2022/11/30 14:59:57 UTC
[streampipes] 06/11: [STREAMPIPES-642] adjust misc format
This is an automated email from the ASF dual-hosted git repository.
micklich pushed a commit to branch STREAMPIPES-642
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit d520d8ef15c0ca3cdffbaf36f29b526a009e4e9c
Author: micklich <mi...@apache.org>
AuthorDate: Tue Nov 29 16:32:39 2022 +0100
[STREAMPIPES-642] adjust misc format
---
.../distancecalculator/DistanceCalculatorProcessor.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/latlong/processor/distancecalculator/DistanceCalculatorProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/latlong/processor/distancecalculator/DistanceCalculatorProcessor.java
index 0b5e8e73b..b3424cb53 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/latlong/processor/distancecalculator/DistanceCalculatorProcessor.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/latlong/processor/distancecalculator/DistanceCalculatorProcessor.java
@@ -65,9 +65,15 @@ public class DistanceCalculatorProcessor extends StreamPipesDataProcessor {
.requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lat),
Labels.withId(LAT_2_KEY), PropertyScope.MEASUREMENT_PROPERTY)
.requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lng),
- Labels.withId(LONG_2_KEY), PropertyScope.MEASUREMENT_PROPERTY).build()).outputStrategy(
- OutputStrategies.append(
- EpProperties.numberEp(Labels.withId(CALCULATED_DISTANCE_KEY), "distance", SO.Number)))
+ Labels.withId(LONG_2_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+ .build()
+ )
+ .outputStrategy(OutputStrategies
+ .append(EpProperties.numberEp(
+ Labels.withId(CALCULATED_DISTANCE_KEY),
+ "distance",
+ SO.Number))
+ )
.build();
}