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 2023/02/16 23:51:25 UTC

[streampipes] branch 1272-buffer-processor updated (5a3802640 -> 3bf082dfd)

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

micklich pushed a change to branch 1272-buffer-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git


    from 5a3802640 #1272 add buffer point processor
     new a76c86eb0 [#1272] improve icons
     new 3bf082dfd [#1272] check dependencies for SIS DB

The 2 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:
 .../buffergeometry/BufferGeomProcessor.java         |  14 +++++++++++++-
 .../processor/bufferpoint/BufferPointProcessor.java |  14 ++++++++++++++
 .../icon.png                                        | Bin 12978 -> 13109 bytes
 .../icon.png                                        | Bin 13832 -> 15494 bytes
 4 files changed, 27 insertions(+), 1 deletion(-)
 mode change 100755 => 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png


[streampipes] 02/02: [#1272] check dependencies for SIS DB

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

micklich pushed a commit to branch 1272-buffer-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 3bf082dfdf201f0ca86b36645b5e77b3eb35e19b
Author: micklich <mi...@apache.org>
AuthorDate: Fri Feb 17 00:50:13 2023 +0100

    [#1272] check dependencies for SIS DB
---
 .../jts/processor/buffergeometry/BufferGeomProcessor.java  | 14 +++++++++++++-
 .../jts/processor/bufferpoint/BufferPointProcessor.java    | 14 ++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java
index 7aa162aa9..f8498bf16 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java
@@ -23,6 +23,7 @@ import org.apache.streampipes.model.graph.DataProcessorDescription;
 import org.apache.streampipes.model.runtime.Event;
 import org.apache.streampipes.model.schema.PropertyScope;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpReprojectionBuilder;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.BufferSide;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.CapStyle;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.JoinStyle;
@@ -42,6 +43,7 @@ import org.apache.streampipes.wrapper.standalone.ProcessorParams;
 import org.apache.streampipes.wrapper.standalone.StreamPipesDataProcessor;
 
 import org.locationtech.jts.geom.Geometry;
+import org.opengis.util.FactoryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -141,6 +143,17 @@ public class BufferGeomProcessor extends StreamPipesDataProcessor {
   public void onInvocation(ProcessorParams parameters, SpOutputCollector spOutputCollector,
                            EventProcessorRuntimeContext runtimeContext) throws SpRuntimeException {
 
+    try {
+      if (SpReprojectionBuilder.isSisConfigurationValid()){
+        LOG.info("SIS DB Settings successful checked ");
+      } else {
+        LOG.warn("The required EPSG database is not imported");
+        throw new SpRuntimeException("The required EPSG database is not imported");
+      }
+    } catch (FactoryException e) {
+      throw new SpRuntimeException("Something unexpected happened " + e);
+    }
+
     this.geometryMapper = parameters.extractor().mappingPropertyValue(GEOM_KEY);
     this.epsgMapper = parameters.extractor().mappingPropertyValue(EPSG_KEY);
     String readCapStyle = parameters.extractor().selectedSingleValue(CAP_KEY, String.class);
@@ -150,7 +163,6 @@ public class BufferGeomProcessor extends StreamPipesDataProcessor {
     this.segments = parameters.extractor().singleValueParameter(SEGMENTS_KEY, Integer.class);
     this.simplifyFactor = parameters.extractor().singleValueParameter(SIMPLIFY_FACTOR_KEY, Double.class);
     this.distance = parameters.extractor().singleValueParameter(DISTANCE_KEY, Double.class);
-
     // transform names to numbers
     this.capStyle = 1;
     if (readCapStyle.equals(CapStyle.Square.name())) {
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/bufferpoint/BufferPointProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/bufferpoint/BufferPointProcessor.java
index 890d255cc..6c3ca6283 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/bufferpoint/BufferPointProcessor.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/bufferpoint/BufferPointProcessor.java
@@ -23,6 +23,7 @@ import org.apache.streampipes.model.graph.DataProcessorDescription;
 import org.apache.streampipes.model.runtime.Event;
 import org.apache.streampipes.model.schema.PropertyScope;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpReprojectionBuilder;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.CapStyle;
 import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.SpBufferBuilder;
 import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
@@ -41,9 +42,11 @@ import org.apache.streampipes.wrapper.standalone.StreamPipesDataProcessor;
 
 import org.locationtech.jts.geom.Geometry;
 import org.locationtech.jts.geom.Point;
+import org.opengis.util.FactoryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class BufferPointProcessor extends StreamPipesDataProcessor {
   public static final String GEOM_KEY = "geometry-key";
   public static final String EPSG_KEY = "epsg-key";
@@ -115,6 +118,17 @@ public class BufferPointProcessor extends StreamPipesDataProcessor {
   public void onInvocation(ProcessorParams parameters, SpOutputCollector spOutputCollector,
                            EventProcessorRuntimeContext runtimeContext) throws SpRuntimeException {
 
+    try {
+      if (SpReprojectionBuilder.isSisConfigurationValid()){
+        LOG.info("SIS DB Settings successful checked ");
+      } else {
+        LOG.warn("The required EPSG database is not imported");
+        throw new SpRuntimeException("The required EPSG database is not imported");
+      }
+    } catch (FactoryException e) {
+      throw new SpRuntimeException("Something unexpected happened " + e);
+    }
+
     this.geometryMapper = parameters.extractor().mappingPropertyValue(GEOM_KEY);
     this.epsgMapper = parameters.extractor().mappingPropertyValue(EPSG_KEY);
     String readCapStyle = parameters.extractor().selectedSingleValue(CAP_KEY, String.class);


[streampipes] 01/02: [#1272] improve icons

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

micklich pushed a commit to branch 1272-buffer-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit a76c86eb0b0ee4aeaa3dc6bf616df2b1f258aa25
Author: micklich <mi...@apache.org>
AuthorDate: Fri Feb 17 00:49:27 2023 +0100

    [#1272] improve icons
---
 .../icon.png                                        | Bin 12978 -> 13109 bytes
 .../icon.png                                        | Bin 13832 -> 15494 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/icon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/icon.png
index 32c49ca7b..11c8028d0 100644
Binary files a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/icon.png and b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/icon.png differ
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png
old mode 100755
new mode 100644
index 7a8e8fea4..1742f6d03
Binary files a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png and b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png differ