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:32:29 UTC

[incubator-streampipes-extensions] branch dev updated: fix STREAMPIPES-123

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new d7f821d  fix STREAMPIPES-123
d7f821d is described below

commit d7f821da48b79a7e1b8cb7144cb0360e3e79b453
Author: micklich <fl...@disy.net>
AuthorDate: Tue May 12 17:05:53 2020 +0200

    fix STREAMPIPES-123
---
 .../processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java    | 2 +-
 .../geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java     | 5 ++---
 .../processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java            | 3 +--
 .../processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java  | 3 ++-
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java
index a746583..652b412 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java
@@ -55,7 +55,7 @@ public class LatLngToGeo implements EventProcessor<LatLngToGeoParameter> {
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      in.addField(LatLngToGeoController.WKT, geom.toString());
+      in.addField(LatLngToGeoController.WKT_RUNTIME, geom.toString());
       out.collect(in);
     } else {
       LOG.warn("An empty point geometry in " + LatLngToGeoController.EPA_NAME + " is created due" +
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
index d9a82c9..747ffaf 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
@@ -40,8 +40,7 @@ public class LatLngToGeoController extends StandaloneEventProcessingDeclarer<Lat
   public final static String LNG_KEY = "longitude-key";
   public final static String EPSG_KEY = "epsg-key";
 
-
-  public final static String WKT = "geom-wkt";
+  public final static String WKT_RUNTIME = "geomWKT";
   public final static String EPA_NAME = "Create Point from Latitude and Longitude";
 
   @Override
@@ -67,7 +66,7 @@ public class LatLngToGeoController extends StandaloneEventProcessingDeclarer<Lat
         .outputStrategy(
             OutputStrategies.append(
                 PrimitivePropertyBuilder
-                    .create(Datatypes.String, WKT)
+                    .create(Datatypes.String, WKT_RUNTIME)
                     .domainProperty("http://www.opengis.net/ont/geosparql#Geometry")
                     .build())
         )
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java
index f4a0851..4d5639b 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java
@@ -41,8 +41,7 @@ public class SetEPSG implements EventProcessor<SetEpsgParameter> {
 
   @Override
   public void onEvent(Event in, SpOutputCollector out) {
-    //in.addField("epsg-key", epsg);
-    in.addField("epsg", epsg);
+    in.addField(SetEpsgController.EPSG_RUNTIME, epsg);
 
     out.collect(in);
   }
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
index db76c74..d438d25 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
@@ -38,6 +38,7 @@ public class SetEpsgController extends StandaloneEventProcessingDeclarer<SetEpsg
   public final static String EPA_NAME = "EPSG Enricher";
 
   public final static String EPSG_KEY = "epsg-key";
+  public final static String EPSG_RUNTIME = "epsg";
 
   @Override
   public DataProcessorDescription declareModel() {
@@ -53,7 +54,7 @@ public class SetEpsgController extends StandaloneEventProcessingDeclarer<SetEpsg
 
         .outputStrategy(
             OutputStrategies.append(PrimitivePropertyBuilder
-                .create(Datatypes.Integer, "epsg")
+                .create(Datatypes.Integer, EPSG_RUNTIME)
                 .domainProperty("http://data.ign.fr/def/ignf#CartesianCS")
                 .build())
         )