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 2020/05/12 18:30:02 UTC
[incubator-streampipes-extensions] branch feature/trajectory
updated: fix STREAMPIPES-123
This is an automated email from the ASF dual-hosted git repository.
micklich pushed a commit to branch feature/trajectory
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
The following commit(s) were added to refs/heads/feature/trajectory by this push:
new 9e7a465 fix STREAMPIPES-123
9e7a465 is described below
commit 9e7a465c8e345cc49287e7f07742b099bea19f9b
Author: micklich <fl...@disy.net>
AuthorDate: Tue May 12 17:05:21 2020 +0200
fix STREAMPIPES-123
---
.../trajectory/CreateTrajectoryFromPoints.java | 4 ++--
.../CreateTrajectoryFromPointsController.java | 17 ++++++++++-------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
index 5ccb42e..12fe8aa 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
@@ -67,8 +67,8 @@ public class CreateTrajectoryFromPoints implements EventProcessor<CreateTrajecto
LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
// adds to stream
- in.addField("wkt-trajectory", geom.toString());
- in.addField("description", trajectory.getDescription());
+ in.addField(CreateTrajectoryFromPointsController.DESCRIPTION_RUNTIME, trajectory.getDescription());
+ in.addField(CreateTrajectoryFromPointsController.WKT_RUNTIME, geom.toString());
out.collect(in);
}
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
index 16d6e4f..9d9f439 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
@@ -40,7 +40,10 @@ public class CreateTrajectoryFromPointsController extends StandaloneEventProcess
public final static String DESCRIPTION_KEY = "description-key";
public final static String SUBPOINTS_KEY = "subpoints-key";
- public final static String WKT = "trajectory_wkt";
+ public final static String WKT_KEY = "trajectory-key";
+ public final static String WKT_RUNTIME = "trajectoryWKT";
+
+ public final static String DESCRIPTION_RUNTIME = "trajectoryDescription";
@Override
@@ -76,14 +79,14 @@ public class CreateTrajectoryFromPointsController extends StandaloneEventProcess
)
.outputStrategy(OutputStrategies.append(
- EpProperties.numberEp(
- Labels.withId(M_KEY),
- "m-value",
- SO.Number
+ EpProperties.stringEp(
+ Labels.withId(DESCRIPTION_KEY),
+ DESCRIPTION_RUNTIME,
+ SO.Text
),
EpProperties.stringEp(
- Labels.withId(WKT),
- "trajectory-wkt",
+ Labels.withId(WKT_KEY),
+ WKT_RUNTIME,
"http://www.opengis.net/ont/geosparql#Geometry")
)
)