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:37:50 UTC

[incubator-streampipes-extensions] branch dev updated (8987e88 -> b6bfcb9)

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

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


    from 8987e88  Merge pull request #12 from grainier/STREAMPIPES-121
     new fd4572d  change to ontology vocabulary, changed text and new icon
     new f326c85  format fix
     new 67f992b  env
     new 26e4684  changed from label.from to withID
     new b6bfcb9  adding feature to dev and code formating

The 5 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:
 streampipes-processors-geo-jvm/development/env     |   4 +-
 .../geo/jvm/jts/helper/SpGeometryBuilder.java      |  17 ++--
 .../jvm/jts/processor/latLngToGeo/LatLngToGeo.java |  60 ++++++------
 .../latLngToGeo/LatLngToGeoController.java         | 108 ++++++++++-----------
 .../latLngToGeo/LatLngToGeoParameter.java          |  36 +++----
 .../geo/jvm/jts/processor/setEPSG/SetEPSG.java     |  34 +++----
 .../jts/processor/setEPSG/SetEpsgController.java   |  72 +++++++-------
 .../jts/processor/setEPSG/SetEpsgParameter.java    |  16 +--
 .../documentation.md                               |  12 +--
 .../icon.png                                       | Bin 19124 -> 20621 bytes
 .../strings.en                                     |  10 +-
 .../icon.png                                       | Bin 4831 -> 8710 bytes
 .../strings.en                                     |   9 +-
 13 files changed, 185 insertions(+), 193 deletions(-)


[incubator-streampipes-extensions] 04/05: changed from label.from to withID

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

commit 26e4684a16ef481117f1e09f3aa0192e68a36306
Author: micklich <fl...@disy.net>
AuthorDate: Mon May 11 23:52:20 2020 +0200

    changed from label.from to withID
---
 .../jvm/jts/processor/latLngToGeo/LatLngToGeo.java |  18 +++--
 .../latLngToGeo/LatLngToGeoController.java         |  79 +++++++++------------
 .../latLngToGeo/LatLngToGeoParameter.java          |  10 +--
 .../geo/jvm/jts/processor/setEPSG/SetEPSG.java     |   9 +--
 .../jts/processor/setEPSG/SetEpsgController.java   |  52 +++++++-------
 .../jts/processor/setEPSG/SetEpsgParameter.java    |  10 +--
 .../strings.en                                     |   7 +-
 .../icon.png                                       | Bin 4831 -> 8710 bytes
 .../strings.en                                     |   9 ++-
 9 files changed, 93 insertions(+), 101 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 25bbf6a..13adaeb 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
@@ -30,23 +30,29 @@ import org.apache.streampipes.model.runtime.Event;
 public class LatLngToGeo implements EventProcessor<LatLngToGeoParameter> {
 
     private static Logger LOG;
-    private LatLngToGeoParameter params;
+    private String latitude;
+    private String longitude;
+    private String epsg_code;
 
 
     @Override
     public void onInvocation(LatLngToGeoParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
 
         LOG = params.getGraph().getLogger(LatLngToGeoParameter.class);
-        this.params = params;
+        this.latitude =  params.getLat();
+        this.longitude= params.getLng();
+        this.epsg_code = params.getEpsg();
+
     }
 
     @Override
     public void onEvent(Event in, SpOutputCollector out) {
 
-        Double lat = in.getFieldBySelector(params.getLat()).getAsPrimitive().getAsDouble();
-        Double lng = in.getFieldBySelector(params.getLng()).getAsPrimitive().getAsDouble();
-        Integer epsg_value = in.getFieldBySelector(params.getEpsg_value()).getAsPrimitive().getAsInt();
-        Point geom =  SpGeometryBuilder.createSPGeom(lng, lat, epsg_value);
+        Double lat = in.getFieldBySelector(latitude).getAsPrimitive().getAsDouble();
+        Double lng = in.getFieldBySelector(longitude).getAsPrimitive().getAsDouble();
+        Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
+
+        Point geom =  SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
         if (!geom.isEmpty()){
             in.addField(LatLngToGeoController.WKT, geom.toString());
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 78b5791..aa1d027 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
@@ -22,65 +22,54 @@ 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.PrimitivePropertyBuilder;
 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.sdk.utils.Datatypes;
 import org.apache.streampipes.vocabulary.Geo;
-import org.apache.streampipes.vocabulary.SO;
 import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
 import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
 
 public class LatLngToGeoController extends  StandaloneEventProcessingDeclarer<LatLngToGeoParameter> {
 
 
-    public final static String LAT_FIELD = "lat_field";
-    public final static String LNG_FIELD = "lng_field";
-    public final static String EPSG = "EPSG";
-    public final static String WKT = "geom_wkt";
-    public final static String EPA_NAME = "Create Point from Latitude and Longitude";
+    public final static String LAT_KEY = "latitude-key";
+    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 EPA_NAME = "Create Point from Latitude and Longitude";
 
     @Override
     public DataProcessorDescription declareModel() {
         return ProcessingElementBuilder
-                .create("org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo",
-                        EPA_NAME,
-                        "Creates a point geometry from Latitude and Longitude values")
-                .category(DataProcessorType.GEO)
-                .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-                .requiredStream(
-                        StreamRequirementsBuilder
-                                .create()
-                                .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.domainPropertyReq(Geo.lat),
-                                        Labels.from(LAT_FIELD,
-                                                "Latitude field",
-                                                "Latitude value"),
-                                        PropertyScope.NONE
-                                )
-                                .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.domainPropertyReq(Geo.lng),
-                                        Labels.from(LNG_FIELD,
-                                                "Longitude field",
-                                                "Longitude value"),
-                                        PropertyScope.NONE
-                                )
-                                .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.numberReq(),
-                                        Labels.from(EPSG, "EPSG Field", "EPSG Code for SRID"),
-                                        PropertyScope.NONE
-                                )
-                                .build()
+            .create("org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo")
+            .category(DataProcessorType.GEO)
+            .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+            .withLocales(Locales.EN)
+            .requiredStream(
+                StreamRequirementsBuilder
+                    .create()
+                    .requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lat),
+                        Labels.withId(LAT_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                    .requiredPropertyWithUnaryMapping(
+                        EpRequirements.domainPropertyReq(Geo.lng),
+                        Labels.withId(LNG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                    .requiredPropertyWithUnaryMapping(
+                        EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
+                        Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                    .build()
                 )
-                .outputStrategy(OutputStrategies.append(EpProperties.stringEp(
-                        Labels.from(
-                                "point_wkt",
-                                "wkt",
-                                "wkt point from long lat values"),
-                        WKT,
-                        SO.Text))
+                .outputStrategy(
+                    OutputStrategies.append(
+                        PrimitivePropertyBuilder
+                            .create(Datatypes.String, WKT)
+                            .domainProperty("http://www.opengis.net/ont/geosparql#Geometry")
+                        .build())
                 )
 
                 .supportedFormats(SupportedFormats.jsonFormat())
@@ -93,11 +82,11 @@ public class LatLngToGeoController extends  StandaloneEventProcessingDeclarer<La
     public ConfiguredEventProcessor<LatLngToGeoParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
 
 
-        String lat = extractor.mappingPropertyValue(LAT_FIELD);
-        String lng = extractor.mappingPropertyValue(LNG_FIELD);
-        String epsg_value = extractor.mappingPropertyValue(EPSG);
+        String lat = extractor.mappingPropertyValue(LAT_KEY);
+        String lng = extractor.mappingPropertyValue(LNG_KEY);
+        String epsg = extractor.mappingPropertyValue(EPSG_KEY);
 
-        LatLngToGeoParameter params = new LatLngToGeoParameter(graph, epsg_value, lat, lng);
+        LatLngToGeoParameter params = new LatLngToGeoParameter(graph, epsg, lat, lng);
 
         return new ConfiguredEventProcessor<>(params, LatLngToGeo::new);
     }
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
index 631860f..9ae8795 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
@@ -23,20 +23,20 @@ import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams
 
 public class LatLngToGeoParameter extends EventProcessorBindingParams {
 
-    private String epsg_value;
+    private String epsg;
     private String lat;
     private String lng;
 
-    public LatLngToGeoParameter(DataProcessorInvocation graph, String epsg_code, String lat, String lng) {
+    public LatLngToGeoParameter(DataProcessorInvocation graph, String epsg, String lat, String lng) {
         super(graph);
-        this.epsg_value = epsg_code;
+        this.epsg = epsg;
         this.lat = lat;
         this.lng = lng;
     }
 
 
-    public String getEpsg_value() {
-        return epsg_value;
+    public String getEpsg() {
+        return epsg;
     }
 
     public String getLat() {
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 71dc243..18b4d91 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
@@ -29,7 +29,7 @@ public class SetEPSG implements EventProcessor<SetEpsgParameter> {
 
     public static Logger LOG;
     public SetEpsgParameter params;
-    public Integer epsg_value;
+    public Integer epsg;
 
 
 
@@ -37,13 +37,14 @@ public class SetEPSG implements EventProcessor<SetEpsgParameter> {
     public void onInvocation(SetEpsgParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
 
         LOG = params.getGraph().getLogger(SetEPSG.class);
-        this.params = params;
-        this.epsg_value = params.getEpsg_value();
+        this.epsg = params.getEpsg();
     }
 
     @Override
     public void onEvent(Event in, SpOutputCollector out)  {
-        in.addField(SetEpsgController.EPSG, epsg_value);
+        //in.addField("epsg-key", epsg);
+        in.addField("epsg", 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 9426320..aef69a2 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
@@ -21,10 +21,13 @@ package org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG;
 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.PrimitivePropertyBuilder;
 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.Datatypes;
 import org.apache.streampipes.vocabulary.SO;
 import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
 import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
@@ -32,44 +35,37 @@ import org.apache.streampipes.sdk.utils.Assets;
 
 public class SetEpsgController extends StandaloneEventProcessingDeclarer<SetEpsgParameter> {
 
-    public final static String EPSG = "EPSG";
     public final static String EPA_NAME = "EPSG Enricher";
 
+    public final static String EPSG_KEY = "epsg-key";
+
     @Override
     public DataProcessorDescription declareModel() {
         return ProcessingElementBuilder
-                .create("org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG",
-                        EPA_NAME,
-                        "Adds an EPSG Code to the event")
-                .category(DataProcessorType.GEO)
-                .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-                .requiredStream
-                        (StreamRequirementsBuilder
-                                .create()
-                                .build())
-                .requiredIntegerParameter(
-                        Labels.from(
-                                EPSG,
-                                "Sets EPSG Code",
-                                "Sets an EPSG Code. Default ist WGS84/WGS84 with number 4326"),
-                        4326)
-                .outputStrategy(
-                        OutputStrategies.append(
-                                EpProperties.numberEp(
-                                        Labels.from(
-                                                "EPSG Code",
-                                                "EPSG Code",
-                                                "EPSG Code for SRID"),
-                                        EPSG, SO.Number)))
-                .supportedFormats(SupportedFormats.jsonFormat())
-                .supportedProtocols(SupportedProtocols.kafka())
-                .build();
+            .create("org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG")
+            .category(DataProcessorType.GEO)
+            .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+            .withLocales(Locales.EN)
+            .requiredStream(StreamRequirementsBuilder
+                .create()
+                .build())
+            .requiredIntegerParameter(Labels.withId(EPSG_KEY), 4326)
+
+            .outputStrategy(
+                OutputStrategies.append(PrimitivePropertyBuilder
+                    .create(Datatypes.Integer, "epsg")
+                    .domainProperty("http://data.ign.fr/def/ignf#CartesianCS")
+                    .build())
+            )
+            .supportedFormats(SupportedFormats.jsonFormat())
+            .supportedProtocols(SupportedProtocols.kafka())
+            .build();
     }
 
     @Override
     public ConfiguredEventProcessor<SetEpsgParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
 
-        Integer epsg_value = extractor.singleValueParameter(EPSG, Integer.class);
+        Integer epsg_value = extractor.singleValueParameter(EPSG_KEY, Integer.class);
         SetEpsgParameter params = new SetEpsgParameter(graph, epsg_value);
 
         return new ConfiguredEventProcessor<>(params, SetEPSG::new);
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
index 9601f22..1745af3 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
@@ -24,14 +24,14 @@ import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams
 public class SetEpsgParameter extends EventProcessorBindingParams {
 
 
-    private Integer epsg_value;
+    private Integer epsg;
 
-    public SetEpsgParameter(DataProcessorInvocation graph, Integer epsg_code) {
+    public SetEpsgParameter(DataProcessorInvocation graph, Integer epsg) {
         super(graph);
-        this.epsg_value = epsg_code;
+        this.epsg = epsg;
     }
 
-    public Integer getEpsg_value() {
-        return epsg_value;
+    public Integer getEpsg() {
+        return epsg;
     }
 }
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
index 433141b..5e0e27e 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
@@ -1,5 +1,6 @@
 org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.title=Creates JTS Point
-org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.description=Creats a JTS Point from Latitude and Longitude values
+org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.description=Creates a JTS Point from Latitude and Longitude values
 
-place.title=JTS Point
-place.description=JTS Point Geometry
+latitude-key=Latitude value
+longitude-key=Longitude value
+epsg-key= EPSG Code
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/icon.png b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/icon.png
index 3bc916a..d2a81e7 100644
Binary files a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/icon.png and b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/icon.png differ
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/strings.en b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/strings.en
index 3da6df1..599f7a7 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/strings.en
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/strings.en
@@ -1,6 +1,5 @@
-org.apache.streampipes.processor.geo.jvm.staticgeocoding.title=Static Google Maps Geocoder
-org.apache.streampipes.processor.geo.jvm.staticgeocoding.description=Geocodes a fixed placename to lat/lng coordinates and
-appends these coordinates to every input event.
+org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG.title=EPSG Code
+org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG.description=Adds a corresponding EPSG Code to the Geo-Event
 
-place.title=Place
-place.description=The place name that should be converted to a lat/lng combination
\ No newline at end of file
+epsg-key.title=EPSG Code field
+epsg-key.description=EPSG Code


[incubator-streampipes-extensions] 05/05: adding feature to dev and code formating

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

commit b6bfcb9f3485a1d1bd28d86eba3afa063a6a3021
Author: micklich <fl...@disy.net>
AuthorDate: Tue May 12 10:15:58 2020 +0200

    adding feature to dev and code formating
---
 .../geo/jvm/jts/helper/SpGeometryBuilder.java      | 17 ++--
 .../jvm/jts/processor/latLngToGeo/LatLngToGeo.java | 58 +++++++-------
 .../latLngToGeo/LatLngToGeoController.java         | 90 +++++++++++-----------
 .../latLngToGeo/LatLngToGeoParameter.java          | 36 ++++-----
 .../geo/jvm/jts/processor/setEPSG/SetEPSG.java     | 35 ++++-----
 .../jts/processor/setEPSG/SetEpsgController.java   | 58 +++++++-------
 .../jts/processor/setEPSG/SetEpsgParameter.java    | 16 ++--
 7 files changed, 155 insertions(+), 155 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 c72635a..274796c 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
@@ -28,10 +28,11 @@ public class SpGeometryBuilder {
   final static double LATITIDE_MAX = 90;
 
 
-  /**Creates a JTS point geometry from Longitude and Latitude values
+  /**
+   * Creates a JTS point geometry from Longitude and Latitude values
    *
-   * @param lng Longitude value in the range -180 <Longitude > 180
-   * @param lat Latitude value in the range -90 <LATITUDE > 90
+   * @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
    * @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.
@@ -61,13 +62,12 @@ public class SpGeometryBuilder {
   }
 
   /**
-   *
    * @param checkedvalue Any Value
-   * @param min Min value to check
-   * @param max max value to check
+   * @param min          Min value to check
+   * @param max          max value to check
    * @return boolean value true or false
    */
-  private static boolean isInWGSCoordinateRange(double checkedvalue, double min, double max){
+  private static boolean isInWGSCoordinateRange(double checkedvalue, double min, double max) {
     return checkedvalue > min && checkedvalue < max;
   }
 
@@ -76,6 +76,7 @@ public class SpGeometryBuilder {
    * 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
    */
@@ -84,7 +85,7 @@ public class SpGeometryBuilder {
 
     if (epsg == 4326) {
       // use scale precision with 7 decimal positions like default OSM
-       precisionModel = new PrecisionModel(1000000);
+      precisionModel = new PrecisionModel(1000000);
     } else {
       // use default constructor
       precisionModel = new PrecisionModel();
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 13adaeb..a746583 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
@@ -29,44 +29,44 @@ import org.apache.streampipes.model.runtime.Event;
 
 public class LatLngToGeo implements EventProcessor<LatLngToGeoParameter> {
 
-    private static Logger LOG;
-    private String latitude;
-    private String longitude;
-    private String epsg_code;
+  private static Logger LOG;
+  private String latitude;
+  private String longitude;
+  private String epsg_code;
 
 
-    @Override
-    public void onInvocation(LatLngToGeoParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
+  @Override
+  public void onInvocation(LatLngToGeoParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
 
-        LOG = params.getGraph().getLogger(LatLngToGeoParameter.class);
-        this.latitude =  params.getLat();
-        this.longitude= params.getLng();
-        this.epsg_code = params.getEpsg();
+    LOG = params.getGraph().getLogger(LatLngToGeoParameter.class);
+    this.latitude = params.getLat();
+    this.longitude = params.getLng();
+    this.epsg_code = params.getEpsg();
 
-    }
+  }
+
+  @Override
+  public void onEvent(Event in, SpOutputCollector out) {
 
-    @Override
-    public void onEvent(Event in, SpOutputCollector out) {
+    Double lat = in.getFieldBySelector(latitude).getAsPrimitive().getAsDouble();
+    Double lng = in.getFieldBySelector(longitude).getAsPrimitive().getAsDouble();
+    Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
 
-        Double lat = in.getFieldBySelector(latitude).getAsPrimitive().getAsDouble();
-        Double lng = in.getFieldBySelector(longitude).getAsPrimitive().getAsDouble();
-        Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
+    Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
-        Point geom =  SpGeometryBuilder.createSPGeom(lng, lat, epsg);
+    if (!geom.isEmpty()) {
+      in.addField(LatLngToGeoController.WKT, geom.toString());
+      out.collect(in);
+    } else {
+      LOG.warn("An empty point geometry in " + LatLngToGeoController.EPA_NAME + " is created due" +
+          "invalid input field. Latitude: " + lat + "Longitude: " + lng);
+      LOG.error("Event is filtered out due invalid geometry");
 
-        if (!geom.isEmpty()){
-            in.addField(LatLngToGeoController.WKT, geom.toString());
-            out.collect(in);
-        } else {
-            LOG.warn("An empty point geometry in " + LatLngToGeoController.EPA_NAME + " is created due" +
-                "invalid input field. Latitude: " + lat + "Longitude: " + lng);
-            LOG.error("Event is filtered out due invalid geometry");
-            
-        }
     }
+  }
 
-    @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/latLngToGeo/LatLngToGeoController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
index aa1d027..d9a82c9 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
@@ -33,61 +33,61 @@ import org.apache.streampipes.vocabulary.Geo;
 import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
 import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
 
-public class LatLngToGeoController extends  StandaloneEventProcessingDeclarer<LatLngToGeoParameter> {
+public class LatLngToGeoController extends StandaloneEventProcessingDeclarer<LatLngToGeoParameter> {
 
 
-    public final static String LAT_KEY = "latitude-key";
-    public final static String LNG_KEY = "longitude-key";
-    public final static String EPSG_KEY = "epsg-key";
+  public final static String LAT_KEY = "latitude-key";
+  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 EPA_NAME = "Create Point from Latitude and Longitude";
+  public final static String WKT = "geom-wkt";
+  public final static String EPA_NAME = "Create Point from Latitude and Longitude";
 
-    @Override
-    public DataProcessorDescription declareModel() {
-        return ProcessingElementBuilder
-            .create("org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo")
-            .category(DataProcessorType.GEO)
-            .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-            .withLocales(Locales.EN)
-            .requiredStream(
-                StreamRequirementsBuilder
-                    .create()
-                    .requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lat),
-                        Labels.withId(LAT_KEY), PropertyScope.MEASUREMENT_PROPERTY)
-                    .requiredPropertyWithUnaryMapping(
-                        EpRequirements.domainPropertyReq(Geo.lng),
-                        Labels.withId(LNG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
-                    .requiredPropertyWithUnaryMapping(
-                        EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
-                        Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
-                    .build()
-                )
-                .outputStrategy(
-                    OutputStrategies.append(
-                        PrimitivePropertyBuilder
-                            .create(Datatypes.String, WKT)
-                            .domainProperty("http://www.opengis.net/ont/geosparql#Geometry")
-                        .build())
-                )
+  @Override
+  public DataProcessorDescription declareModel() {
+    return ProcessingElementBuilder
+        .create("org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo")
+        .category(DataProcessorType.GEO)
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+        .withLocales(Locales.EN)
+        .requiredStream(
+            StreamRequirementsBuilder
+                .create()
+                .requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lat),
+                    Labels.withId(LAT_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                .requiredPropertyWithUnaryMapping(
+                    EpRequirements.domainPropertyReq(Geo.lng),
+                    Labels.withId(LNG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                .requiredPropertyWithUnaryMapping(
+                    EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
+                    Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                .build()
+        )
+        .outputStrategy(
+            OutputStrategies.append(
+                PrimitivePropertyBuilder
+                    .create(Datatypes.String, WKT)
+                    .domainProperty("http://www.opengis.net/ont/geosparql#Geometry")
+                    .build())
+        )
 
-                .supportedFormats(SupportedFormats.jsonFormat())
-                .supportedProtocols(SupportedProtocols.kafka())
-                .build();
-    }
+        .supportedFormats(SupportedFormats.jsonFormat())
+        .supportedProtocols(SupportedProtocols.kafka())
+        .build();
+  }
 
 
-    @Override
-    public ConfiguredEventProcessor<LatLngToGeoParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
+  @Override
+  public ConfiguredEventProcessor<LatLngToGeoParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
 
 
-        String lat = extractor.mappingPropertyValue(LAT_KEY);
-        String lng = extractor.mappingPropertyValue(LNG_KEY);
-        String epsg = extractor.mappingPropertyValue(EPSG_KEY);
+    String lat = extractor.mappingPropertyValue(LAT_KEY);
+    String lng = extractor.mappingPropertyValue(LNG_KEY);
+    String epsg = extractor.mappingPropertyValue(EPSG_KEY);
 
-        LatLngToGeoParameter params = new LatLngToGeoParameter(graph, epsg, lat, lng);
+    LatLngToGeoParameter params = new LatLngToGeoParameter(graph, epsg, lat, lng);
 
-        return new ConfiguredEventProcessor<>(params, LatLngToGeo::new);
-    }
+    return new ConfiguredEventProcessor<>(params, LatLngToGeo::new);
+  }
 }
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
index 9ae8795..b8a2a06 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
@@ -23,27 +23,27 @@ import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams
 
 public class LatLngToGeoParameter extends EventProcessorBindingParams {
 
-    private String epsg;
-    private String lat;
-    private String lng;
+  private String epsg;
+  private String lat;
+  private String lng;
 
-    public LatLngToGeoParameter(DataProcessorInvocation graph, String epsg, String lat, String lng) {
-        super(graph);
-        this.epsg = epsg;
-        this.lat = lat;
-        this.lng = lng;
-    }
+  public LatLngToGeoParameter(DataProcessorInvocation graph, String epsg, String lat, String lng) {
+    super(graph);
+    this.epsg = epsg;
+    this.lat = lat;
+    this.lng = lng;
+  }
 
 
-    public String getEpsg() {
-        return epsg;
-    }
+  public String getEpsg() {
+    return epsg;
+  }
 
-    public String getLat() {
-        return lat;
-    }
+  public String getLat() {
+    return lat;
+  }
 
-    public String getLng() {
-        return lng;
-    }
+  public String getLng() {
+    return lng;
+  }
 }
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 18b4d91..f4a0851 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
@@ -27,29 +27,28 @@ import org.apache.streampipes.model.runtime.Event;
 
 public class SetEPSG implements EventProcessor<SetEpsgParameter> {
 
-    public static Logger LOG;
-    public SetEpsgParameter params;
-    public Integer epsg;
+  public static Logger LOG;
+  public SetEpsgParameter params;
+  public Integer epsg;
 
 
+  @Override
+  public void onInvocation(SetEpsgParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
 
-    @Override
-    public void onInvocation(SetEpsgParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
+    LOG = params.getGraph().getLogger(SetEPSG.class);
+    this.epsg = params.getEpsg();
+  }
 
-        LOG = params.getGraph().getLogger(SetEPSG.class);
-        this.epsg = params.getEpsg();
-    }
+  @Override
+  public void onEvent(Event in, SpOutputCollector out) {
+    //in.addField("epsg-key", epsg);
+    in.addField("epsg", epsg);
 
-    @Override
-    public void onEvent(Event in, SpOutputCollector out)  {
-        //in.addField("epsg-key", epsg);
-        in.addField("epsg", epsg);
+    out.collect(in);
+  }
 
-        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/setEPSG/SetEpsgController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
index aef69a2..db76c74 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
@@ -35,39 +35,39 @@ import org.apache.streampipes.sdk.utils.Assets;
 
 public class SetEpsgController extends StandaloneEventProcessingDeclarer<SetEpsgParameter> {
 
-    public final static String EPA_NAME = "EPSG Enricher";
+  public final static String EPA_NAME = "EPSG Enricher";
 
-    public final static String EPSG_KEY = "epsg-key";
+  public final static String EPSG_KEY = "epsg-key";
 
-    @Override
-    public DataProcessorDescription declareModel() {
-        return ProcessingElementBuilder
-            .create("org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG")
-            .category(DataProcessorType.GEO)
-            .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-            .withLocales(Locales.EN)
-            .requiredStream(StreamRequirementsBuilder
-                .create()
-                .build())
-            .requiredIntegerParameter(Labels.withId(EPSG_KEY), 4326)
+  @Override
+  public DataProcessorDescription declareModel() {
+    return ProcessingElementBuilder
+        .create("org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG")
+        .category(DataProcessorType.GEO)
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+        .withLocales(Locales.EN)
+        .requiredStream(StreamRequirementsBuilder
+            .create()
+            .build())
+        .requiredIntegerParameter(Labels.withId(EPSG_KEY), 4326)
 
-            .outputStrategy(
-                OutputStrategies.append(PrimitivePropertyBuilder
-                    .create(Datatypes.Integer, "epsg")
-                    .domainProperty("http://data.ign.fr/def/ignf#CartesianCS")
-                    .build())
-            )
-            .supportedFormats(SupportedFormats.jsonFormat())
-            .supportedProtocols(SupportedProtocols.kafka())
-            .build();
-    }
+        .outputStrategy(
+            OutputStrategies.append(PrimitivePropertyBuilder
+                .create(Datatypes.Integer, "epsg")
+                .domainProperty("http://data.ign.fr/def/ignf#CartesianCS")
+                .build())
+        )
+        .supportedFormats(SupportedFormats.jsonFormat())
+        .supportedProtocols(SupportedProtocols.kafka())
+        .build();
+  }
 
-    @Override
-    public ConfiguredEventProcessor<SetEpsgParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
+  @Override
+  public ConfiguredEventProcessor<SetEpsgParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
 
-        Integer epsg_value = extractor.singleValueParameter(EPSG_KEY, Integer.class);
-        SetEpsgParameter params = new SetEpsgParameter(graph, epsg_value);
+    Integer epsg_value = extractor.singleValueParameter(EPSG_KEY, Integer.class);
+    SetEpsgParameter params = new SetEpsgParameter(graph, epsg_value);
 
-        return new ConfiguredEventProcessor<>(params, SetEPSG::new);
-    }
+    return new ConfiguredEventProcessor<>(params, SetEPSG::new);
+  }
 }
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
index 1745af3..a08141e 100755
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
@@ -24,14 +24,14 @@ import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams
 public class SetEpsgParameter extends EventProcessorBindingParams {
 
 
-    private Integer epsg;
+  private Integer epsg;
 
-    public SetEpsgParameter(DataProcessorInvocation graph, Integer epsg) {
-        super(graph);
-        this.epsg = epsg;
-    }
+  public SetEpsgParameter(DataProcessorInvocation graph, Integer epsg) {
+    super(graph);
+    this.epsg = epsg;
+  }
 
-    public Integer getEpsg() {
-        return epsg;
-    }
+  public Integer getEpsg() {
+    return epsg;
+  }
 }


[incubator-streampipes-extensions] 02/05: format fix

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

commit f326c85e22d9d8c1460c766cfe44724a826ea1c0
Author: micklich <fl...@disy.net>
AuthorDate: Tue Apr 28 18:58:58 2020 +0200

    format fix
---
 .../geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 0c61df1..78b5791 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
@@ -79,7 +79,7 @@ public class LatLngToGeoController extends  StandaloneEventProcessingDeclarer<La
                                 "point_wkt",
                                 "wkt",
                                 "wkt point from long lat values"),
-                    WKT,
+                        WKT,
                         SO.Text))
                 )
 


[incubator-streampipes-extensions] 03/05: env

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

commit 67f992b7d3899b00d0db6eedb3d0b2ce723f3fec
Author: micklich <fl...@disy.net>
AuthorDate: Mon May 11 16:35:29 2020 +0200

    env
---
 streampipes-processors-geo-jvm/development/env | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/streampipes-processors-geo-jvm/development/env b/streampipes-processors-geo-jvm/development/env
index 762f975..3e9e217 100644
--- a/streampipes-processors-geo-jvm/development/env
+++ b/streampipes-processors-geo-jvm/development/env
@@ -15,5 +15,5 @@
 
 # Those parameters are used by IntelliJ to set the default consul parameters for development
 SP_PORT=8005
-SP_HOST=localhost
-SP_DEBUG=true
\ No newline at end of file
+SP_HOST=172.17.0.1
+SP_DEBUG=true


[incubator-streampipes-extensions] 01/05: change to ontology vocabulary, changed text and new icon

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

commit fd4572dcac80a9992b5b12c7ea76a36f3086a2d5
Author: micklich <fl...@disy.net>
AuthorDate: Tue Apr 28 18:13:11 2020 +0200

    change to ontology vocabulary, changed text and new icon
---
 .../latLngToGeo/LatLngToGeoController.java          |   5 +++--
 .../documentation.md                                |  12 ++++++------
 .../icon.png                                        | Bin 19124 -> 20621 bytes
 .../strings.en                                      |   9 ++++-----
 4 files changed, 13 insertions(+), 13 deletions(-)

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 39428ea..0c61df1 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
@@ -27,6 +27,7 @@ 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.Geo;
 import org.apache.streampipes.vocabulary.SO;
 import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
 import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
@@ -53,14 +54,14 @@ public class LatLngToGeoController extends  StandaloneEventProcessingDeclarer<La
                         StreamRequirementsBuilder
                                 .create()
                                 .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.numberReq(),
+                                        EpRequirements.domainPropertyReq(Geo.lat),
                                         Labels.from(LAT_FIELD,
                                                 "Latitude field",
                                                 "Latitude value"),
                                         PropertyScope.NONE
                                 )
                                 .requiredPropertyWithUnaryMapping(
-                                        EpRequirements.numberReq(),
+                                        EpRequirements.domainPropertyReq(Geo.lng),
                                         Labels.from(LNG_FIELD,
                                                 "Longitude field",
                                                 "Longitude value"),
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/documentation.md b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/documentation.md
index 9c9058d..f80cd9b 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/documentation.md
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/documentation.md
@@ -26,22 +26,22 @@
 
 ## Description
 
-This processor creates a [JTS](https://github.com/locationtech/jts) Point geometry from  latitude and longitude value.
+This processor creates a  JTS Point geometry from  latitude and longitude value.
 
 ***
 
 ## Required input
 
-*  number value representing Latitude field
-*  number value representing Longitude field
-*  integer value representing EPSG field
+*  Ontology Vocabulary Latitude
+*  Ontology Vocabulary Longitude
+*  Integer value representing EPSG Code
 
 
 ***
 
 ## Configuration
 
-Creates a JTS Geometry Point from Latitude (x) and Longitude (y) values in the representing coordinate reference system [(CRS)](https://en.wikipedia.org/wiki/Spatial_reference_system) by the EPSG code.
+Creates a JTS Geometry Point from Longitude (x) and Latitude (y) values in the coordinate reference system represented by the EPSG code.
 An empty point geometry is created if latitude or longitude value is missing in the event (e.g. null value) or values are out of range. Allowed values for Longitude are between -180.00 and 180.00; Latitude values between -90.00 and 90.00.
 
 ### 1st parameter
@@ -57,7 +57,7 @@ EPSG code value
 
 ## Output
 
-Adds a point geometry in the Well Known Text [(WKT)](https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) notation and in Longitude (y)  Latitude (x) axis order to the stream.
+Adds a point geometry in the Well Known Text notation and in Longitude (x)  Latitude (y) axis order to the stream.
 
 ### Example
 * Input stream: <br>
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png
index d2d8d70..d37330b 100644
Binary files a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png and b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png differ
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
index 3da6df1..433141b 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
@@ -1,6 +1,5 @@
-org.apache.streampipes.processor.geo.jvm.staticgeocoding.title=Static Google Maps Geocoder
-org.apache.streampipes.processor.geo.jvm.staticgeocoding.description=Geocodes a fixed placename to lat/lng coordinates and
-appends these coordinates to every input event.
+org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.title=Creates JTS Point
+org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.description=Creats a JTS Point from Latitude and Longitude values
 
-place.title=Place
-place.description=The place name that should be converted to a lat/lng combination
\ No newline at end of file
+place.title=JTS Point
+place.description=JTS Point Geometry