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/04/29 14:17:57 UTC

[incubator-streampipes-extensions] branch feature/trajectory created (now 225f3eb)

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.


      at 225f3eb  trajectory class misc changes (spelling javadoc)

This branch includes the following new commits:

     new 285c684  added PE
     new f40542f  extended Geometry helper with WKT Reader
     new 0cfd6dc  changed javadoc
     new 225f3eb  trajectory class misc changes (spelling javadoc)

The 4 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.



[incubator-streampipes-extensions] 04/04: trajectory class misc changes (spelling javadoc)

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 225f3eb3a1f5841fb6062aa7f20c53141ab47226
Author: micklich <fl...@disy.net>
AuthorDate: Wed Apr 29 16:17:27 2020 +0200

    trajectory class misc changes (spelling javadoc)
---
 .../processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java   | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
index 4c9cc0d..7f6b48b 100644
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
@@ -18,7 +18,6 @@
 
 package org.apache.streampipes.processors.geo.jvm.jts.helper;
 
-
 import org.locationtech.jts.geom.*;
 
 public class SpTrajectoryBuilder {
@@ -29,7 +28,7 @@ public class SpTrajectoryBuilder {
 
     /**
      * Constructor of SpTrajectory
-     * @param numberSubPoints Integer number of allowed subpoints of the trajectory
+     * @param numberSubPoints Integer number of allowed sub-points of the trajectory
      * @param description Text Description of the single Trajectory
      */
     public SpTrajectoryBuilder(int numberSubPoints, String description) {
@@ -41,17 +40,16 @@ public class SpTrajectoryBuilder {
 
     /**
      * getter method for description text
-     * @return
+     * @return description text
      */
     public String getDescription() {
         return description;
     }
 
     /**
-     * Adds a Point to the trajectory object and also handle removement depending on the
-     * number of choosen Subpoints
-     * @param point Point geometry
-     * @param m stores an extra integer to the subpoint of a trajectory
+     * Adds a Point to the trajectory object and also handle removes old point if {link #numberSubPoints} threshold is exceeded.
+     * @param point {@link org.locationtech.jts.geom.Point}
+     * @param m stores an extra integer to the sub-point of a trajectory {@link org.locationtech.jts.geom.CoordinateXYM#M}
      */
     public void addPointToTrajectory(Point point, Integer m) {
         coordinateList.add(createSingleTrajectoryCoordinate(point, m));


[incubator-streampipes-extensions] 03/04: changed javadoc

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 0cfd6dc563be6aecb703cdd2b168fe1a08d33537
Author: micklich <fl...@disy.net>
AuthorDate: Wed Apr 29 15:54:14 2020 +0200

    changed javadoc
---
 .../geo/jvm/jts/helper/SpGeometryBuilder.java      | 48 +++++++++++-----------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java
index 136db98..8d7a436 100644
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java
@@ -27,16 +27,16 @@ public class SpGeometryBuilder {
   final static double LONGITUDE_MIN = -180.00;
   final static double LONGITUDE_MAX = 180.00;
   final static double LATITUDE_MIN = -90;
-  final static double LATITIDE_MAX = 90;
+  final static double LATITUDE_MAX = 90;
 
 
-  /**Creates a JTS point geometry from Longitude and Latitude values
+  /**
+   * Creates a {@link org.locationtech.jts.geom.Point} from <code>Latitude</code> and <code> Longitude</code> values
    *
-   * @param lng Longitude value in the range -180 <Longitude > 180
-   * @param lat Latitude value in the range -90 <LATITUDE > 90
-   * @param epsg EPSG Code for projection info
-   * @return a JTS Point Geometry Object with lat lng values. An empty point geometry is created if Latitude or Longitude values are out of range
-   * or has null values.
+   * @param lng  Longitude value in the range -180 &lt; Longitude &gt; 180
+   * @param lat  Latitude value in the range -90 &lt; LATITUDE &gt; 90
+   * @param epsg EPSG Code representing coordinate reference system
+   * @return a {@link org.locationtech.jts.geom.Point}. An empty point geometry is created if Latitude or Longitude values are out of range or has null values.
    */
   public static Point createSPGeom(Double lng, Double lat, Integer epsg) {
     Point point;
@@ -46,7 +46,7 @@ public class SpGeometryBuilder {
     //check if value is not null due missing stream value
     if ((lng != null) && (lat != null)) {
       //check if lat lng is in typical range
-      if (isInWGSCoordinateRange(lng, LONGITUDE_MIN, LONGITUDE_MAX) || isInWGSCoordinateRange(lat, LATITUDE_MIN, LATITIDE_MAX)) {
+      if (isInWGSCoordinateRange(lng, LONGITUDE_MIN, LONGITUDE_MAX) || isInWGSCoordinateRange(lat, LATITUDE_MIN, LATITUDE_MAX)) {
 
         Coordinate coordinate = new Coordinate(lng, lat);
         point = geomFactory.createPoint(coordinate);
@@ -68,10 +68,9 @@ public class SpGeometryBuilder {
    * geom is returned. method calls getPrecision method and creates a jts geometry factory and a WKT-parser object.
    * from the wktString the
    *
-   * @param wktString wkt text
-   * @param epsg EPSG Code for projection info
-   * @return Geometry geom: a JTS Geometry Object depending on the WKT input. An empty point geometry is created if Latitude or Longitude values are out of range
-   *    * or has null values
+   * @param wktString Well-known text representation of the input geometry
+   * @param epsg      EPSG Code representing SRID
+   * @return {@link org.locationtech.jts.geom.Geometry}. An empty point geometry is created if {@link org.locationtech.jts.io.ParseException} due invalid WKT-String
    */
   public static Geometry createSPGeom(String wktString, Integer epsg) {
 
@@ -92,25 +91,26 @@ public class SpGeometryBuilder {
   }
 
 
-
   /**
+   * Is in wgs coordinate range boolean.
    *
-   * @param checkedvalue Any Value
-   * @param min Min value to check
-   * @param max max value to check
-   * @return boolean value true or false
+   * @param valueToCheck Any Value
+   * @param min          Min value to check
+   * @param max          max value to check
+   * @return true if value is in min max range
    */
-  private static boolean isInWGSCoordinateRange(double checkedvalue, double min, double max){
-    return checkedvalue > min && checkedvalue < max;
+  private static boolean isInWGSCoordinateRange(double valueToCheck, double min, double max){
+    return valueToCheck > min && valueToCheck < max;
   }
 
 
   /**
-   * Creates a JTS PrecisionModel with a specific precision.
-   * WGS84/WGS84 will be created with 7 decimal positions.
-   * Any other epsg code will create a precision with Ffloating type. See JTS PrecisionModel for more information
-   * @param epsg EPSG alue
-   * @return a JTS PrecisionModel
+   * Creates a {@link org.locationtech.jts.geom.PrecisionModel} with a specific precision.
+   * WGS84/WGS84 will be created a {@link org.locationtech.jts.geom.PrecisionModel#FIXED} with 7 decimal positions (scale 1000000).
+   * Any other epsg code will create a precision with {@link org.locationtech.jts.geom.PrecisionModel#FLOATING}.
+   *
+   * @param epsg EPSG Code representing SRID
+   * @return {@link org.locationtech.jts.geom.PrecisionModel}
    */
   private static PrecisionModel getPrecisionModel(Integer epsg) {
     PrecisionModel precisionModel;


[incubator-streampipes-extensions] 02/04: extended Geometry helper with WKT Reader

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 f40542f8348bc1559ba296f72737e0c954a02b0f
Author: micklich <fl...@disy.net>
AuthorDate: Tue Apr 28 17:24:42 2020 +0200

    extended Geometry helper with WKT Reader
    
    
    Revert "extended Geometry helper with WKT Reader"
    
    This reverts commit e4cb162fef10504d67c83cc8340f93615d316d81.
    
    added WKT reader, trajectory class and documentation
    
    This reverts commit 953c1b65c30249fe10e7d8caae713892daa4e16f.
---
 .../geo/jvm/jts/helper/SpGeometryBuilder.java      |  35 ++++++-
 .../geo/jvm/jts/helper/SpTrajectoryBuilder.java    | 107 +++++++++++++++++++++
 .../documentation.md                               |  77 +++++++++++++++
 .../icon.png                                       | Bin 0 -> 9399 bytes
 .../strings.en                                     |   6 ++
 5 files changed, 224 insertions(+), 1 deletion(-)

diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java
index c72635a..136db98 100644
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java
@@ -19,6 +19,8 @@
 package org.apache.streampipes.processors.geo.jvm.jts.helper;
 
 import org.locationtech.jts.geom.*;
+import org.locationtech.jts.io.ParseException;
+import org.locationtech.jts.io.WKTReader;
 
 public class SpGeometryBuilder {
 
@@ -32,7 +34,7 @@ public class SpGeometryBuilder {
    *
    * @param lng Longitude value in the range -180 <Longitude > 180
    * @param lat Latitude value in the range -90 <LATITUDE > 90
-   * @param epsg EPSG Code for projection onfo
+   * @param epsg EPSG Code for projection info
    * @return a JTS Point Geometry Object with lat lng values. An empty point geometry is created if Latitude or Longitude values are out of range
    * or has null values.
    */
@@ -60,6 +62,37 @@ public class SpGeometryBuilder {
     return point;
   }
 
+
+  /**
+   * creates a Geometry from a wkt_string. string has to be valid and is not be checked. If invalid, an empty point
+   * geom is returned. method calls getPrecision method and creates a jts geometry factory and a WKT-parser object.
+   * from the wktString the
+   *
+   * @param wktString wkt text
+   * @param epsg EPSG Code for projection info
+   * @return Geometry geom: a JTS Geometry Object depending on the WKT input. An empty point geometry is created if Latitude or Longitude values are out of range
+   *    * or has null values
+   */
+  public static Geometry createSPGeom(String wktString, Integer epsg) {
+
+    Geometry geom;
+    PrecisionModel prec = getPrecisionModel(epsg);
+
+    GeometryFactory geomFactory = new GeometryFactory(prec, epsg);
+    WKTReader wktReader = new WKTReader(geomFactory);
+
+    try {
+      geom = wktReader.read(wktString);
+    } catch (ParseException e) {
+      // if wktString is invalid, an empty point geometry will be created as returnedGeom
+      geom = geomFactory.createPoint();
+    }
+
+    return geom;
+  }
+
+
+
   /**
    *
    * @param checkedvalue Any Value
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
new file mode 100644
index 0000000..4c9cc0d
--- /dev/null
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.processors.geo.jvm.jts.helper;
+
+
+import org.locationtech.jts.geom.*;
+
+public class SpTrajectoryBuilder {
+
+    private int numberSubPoints;
+    private String description;
+    private CoordinateList coordinateList;
+
+    /**
+     * Constructor of SpTrajectory
+     * @param numberSubPoints Integer number of allowed subpoints of the trajectory
+     * @param description Text Description of the single Trajectory
+     */
+    public SpTrajectoryBuilder(int numberSubPoints, String description) {
+        this.numberSubPoints = numberSubPoints;
+        this.description = description;
+        this.coordinateList = new CoordinateList();
+    }
+
+
+    /**
+     * getter method for description text
+     * @return
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Adds a Point to the trajectory object and also handle removement depending on the
+     * number of choosen Subpoints
+     * @param point Point geometry
+     * @param m stores an extra integer to the subpoint of a trajectory
+     */
+    public void addPointToTrajectory(Point point, Integer m) {
+        coordinateList.add(createSingleTrajectoryCoordinate(point, m));
+        if (coordinateList.size() > numberSubPoints) {
+            removeOldestPoint();
+        }
+    }
+
+
+    /**
+     * returns a JTS LineString geometry from the trajectory object. LineString only stores the point geometry without M value.
+     *  The lineString is oriented to the trajectory direction. This means: the newest point is always the last point and has the
+     *  highest subpoint index. The First point is the oldest point with the lowest index [0]
+     * @param factory a Geometry factory for creating the lineString with the same precision and CRS and should be
+     *                the factory of the input point geometry
+     * @return JTS LineString JTS LineString
+     */
+    public LineString returnAsLineString(GeometryFactory factory){
+        LineString geom;
+        if ( coordinateList.size() > 1) {
+            //only linestring if more than 2 points.
+            // reverse output of linestring. so last added point is first
+            geom = factory.createLineString(coordinateList.toCoordinateArray());
+        } else {
+            geom = factory.createLineString();
+        }
+
+        return geom;
+    }
+
+    /**
+     * removes the oldest point (Index 0) from the CoordinateList object.
+     */
+    private void removeOldestPoint(){
+        coordinateList.remove(0);
+    }
+
+    /**
+     * Creates an Coordinate object with X, Y and M Value to be stored later directly in the trajectory object. Should be used
+     * always used if adding a subpoint to the trajectory list
+     * @param geom Point geometry, which coordinates will be added to the trajectory list
+     * @param m Integer M value, which will be used to store as extra parameter  in the trajectory list
+     * @return CoordinateXYM coordinate object
+     */
+    private CoordinateXYM createSingleTrajectoryCoordinate(Point geom, Integer m){
+        CoordinateXYM coordinate =new CoordinateXYM((geom.getX()), geom.getY(), m);
+        return coordinate;
+    }
+
+
+}
+
+
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/documentation.md b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/documentation.md
new file mode 100644
index 0000000..1fbec38
--- /dev/null
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/documentation.md
@@ -0,0 +1,77 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  ~
+  -->
+
+## Trajectory from JTS Point
+
+<p align="center">
+    <img src="icon.png" width="150px;" class="pe-image-documentation"/>
+</p>
+
+***
+
+## Description
+
+This processor creates a JTS LineString geometry from  JTS Points events, represent a trajectory. A trajectory is defined  as the path that a moving object follows through space as a function of time. Each sub-point of this LineString represents a single event. The latest sub-point represents the latest geo-event. For each Point event it is also possible to store an additional m-value representing for example actually speed, distance, duration or direction of this event. A trajectory con [...]
+***
+
+## Required input
+
+*  WKT String of a JTS Point Geometry
+*  Integer value representing EPSG code
+*  Number value for M-value
+
+
+***
+
+## Configuration
+
+Creates a JTS Geometry LineString from a JTS Point Geometries events representing a trajectory.
+
+
+### 1st parameter
+Point WKT String
+
+### 2nd parameter
+EPSG code value
+
+### 3rd parameter
+M-value for each sub-point of the trajectory
+
+### 4rd parameter
+String for a description text for the trajectory
+
+### 5rd parameter
+Number of allowed sub-points
+
+***
+
+## Output
+
+Adds a LineString geometry in the Well Known Text to the event, representing a trajectory. Also the description text is added to the event stream. The first existing event creates an empty LineString.
+
+### Example
+Creating a LineString with a threshold of 2 allowed sub-points:
+
+* First Event:
+  * Point(8.12 41.23) --> LineString <empty>
+* Second Event:
+  * Point(8.56 41.25) --> LineString(8.12 41.23, 8.56 41.25)
+* Second Event:
+  * Point(8.84 40.98) --> LineString(8.56 41.25, 8.84 40.98)
+
+M-value is not represented in the LineString but will be stored for internal use!
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/icon.png b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/icon.png
new file mode 100644
index 0000000..7389006
Binary files /dev/null and b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/icon.png differ
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
new file mode 100644
index 0000000..a0dcba4
--- /dev/null
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
@@ -0,0 +1,6 @@
+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.
+
+place.title=Place
+place.description=Trajectory from single point events


[incubator-streampipes-extensions] 01/04: added PE

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 285c684bf33c85de8ec8011896fba95d46718230
Author: micklich <fl...@disy.net>
AuthorDate: Tue Apr 28 17:22:51 2020 +0200

    added PE
---
 .../streampipes/processors/geo/jvm/GeoJvmInit.java |  20 ++--
 .../trajectory/CreateTrajectoryFromPoints.java     |  73 ++++++++++++
 .../CreateTrajectoryFromPointsController.java      | 129 +++++++++++++++++++++
 .../CreateTrajectoryFromPointsParameter.java       |  61 ++++++++++
 4 files changed, 274 insertions(+), 9 deletions(-)

diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
index f82df33..41b30ce 100644
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
@@ -29,6 +29,7 @@ import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory;
 import org.apache.streampipes.processors.geo.jvm.config.GeoJvmConfig;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.LatLngToGeoController;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG.SetEpsgController;
+import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.CreateTrajectoryFromPointsController;
 import org.apache.streampipes.processors.geo.jvm.processor.distancecalculator.DistanceCalculatorController;
 import org.apache.streampipes.processors.geo.jvm.processor.geocoder.GoogleMapsGeocodingController;
 import org.apache.streampipes.processors.geo.jvm.processor.revgeocoder.ReverseGeocodingController;
@@ -40,15 +41,16 @@ public class GeoJvmInit extends StandaloneModelSubmitter {
 
   public static void main(String[] args) {
     DeclarersSingleton
-        .getInstance()
-        .add(new DistanceCalculatorController())
-        .add(new GoogleMapsGeocodingController())
-        .add(new StaticGoogleMapsGeocodingController())
-        .add(new ReverseGeocodingController())
-        .add(new SetEpsgController())
-        .add(new LatLngToGeoController())
-        .add(new SpeedCalculatorController())
-        .add(new StaticDistanceCalculatorController());
+            .getInstance()
+            .add(new DistanceCalculatorController())
+            .add(new GoogleMapsGeocodingController())
+            .add(new StaticGoogleMapsGeocodingController())
+            .add(new ReverseGeocodingController())
+            .add(new SetEpsgController())
+            .add(new LatLngToGeoController())
+            .add(new CreateTrajectoryFromPointsController())
+            .add(new SpeedCalculatorController())
+            .add(new StaticDistanceCalculatorController());
 
 
     DeclarersSingleton.getInstance().registerDataFormats(new JsonDataFormatFactory(),
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
new file mode 100755
index 0000000..3ad78d9
--- /dev/null
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory;
+
+import org.apache.streampipes.logging.api.Logger;
+import org.apache.streampipes.model.runtime.Event;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpTrajectoryBuilder;
+import org.apache.streampipes.wrapper.context.EventProcessorRuntimeContext;
+import org.apache.streampipes.wrapper.routing.SpOutputCollector;
+import org.apache.streampipes.wrapper.runtime.EventProcessor;
+import org.locationtech.jts.geom.LineString;
+import org.locationtech.jts.geom.Point;
+
+
+public class CreateTrajectoryFromPoints implements EventProcessor<CreateTrajectoryFromPointsParameter> {
+
+    private static Logger LOG;
+    private CreateTrajectoryFromPointsParameter params;
+    SpTrajectoryBuilder trajectory;
+
+
+
+    @Override
+    public void onInvocation(CreateTrajectoryFromPointsParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
+
+        LOG = params.getGraph().getLogger(CreateTrajectoryFromPointsParameter.class);
+        this.params = params;
+
+        trajectory = new SpTrajectoryBuilder(params.getSubpoints(), params.getDescription());
+    }
+
+    @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();
+
+        Point eventGeom =  (Point) SpGeometryBuilder.createSPGeom(wkt,epsg);
+
+        //creates single trajectory
+        trajectory.addPointToTrajectory(eventGeom, m);
+        LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
+
+        in.addField(CreateTrajectoryFromPointsController.WKT, geom.toString());
+        in.addField(CreateTrajectoryFromPointsController.DESCRIPTION, trajectory.getDescription());
+        out.collect(in);
+
+    }
+
+    @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
new file mode 100755
index 0000000..490007f
--- /dev/null
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory;
+
+import org.apache.streampipes.model.DataProcessorType;
+import org.apache.streampipes.model.graph.DataProcessorDescription;
+import org.apache.streampipes.model.graph.DataProcessorInvocation;
+import org.apache.streampipes.model.schema.PropertyScope;
+import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
+import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
+import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor;
+import org.apache.streampipes.sdk.helpers.*;
+import org.apache.streampipes.sdk.utils.Assets;
+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 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 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.stringReq(),
+                                        Labels.from(WKT,
+                                                "Geometry WKT",
+                                                "WKT of the requested Geometry"),
+                                        PropertyScope.NONE
+                                )
+                                .requiredPropertyWithUnaryMapping(
+                                        EpRequirements.numberReq(),
+                                        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();
+    }
+
+
+    @Override
+    public ConfiguredEventProcessor<CreateTrajectoryFromPointsParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
+
+
+        String wkt = extractor.mappingPropertyValue(WKT);
+        String epsg_value = extractor.mappingPropertyValue(EPSG);
+        String m = extractor.mappingPropertyValue(M);
+
+        String description = extractor.singleValueParameter(DESCRIPTION, String.class);
+        Integer subpoints = extractor.singleValueParameter(SUBPOINTS, Integer.class);
+
+
+        CreateTrajectoryFromPointsParameter params = new CreateTrajectoryFromPointsParameter(graph, wkt, epsg_value, 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
new file mode 100755
index 0000000..0397ac5
--- /dev/null
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory;
+
+import org.apache.streampipes.model.graph.DataProcessorInvocation;
+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;
+    }
+}