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 08:14:35 UTC

[incubator-streampipes-extensions] branch feature/trajectory updated (225f3eb -> c80f858)

This is an automated email from the ASF dual-hosted git repository.

micklich pushed a change to branch feature/trajectory
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git.


    from 225f3eb  trajectory class misc changes (spelling javadoc)
     new 3c2a94a  ontologie
     new 8baaf58  rewrite from labels.from to label.withID
     new c80f858  format code

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../trajectory/CreateTrajectoryFromPoints.java     |  59 ++++----
 .../CreateTrajectoryFromPointsController.java      | 168 ++++++++++-----------
 .../CreateTrajectoryFromPointsParameter.java       |  69 +++++----
 .../strings.en                                     |  24 ++-
 4 files changed, 162 insertions(+), 158 deletions(-)


[incubator-streampipes-extensions] 02/03: rewrite from labels.from to label.withID

Posted by mi...@apache.org.
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

commit 8baaf58e0337ad504bc3478ce338118a1b23669f
Author: micklich <fl...@disy.net>
AuthorDate: Tue May 12 01:50:52 2020 +0200

    rewrite from labels.from to label.withID
---
 .../trajectory/CreateTrajectoryFromPoints.java     |  27 +++--
 .../CreateTrajectoryFromPointsController.java      | 129 +++++++++------------
 .../strings.en                                     |  24 +++-
 3 files changed, 95 insertions(+), 85 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 3ad78d9..26a695e 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
@@ -32,16 +32,21 @@ import org.locationtech.jts.geom.Point;
 public class CreateTrajectoryFromPoints implements EventProcessor<CreateTrajectoryFromPointsParameter> {
 
     private static Logger LOG;
-    private CreateTrajectoryFromPointsParameter params;
-    SpTrajectoryBuilder trajectory;
 
+    private SpTrajectoryBuilder trajectory;
+
+    private String geom_wkt;
+    private String epsg_code;
+    private String m_value;
 
 
     @Override
     public void onInvocation(CreateTrajectoryFromPointsParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
 
         LOG = params.getGraph().getLogger(CreateTrajectoryFromPointsParameter.class);
-        this.params = params;
+        this.geom_wkt =  params.getWkt();
+        this.epsg_code = params.getEpsg();
+        this.m_value = params.getM();
 
         trajectory = new SpTrajectoryBuilder(params.getSubpoints(), params.getDescription());
     }
@@ -49,18 +54,22 @@ public class CreateTrajectoryFromPoints implements EventProcessor<CreateTrajecto
     @Override
     public void onEvent(Event in, SpOutputCollector out) {
 
-        String wkt = in.getFieldBySelector(params.getWkt()).getAsPrimitive().getAsString();
-        Integer epsg = in.getFieldBySelector(params.getEpsg()).getAsPrimitive().getAsInt();
-        Integer m = in.getFieldBySelector(params.getM()).getAsPrimitive().getAsInt();
+        // extract values
+        String wkt = in.getFieldBySelector(geom_wkt).getAsPrimitive().getAsString();
+        Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
+        Integer m = in.getFieldBySelector(m_value).getAsPrimitive().getAsInt();
 
+        //create JTS geometry
         Point eventGeom =  (Point) SpGeometryBuilder.createSPGeom(wkt,epsg);
 
-        //creates single trajectory
+        //adds point and m value to trajectory object
         trajectory.addPointToTrajectory(eventGeom, m);
+        // returns JTS LineString
         LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
 
-        in.addField(CreateTrajectoryFromPointsController.WKT, geom.toString());
-        in.addField(CreateTrajectoryFromPointsController.DESCRIPTION, trajectory.getDescription());
+        // adds to stream
+        in.addField("wkt-trajectory", geom.toString());
+        in.addField("description", trajectory.getDescription());
         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 654a907..a94140c 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
@@ -35,78 +35,65 @@ public class CreateTrajectoryFromPointsController extends  StandaloneEventProces
 
 
 
-    public final static String WKT = "trajectory_wkt";
-    public final static String EPSG = "EPSG";
-    public final static String M = "M-Value";
-    public final static String DESCRIPTION = "description";
-    public final static String SUBPOINTS = "subpoints";
 
+    public final static String POINT_KEY = "point-key";
+    public final static String EPSG_KEY = "epsg-key";
+    public final static String M_KEY = "m-key";
+    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 EPA_NAME = "Create Single Trajectory";
 
 
     @Override
     public DataProcessorDescription declareModel() {
-        return ProcessingElementBuilder
-                .create("org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory",
-                        EPA_NAME,
-                        "Creates a trajectory from Points")
-                .category(DataProcessorType.GEO)
-                .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-                .requiredStream(
-                        StreamRequirementsBuilder
-                                .create()
-                                .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.domainPropertyReq("http://www.opengis.net/spec/geosparql/1.0#wktLiteral"),
-                                        Labels.from(WKT,
-                                                "Geometry WKT",
-                                                "WKT of the requested Geometry"),
-                                        PropertyScope.NONE
-                                )
-                                .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.domainPropertyReq("http://streampipes.org/epsg"),
-                                        Labels.from(EPSG, "EPSG Field", "EPSG Code for SRID"),
-                                        PropertyScope.NONE
-                                )
-                                .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.numberReq(),
-                                        Labels.from(M, "M Value", "Choose a value add to trajectory"),
-                                        PropertyScope.NONE
-                                )
-                                .build()
-                )
-                .requiredTextParameter(
-                        Labels.from(
-                                DESCRIPTION,
-                                "description of trajectory",
-                                "Add a description for the trajectory")
-                )
-                .requiredIntegerParameter(
-                        Labels.from(
-                                SUBPOINTS,
-                                "number of allowed subpoints",
-                                "Number og allowed subpoints of the trajector"),
-                        2, 10, 1
-                )
-                .outputStrategy(OutputStrategies.append(
-                        EpProperties.stringEp(
-                                Labels.from(
-                                        "trajectory_wkt",
-                                        "trajectory_wkt",
-                                        "trajectory wkt (lineString) of a point stream"),
-                                WKT,
-                                SO.Text),
-                        EpProperties.stringEp(
-                                Labels.from(
-                                        "trajectory_description",
-                                        "trajectory_description",
-                                        "description of trajectory"),
-                                DESCRIPTION,
-                                SO.Text))
-                )
-
-                .supportedFormats(SupportedFormats.jsonFormat())
-                .supportedProtocols(SupportedProtocols.kafka())
-                .build();
+      return ProcessingElementBuilder
+          .create("org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory")
+          .category(DataProcessorType.GEO)
+          .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+          .withLocales(Locales.EN)
+          .requiredStream(
+              StreamRequirementsBuilder
+                  .create()
+                  .requiredPropertyWithUnaryMapping(
+                      EpRequirements.domainPropertyReq("http://www.opengis.net/ont/geosparql#Geometry"),
+                      Labels.withId(POINT_KEY), PropertyScope.MEASUREMENT_PROPERTY
+                  )
+                  .requiredPropertyWithUnaryMapping(
+                      EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
+                      Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY
+                  )
+                  .requiredPropertyWithUnaryMapping(
+                      EpRequirements.numberReq(),
+                      Labels.withId(M_KEY),  PropertyScope.MEASUREMENT_PROPERTY
+                  )
+                  .build()
+          )
+          .requiredTextParameter(
+              Labels.withId(DESCRIPTION_KEY)
+          )
+          .requiredIntegerParameter(
+              Labels.withId(SUBPOINTS_KEY),
+              2, 30, 1
+          )
+
+          .outputStrategy(OutputStrategies.append(
+              EpProperties.numberEp(
+                  Labels.withId(M_KEY),
+                  "m-value",
+                  SO.Number
+              ),
+              EpProperties.numberEp(
+                  Labels.withId(WKT),
+                  "trajectory-wkt",
+                  "http://www.opengis.net/ont/geosparql#Geometry")
+              )
+          )
+
+          .supportedFormats(SupportedFormats.jsonFormat())
+          .supportedProtocols(SupportedProtocols.kafka())
+          .build();
     }
 
 
@@ -115,14 +102,14 @@ public class CreateTrajectoryFromPointsController extends  StandaloneEventProces
 
 
         String wkt = extractor.mappingPropertyValue(WKT);
-        String epsg_value = extractor.mappingPropertyValue(EPSG);
-        String m = extractor.mappingPropertyValue(M);
+        String epsg = extractor.mappingPropertyValue(EPSG_KEY);
+        String m = extractor.mappingPropertyValue(M_KEY);
 
-        String description = extractor.singleValueParameter(DESCRIPTION, String.class);
-        Integer subpoints = extractor.singleValueParameter(SUBPOINTS, Integer.class);
+        String description = extractor.singleValueParameter(DESCRIPTION_KEY, String.class);
+        Integer subpoints = extractor.singleValueParameter(SUBPOINTS_KEY, Integer.class);
 
 
-        CreateTrajectoryFromPointsParameter params = new CreateTrajectoryFromPointsParameter(graph, wkt, epsg_value, description, subpoints, m);
+        CreateTrajectoryFromPointsParameter params = new CreateTrajectoryFromPointsParameter(graph, wkt, epsg, description, subpoints, m);
 
         return new ConfiguredEventProcessor<>(params, CreateTrajectoryFromPoints::new);
     }
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
index a0dcba4..f38fef7 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
@@ -1,6 +1,20 @@
-org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.title=Static Google Maps Geocoder
-org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.description=GTrajectory from JTS point events
-appends these coordinates to every input event.
+org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.title=Single Trajectory Creator
+org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.description=Creates a trajectory from JTS point events
 
-place.title=Place
-place.description=Trajectory from single point events
+point-key.title=JTS Point Event
+point-key.description=Single Point Event which will be added to the trajectory
+
+point-key.title=JTS Point Event
+point-key.description=Single Point Event which will be added to the trajectory
+
+epsg-key.title=CRS of Input Point
+epsg-key.description=EPSG-Code of input point
+
+m-key.title=measurement value
+m-key.description=Measurement value which will be stored with each point event
+
+description-key.title=description text of trajectory
+description-key.description=A description text for the trajectory
+
+subpoints-key.title=number of allowed sub-points
+subpoints-key.description=amount of allowed sub-points, creating the trajectory


[incubator-streampipes-extensions] 01/03: ontologie

Posted by mi...@apache.org.
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

commit 3c2a94a3df09e3907bc234d666bebc259b9d2f04
Author: micklich <fl...@disy.net>
AuthorDate: Mon May 11 16:34:59 2020 +0200

    ontologie
---
 .../processor/trajectory/CreateTrajectoryFromPointsController.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 490007f..654a907 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
@@ -56,14 +56,14 @@ public class CreateTrajectoryFromPointsController extends  StandaloneEventProces
                         StreamRequirementsBuilder
                                 .create()
                                 .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.stringReq(),
+                                        EpRequirements.domainPropertyReq("http://www.opengis.net/spec/geosparql/1.0#wktLiteral"),
                                         Labels.from(WKT,
                                                 "Geometry WKT",
                                                 "WKT of the requested Geometry"),
                                         PropertyScope.NONE
                                 )
                                 .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.numberReq(),
+                                        EpRequirements.domainPropertyReq("http://streampipes.org/epsg"),
                                         Labels.from(EPSG, "EPSG Field", "EPSG Code for SRID"),
                                         PropertyScope.NONE
                                 )


[incubator-streampipes-extensions] 03/03: format code

Posted by mi...@apache.org.
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

commit c80f858a04295debc5dac4d4dd8c3bf0801fa2d7
Author: micklich <fl...@disy.net>
AuthorDate: Tue May 12 10:14:10 2020 +0200

    format code
---
 .../trajectory/CreateTrajectoryFromPoints.java     |  68 +++++----
 .../CreateTrajectoryFromPointsController.java      | 161 ++++++++++-----------
 .../CreateTrajectoryFromPointsParameter.java       |  69 +++++----
 3 files changed, 146 insertions(+), 152 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 26a695e..5ccb42e 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
@@ -31,52 +31,50 @@ import org.locationtech.jts.geom.Point;
 
 public class CreateTrajectoryFromPoints implements EventProcessor<CreateTrajectoryFromPointsParameter> {
 
-    private static Logger LOG;
+  private static Logger LOG;
 
-    private SpTrajectoryBuilder trajectory;
+  private SpTrajectoryBuilder trajectory;
 
-    private String geom_wkt;
-    private String epsg_code;
-    private String m_value;
+  private String geom_wkt;
+  private String epsg_code;
+  private String m_value;
 
+  @Override
+  public void onInvocation(CreateTrajectoryFromPointsParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
 
-    @Override
-    public void onInvocation(CreateTrajectoryFromPointsParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
+    LOG = params.getGraph().getLogger(CreateTrajectoryFromPointsParameter.class);
+    this.geom_wkt = params.getWkt();
+    this.epsg_code = params.getEpsg();
+    this.m_value = params.getM();
 
-        LOG = params.getGraph().getLogger(CreateTrajectoryFromPointsParameter.class);
-        this.geom_wkt =  params.getWkt();
-        this.epsg_code = params.getEpsg();
-        this.m_value = params.getM();
+    trajectory = new SpTrajectoryBuilder(params.getSubpoints(), params.getDescription());
+  }
 
-        trajectory = new SpTrajectoryBuilder(params.getSubpoints(), params.getDescription());
-    }
+  @Override
+  public void onEvent(Event in, SpOutputCollector out) {
 
-    @Override
-    public void onEvent(Event in, SpOutputCollector out) {
+    // extract values
+    String wkt = in.getFieldBySelector(geom_wkt).getAsPrimitive().getAsString();
+    Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
+    Integer m = in.getFieldBySelector(m_value).getAsPrimitive().getAsInt();
 
-        // extract values
-        String wkt = in.getFieldBySelector(geom_wkt).getAsPrimitive().getAsString();
-        Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
-        Integer m = in.getFieldBySelector(m_value).getAsPrimitive().getAsInt();
+    //create JTS geometry
+    Point eventGeom = (Point) SpGeometryBuilder.createSPGeom(wkt, epsg);
 
-        //create JTS geometry
-        Point eventGeom =  (Point) SpGeometryBuilder.createSPGeom(wkt,epsg);
+    //adds point and m value to trajectory object
+    trajectory.addPointToTrajectory(eventGeom, m);
+    // returns JTS LineString
+    LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
 
-        //adds point and m value to trajectory object
-        trajectory.addPointToTrajectory(eventGeom, m);
-        // returns JTS LineString
-        LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
+    // adds to stream
+    in.addField("wkt-trajectory", geom.toString());
+    in.addField("description", trajectory.getDescription());
+    out.collect(in);
+  }
 
-        // adds to stream
-        in.addField("wkt-trajectory", geom.toString());
-        in.addField("description", trajectory.getDescription());
-        out.collect(in);
+  @Override
+  public void onDetach() {
 
-    }
-
-    @Override
-    public void onDetach() {
-
-    }
+  }
 }
 
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 a94140c..e3c3021 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
@@ -31,86 +31,83 @@ import org.apache.streampipes.vocabulary.SO;
 import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
 import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
 
-public class CreateTrajectoryFromPointsController extends  StandaloneEventProcessingDeclarer<CreateTrajectoryFromPointsParameter> {
-
-
-
-
-    public final static String POINT_KEY = "point-key";
-    public final static String EPSG_KEY = "epsg-key";
-    public final static String M_KEY = "m-key";
-    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 EPA_NAME = "Create Single Trajectory";
-
-
-    @Override
-    public DataProcessorDescription declareModel() {
-      return ProcessingElementBuilder
-          .create("org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory")
-          .category(DataProcessorType.GEO)
-          .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-          .withLocales(Locales.EN)
-          .requiredStream(
-              StreamRequirementsBuilder
-                  .create()
-                  .requiredPropertyWithUnaryMapping(
-                      EpRequirements.domainPropertyReq("http://www.opengis.net/ont/geosparql#Geometry"),
-                      Labels.withId(POINT_KEY), PropertyScope.MEASUREMENT_PROPERTY
-                  )
-                  .requiredPropertyWithUnaryMapping(
-                      EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
-                      Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY
-                  )
-                  .requiredPropertyWithUnaryMapping(
-                      EpRequirements.numberReq(),
-                      Labels.withId(M_KEY),  PropertyScope.MEASUREMENT_PROPERTY
-                  )
-                  .build()
-          )
-          .requiredTextParameter(
-              Labels.withId(DESCRIPTION_KEY)
-          )
-          .requiredIntegerParameter(
-              Labels.withId(SUBPOINTS_KEY),
-              2, 30, 1
-          )
-
-          .outputStrategy(OutputStrategies.append(
-              EpProperties.numberEp(
-                  Labels.withId(M_KEY),
-                  "m-value",
-                  SO.Number
-              ),
-              EpProperties.numberEp(
-                  Labels.withId(WKT),
-                  "trajectory-wkt",
-                  "http://www.opengis.net/ont/geosparql#Geometry")
-              )
-          )
-
-          .supportedFormats(SupportedFormats.jsonFormat())
-          .supportedProtocols(SupportedProtocols.kafka())
-          .build();
-    }
-
-
-    @Override
-    public ConfiguredEventProcessor<CreateTrajectoryFromPointsParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
-
-
-        String wkt = extractor.mappingPropertyValue(WKT);
-        String epsg = extractor.mappingPropertyValue(EPSG_KEY);
-        String m = extractor.mappingPropertyValue(M_KEY);
-
-        String description = extractor.singleValueParameter(DESCRIPTION_KEY, String.class);
-        Integer subpoints = extractor.singleValueParameter(SUBPOINTS_KEY, Integer.class);
-
-
-        CreateTrajectoryFromPointsParameter params = new CreateTrajectoryFromPointsParameter(graph, wkt, epsg, description, subpoints, m);
-
-        return new ConfiguredEventProcessor<>(params, CreateTrajectoryFromPoints::new);
-    }
+public class CreateTrajectoryFromPointsController extends StandaloneEventProcessingDeclarer<CreateTrajectoryFromPointsParameter> {
+
+
+  public final static String POINT_KEY = "point-key";
+  public final static String EPSG_KEY = "epsg-key";
+  public final static String M_KEY = "m-key";
+  public final static String DESCRIPTION_KEY = "description-key";
+  public final static String SUBPOINTS_KEY = "subpoints-key";
+
+  public final static String WKT = "trajectory_wkt";
+
+
+  @Override
+  public DataProcessorDescription declareModel() {
+    return ProcessingElementBuilder
+        .create("org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory")
+        .category(DataProcessorType.GEO)
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+        .withLocales(Locales.EN)
+        .requiredStream(
+            StreamRequirementsBuilder
+                .create()
+                .requiredPropertyWithUnaryMapping(
+                    EpRequirements.domainPropertyReq("http://www.opengis.net/ont/geosparql#Geometry"),
+                    Labels.withId(POINT_KEY), PropertyScope.MEASUREMENT_PROPERTY
+                )
+                .requiredPropertyWithUnaryMapping(
+                    EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
+                    Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY
+                )
+                .requiredPropertyWithUnaryMapping(
+                    EpRequirements.numberReq(),
+                    Labels.withId(M_KEY), PropertyScope.MEASUREMENT_PROPERTY
+                )
+                .build()
+        )
+        .requiredTextParameter(
+            Labels.withId(DESCRIPTION_KEY)
+        )
+        .requiredIntegerParameter(
+            Labels.withId(SUBPOINTS_KEY),
+            2, 30, 1
+        )
+
+        .outputStrategy(OutputStrategies.append(
+            EpProperties.numberEp(
+                Labels.withId(M_KEY),
+                "m-value",
+                SO.Number
+            ),
+            EpProperties.numberEp(
+                Labels.withId(WKT),
+                "trajectory-wkt",
+                "http://www.opengis.net/ont/geosparql#Geometry")
+            )
+        )
+
+        .supportedFormats(SupportedFormats.jsonFormat())
+        .supportedProtocols(SupportedProtocols.kafka())
+        .build();
+  }
+
+
+  @Override
+  public ConfiguredEventProcessor<CreateTrajectoryFromPointsParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
+
+
+    String wkt = extractor.mappingPropertyValue(WKT);
+    String epsg = extractor.mappingPropertyValue(EPSG_KEY);
+    String m = extractor.mappingPropertyValue(M_KEY);
+
+    String description = extractor.singleValueParameter(DESCRIPTION_KEY, String.class);
+    Integer subpoints = extractor.singleValueParameter(SUBPOINTS_KEY, Integer.class);
+
+
+    CreateTrajectoryFromPointsParameter params = new CreateTrajectoryFromPointsParameter(graph, wkt, epsg, description, subpoints, m);
+
+    return new ConfiguredEventProcessor<>(params, CreateTrajectoryFromPoints::new);
+  }
 }
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
index 0397ac5..872fb00 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
@@ -23,39 +23,38 @@ import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams
 
 public class CreateTrajectoryFromPointsParameter extends EventProcessorBindingParams {
 
-    private String epsg;
-    private String wkt;
-    private String description;
-    private Integer subpoints;
-    private String m;
-
-
-    public CreateTrajectoryFromPointsParameter(DataProcessorInvocation graph, String wkt, String epsg, String description, Integer subpoints, String m) {
-        super(graph);
-        this.wkt = wkt;
-        this.epsg = epsg;
-        this.description = description;
-        this.subpoints = subpoints;
-        this.m = m;
-    }
-
-    public String getEpsg() {
-        return epsg;
-    }
-
-    public String getWkt() {
-        return wkt;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public Integer getSubpoints() {
-        return subpoints;
-    }
-
-    public String getM() {
-        return m;
-    }
+  private String epsg;
+  private String wkt;
+  private String description;
+  private Integer subpoints;
+  private String m;
+
+  public CreateTrajectoryFromPointsParameter(DataProcessorInvocation graph, String wkt, String epsg, String description, Integer subpoints, String m) {
+    super(graph);
+    this.wkt = wkt;
+    this.epsg = epsg;
+    this.description = description;
+    this.subpoints = subpoints;
+    this.m = m;
+  }
+
+  public String getEpsg() {
+    return epsg;
+  }
+
+  public String getWkt() {
+    return wkt;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  public Integer getSubpoints() {
+    return subpoints;
+  }
+
+  public String getM() {
+    return m;
+  }
 }