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/16 16:27:47 UTC

[incubator-streampipes-extensions] 02/03: documentation, icon and strin.en files

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

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

commit 670ba67e6fb6b17b8092a7f1c399cdcba892543a
Author: micklich <fl...@disy.net>
AuthorDate: Sat May 16 18:26:55 2020 +0200

    documentation, icon and strin.en files
---
 .../DistanceCalculatorController.java              |  16 +++++++-------
 .../StaticDistanceCalculatorController.java        |   9 ++++----
 .../documentation.md                               |  15 ++++++++++----
 .../icon.png                                       | Bin 0 -> 5358 bytes
 .../strings.en                                     |  23 ++++++++++++---------
 .../documentation.md                               |  18 +++++++++++++---
 .../icon.png                                       | Bin 0 -> 5611 bytes
 .../strings.en                                     |   8 ++++++-
 8 files changed, 58 insertions(+), 31 deletions(-)

diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/distancecalculator/DistanceCalculatorController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/distancecalculator/DistanceCalculatorController.java
index 7bbf3a9..0d7de4c 100644
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/distancecalculator/DistanceCalculatorController.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/distancecalculator/DistanceCalculatorController.java
@@ -39,12 +39,12 @@ import java.net.URI;
 
 public class DistanceCalculatorController extends StandaloneEventProcessingDeclarer<DistanceCalculatorParameters> {
 
-  private static final String LAT_1_KEY = "lat1";
-  private static final String LONG_1_KEY = "long1";
-  private static final String LAT_2_KEY = "lat2";
-  private static final String LONG_2_KEY = "long2";
-  private static final String DECIMAL_POSITION_KEY = "decimalPosition";
-  private static final String UNIT_KEY = "unit";
+  private static final String LAT_1_KEY = "lat1-key";
+  private static final String LONG_1_KEY = "long1-key";
+  private static final String LAT_2_KEY = "lat2-key";
+  private static final String LONG_2_KEY = "long2-key";
+  private static final String DECIMAL_POSITION_KEY = "decimalPosition-key";
+  private static final String UNIT_KEY = "unit-key";
 
   private static final String CALCULATED_DISTANCE_KEY = "calculatedDistance";
 
@@ -54,8 +54,8 @@ public class DistanceCalculatorController extends StandaloneEventProcessingDecla
   @Override
   public DataProcessorDescription declareModel() {
     return ProcessingElementBuilder.create("org.apache.streampipes.processors.geo.jvm.processor.distancecalculator")
-        .category(DataProcessorType.FILTER)
-        .withAssets(Assets.DOCUMENTATION)
+        .category(DataProcessorType.GEO)
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
         .withLocales(Locales.EN)
         .requiredStream(StreamRequirementsBuilder
             .create()
diff --git a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/staticdistancecalculator/StaticDistanceCalculatorController.java b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/staticdistancecalculator/StaticDistanceCalculatorController.java
index e6cca22..814259f 100644
--- a/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/staticdistancecalculator/StaticDistanceCalculatorController.java
+++ b/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/processor/staticdistancecalculator/StaticDistanceCalculatorController.java
@@ -41,9 +41,8 @@ public class StaticDistanceCalculatorController extends StandaloneEventProcessin
   private static final String LONGITUDE_KEY = "longitude-key";
   private static final String SELECTED_LATITUDE_KEY = "selected-latitude-key";
   private static final String SELECTED_LONGITUDE_KEY = "selected-longitude-key";
-
-  private static final String DECIMAL_POSITION_KEY = "decimalPosition";
-  private static final String UNIT_KEY = "unit";
+  private static final String DECIMAL_POSITION_KEY = "decimalPosition-key";
+  private static final String UNIT_KEY = "unit-key";
 
   protected final static String LENGTH_RUNTIME = "geodesicStaticDistance";
   protected final static String UNIT_RUNTIME = "geodesicStaticDistanceUnit";
@@ -52,8 +51,8 @@ public class StaticDistanceCalculatorController extends StandaloneEventProcessin
   public DataProcessorDescription declareModel() {
     return ProcessingElementBuilder.create("org.apache.streampipes.processors.geo.jvm.processor" +
         ".staticdistancecalculator")
-        .category(DataProcessorType.FILTER)
-        .withAssets(Assets.DOCUMENTATION)
+        .category(DataProcessorType.GEO)
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
         .withLocales(Locales.EN)
         .requiredStream(StreamRequirementsBuilder
             .create()
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/documentation.md b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/documentation.md
index f221b91..6f9e510 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/documentation.md
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/documentation.md
@@ -18,7 +18,7 @@
 
 ## Distance Calculator
 
-<p align="center"> 
+<p align="center">
     <img src="icon.png" width="150px;" class="pe-image-documentation"/>
 </p>
 
@@ -26,22 +26,29 @@
 
 ## Description
 
-Calculates the distance between two latitude/longitude pairs in a single event.
+Calculates the geodesic distance between two latitude/longitude pairs in a single event.
 
 ***
 
 ## Required input
 
+* Latitude and Longitude values of Position 1
+* Latitude and Longitude values of Position 2
 
 ***
 
 ## Configuration
 
-Describe the configuration parameters here
+Calculates the geodesic distance between position 1 and position 2. The User can choose the unit of the output value and the number of decimal positions.
 
 ### 1st parameter
 
+Number of the decimal position between 0 and 10.
 
 ### 2nd parameter
 
-## Output
\ No newline at end of file
+Unit of the output result. Possible Units are Meter, KM, Feet or Mile.
+
+***
+
+## Output
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/icon.png b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/icon.png
new file mode 100644
index 0000000..866ae01
Binary files /dev/null and b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/icon.png differ
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/strings.en b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/strings.en
index a6507f8..c9676ac 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/strings.en
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.distancecalculator/strings.en
@@ -1,17 +1,20 @@
 org.apache.streampipes.processors.geo.jvm.processor.distancecalculator.title=Distance Calculator
 org.apache.streampipes.processors.geo.jvm.processor.distancecalculator.description=Calculates the distance between two geo points
 
-lat1.title=First Latitude
-lat1.description=
+lat1-key.title=First Latitude
+lat1-key.description= Latitude of Position 1
 
-long1.title=First Longitude
-long1.description=
+long1-key.title=First Longitude
+long1-key.description= Longitude of Position 1
 
-lat2.title=Second Latitude
-lat2.description=
+lat2-key.title=Second Latitude
+lat2-key.description=Latitude of Position 2
 
-long2.title=Second Longitude
-long2.description=
+long2-key.title=Second Longitude
+long2-key.description=Longitude of Position 2
 
-calculatedDistance.title=Distance Field
-startingCell.description=
\ No newline at end of file
+decimalPosition-key.title Decimal Position of Result
+decimalPosition-key.description =  Number of decimal position
+
+unit-key.title=Units
+unit-key.description=Available Units of the  result
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/documentation.md b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/documentation.md
index eb70028..3b99ab3 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/documentation.md
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/documentation.md
@@ -22,7 +22,7 @@
 
 ## Description
 
-Calculates the distance (in km) between a fixed location (e.g., a place) and a latitude/longitude pair of an input
+Calculates the distance between a fixed location (e.g., a place) and a latitude/longitude pair of an input
  event.
 
 ***
@@ -35,11 +35,23 @@ Requires a data stream that provides latitude and longitude values.
 
 ## Configuration
 
-Describe the configuration parameters here
+Calculates the geodesic distance between a position and a usr input position. The User can choose the unit of the output value and the number of decimal positions.
+
 
 ### 1st parameter
 
+Number of the decimal position between 0 and 10.
 
 ### 2nd parameter
 
-## Output
\ No newline at end of file
+Unit of the output result. Possible Units are Meter, KM, Feet or Mile.
+
+### 3rd parameter
+Static latitude value in decimal degrees (needs to be in range -90 and 90)
+
+### 4th parameter
+Static longitude field in decimal degrees (needs to be in range 180 and 90)
+
+***
+
+## Output
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/icon.png b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/icon.png
new file mode 100644
index 0000000..2168342
Binary files /dev/null and b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/icon.png differ
diff --git a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/strings.en b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/strings.en
index 4238a5b..2bf42ee 100644
--- a/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/strings.en
+++ b/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.processor.staticdistancecalculator/strings.en
@@ -11,4 +11,10 @@ selected-latitude-key.title=Latitude
 selected-latitude-key.description=The latitude value of the fixed location
 
 selected-longitude-key.title=Longitude
-selected-longitude-key.description=The longitude value of the fixed location
\ No newline at end of file
+selected-longitude-key.description=The longitude value of the fixed location
+
+decimalPosition-key.title Decimal Position
+decimalPosition-key.description =  Number of decimal position
+
+unit-key.title=Units
+unit-key.description=Available Units of the result