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/03/03 22:57:32 UTC

[streampipes] branch 1353-geo-create-derived-polygon-of-input-geometry-processor updated (57f67e033 -> 2c859999b)

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

micklich pushed a change to branch 1353-geo-create-derived-polygon-of-input-geometry-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git


 discard 57f67e033 [#1353] finish polygon processor, adjust documentation and variables
 discard ebde5d56f [#1353] Implement Basic derived polygon processor
     add 21bef02d4 [hotfix] Fix failing e2e tests
     add 81b1a4a2e [hotfix] Add echarts to shared modules
     add f71bd9629 [#1254]: extend data lake measure endpoints get method to process query parameters (#1349)
     add d3ca321f5 1207 improve helm charts (#1344)
     add 44017e066 [hotfix] Use try-with-resource way to fix the potential InfluxDB connection leak in DataExplorerQueryV4 (#1350)
     add e70e2462a Bump snakeyaml from 1.32 to 2.0
     add 1abb75708 [hotfix] Set `PageResult` as deprecated
     add 73874ee0b [hotfix] Fix example in python client README
     add 181c78f25 [hotfix] Modify README of python client so that commands can be copied
     add f8bb8f744 Bump @braintree/sanitize-url and swagger-ui in /ui
     add 5c4118e61 chore: reify project url in package metadata (#1356)
     add 729742f16 Bump eslint from 8.34.0 to 8.35.0 in /ui (#1365)
     add 433fe9190 Refactor Image Processors (#1331)
     add 7bf158d1e Fix UI container cannot get the backend DNS correctly
     add db0e3b89f Ignore install/defaul.conf
     add a304daebd #1272 add buffer geometry
     add 500410b70 #1272 misc changes of buffer geometry
     add 0beea321d #1272 add buffer point processor
     add 930356a59 [#1272] improve icons
     add b142fb93f [#1272] check dependencies for SIS DB
     add 11f3a443a [#1272] add missing license header
     add 834c947dd [#1272] fix checkstyle error and rewrite text
     add 24b0d7ff7 [#1272] Improve documentation
     add 95bed0766 Merge branch 'dev' into 1272-buffer-processor
     add 4f521bec5 [#1272] Add Output Image to Documentation and register in Processor
     add ddb62403d Merge pull request #1303 from apache/1272-buffer-processor
     add bc616d472 Bump @cypress/webpack-preprocessor from 5.16.0 to 5.17.0 in /ui (#1370)
     add 9cbeed0a4 [hotfix] Set `PageResult` as deprecated
     add a60bae140 [hotfix] Automatically add licence headers to generated model classes
     add cd34cdd4d Merge branch 'dev' of github.com:apache/streampipes into dev
     add a1698440b chore: fix example code & add disclaimer for doc versioning (#1364)
     add 85565b8fd [#1307] Add geometry validation processor first implementation
     add 2a89675ca [#1307] misc validation fixes manual tests
     add 562dbb34a [#1307] add resources
     add 4e8de865e Merge branch 'dev' into 1307-geometry-validation-processor
     add 502d05efc [#1307] Split processor in two types, extend documentation
     add 49cd5231d Merge branch 'dev' into 1307-geometry-validation-processor
     add 5938bc96f [#1307] catch non selection with better info output from https://github.com/apache/streampipes/issues/1351
     add 3b7c207fd Merge pull request #1320 from apache/1307-geometry-validation-processor
     new 17ef0a90f [#1353] Implement Basic derived polygon processor
     new 31234778b [#1353] finish polygon processor, adjust documentation and variables
     new 2c859999b [#1353] fix double processor entry in init

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (57f67e033)
            \
             N -- N -- N   refs/heads/1353-geo-create-derived-polygon-of-input-geometry-processor (2c859999b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 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:
 create-client-model.sh                             |  44 +++-
 docker-compose.yml                                 |   2 +-
 installer/.gitignore                               |   2 +
 .../cli/deploy/standalone/ui/docker-compose.yml    |   2 +-
 installer/compose/docker-compose.full.yml          |   2 +-
 installer/compose/docker-compose.nats.yml          |   2 +-
 installer/compose/docker-compose.yml               |   2 +-
 .../k8s/templates/core/backend-deployment.yaml     |  27 +-
 installer/k8s/templates/core/backend-pv-pvc.yaml   |  42 ----
 .../backend-pvc.yaml}                              |  22 +-
 installer/k8s/templates/core/backend-service.yaml  |   8 +-
 installer/k8s/templates/core/ui-configmap.yaml     |  51 ++++
 .../templates/core/{ui.yaml => ui-deployment.yaml} |  28 +--
 installer/k8s/templates/core/ui-ingress.yaml       |  25 +-
 installer/k8s/templates/core/ui-ingressroute.yaml  |  46 ++++
 installer/k8s/templates/core/ui-service.yaml       |  10 +-
 ...nt.yaml => extensions-all-iiot-deployment.yaml} |  10 +-
 ...rvice.yaml => extensions-all-iiot-service.yaml} |   6 +-
 .../pipeline-elements-all-flink-deployment.yaml    |  37 ---
 .../external/consul/consul-deployment.yaml         |  16 +-
 .../templates/external/consul/consul-pv-pvc.yaml   |  22 +-
 .../templates/external/consul/consul-service.yaml  |   6 +-
 .../external/couchdb/couchdb-deployment.yaml       |  20 +-
 .../templates/external/couchdb/couchdb-pv-pvc.yaml |  22 +-
 .../external/couchdb/couchdb-service.yaml          |   6 +-
 .../external/flink/jobmanager-deployment.yaml      |  46 ----
 .../external/flink/jobmanager-service.yaml         |  34 ---
 .../external/flink/taskmanager-deployment.yaml     |  43 ----
 .../external/influxdb/influxdb-deployment.yaml     |  34 +--
 .../templates/external/influxdb/influxdb-pvc.yaml  |  20 +-
 .../external/influxdb/influxdb-service.yaml        |   4 +-
 .../templates/external/influxdb/influxdb2-pvc.yaml |  21 +-
 .../templates/external/nats/nats-deployment.yaml   |   8 +-
 .../k8s/templates/external/nats/nats-service.yaml  |   2 +
 installer/k8s/values.yaml                          |  94 +++++--
 pom.xml                                            |   2 +-
 streampipes-client-python/README.md                |  39 +--
 ...introduction-to-streampipes-python-client.ipynb |  80 +++++-
 ...cting-data-from-the-streampipes-data-lake.ipynb | 153 +++++++++++-
 ...ive-data-from-the-streampipes-data-stream.ipynb |  12 +
 ...ine-learning-on-a-streampipes-data-stream.ipynb |  13 +-
 .../docs/img/tutorial-preparation.gif              | Bin 0 -> 2569748 bytes
 streampipes-client-python/docs/index.md            |  60 +++--
 streampipes-client-python/setup.py                 |   2 +-
 .../streampipes/client/client.py                   |   2 +-
 .../streampipes/endpoint/api/data_lake_measure.py  | 220 +++++++++++++++-
 .../streampipes/endpoint/api/data_stream.py        |   2 +-
 .../streampipes/endpoint/endpoint.py               |   2 +-
 .../tests/client/test_data_lake_series.py          |   2 +-
 .../{streampipes => tests/endpoint}/__init__.py    |   0
 .../tests/endpoint/test_data_lake_measure.py       | 138 ++++++++++
 .../dataexplorer/v4/query/DataExplorerQueryV4.java |  66 ++---
 .../streampipes/processors/geo/jvm/GeoJvmInit.java |  10 +-
 .../jts/exceptions/SpJtsGeoemtryException.java}    |  26 +-
 .../geo/jvm/jts/helper/buffer/BufferSide.java}     |  17 +-
 .../geo/jvm/jts/helper/buffer/CapStyle.java}       |  19 +-
 .../geo/jvm/jts/helper/buffer/JoinStyle.java}      |  20 +-
 .../geo/jvm/jts/helper/buffer/SpBufferBuilder.java | 124 +++++++++
 .../buffergeometry/BufferGeomProcessor.java        | 224 +++++++++++++++++
 .../bufferpoint/BufferPointProcessor.java          | 172 +++++++++++++
 .../processor/validation/ValidationOutput.java}    |  13 +-
 .../jts/processor/validation/ValidationType.java}  |  13 +-
 .../complex/TopologyValidationProcessor.java       | 143 +++++++++++
 .../simple/GeometryValidationProcessor.java        | 159 ++++++++++++
 .../documentation.md                               |  89 +++++++
 .../icon.png                                       | Bin 0 -> 13109 bytes
 .../strings.en                                     |  49 ++++
 .../documentation.md                               |  76 ++++++
 .../icon.png                                       | Bin 0 -> 15494 bytes
 .../output.png                                     | Bin 0 -> 32372 bytes
 .../strings.en                                     |  26 +-
 .../documentation.md                               |  80 ++++++
 .../icon.png                                       | Bin 0 -> 19690 bytes
 .../strings.en                                     |  22 +-
 .../documentation.md                               |  74 ++++++
 .../icon.png                                       | Bin 0 -> 16986 bytes
 .../strings.en                                     |  22 +-
 .../jvm/ImageProcessingJvmInit.java                |  16 +-
 .../processor/commons/ImagePropertyConstants.java  |  56 +++++
 .../jvm/processor/commons/ImageTransformer.java    |  35 ++-
 .../processor/commons/PlainImageTransformer.java   |   7 +-
 .../GenericImageClassificationController.java      |  73 ------
 ...va => GenericImageClassificationProcessor.java} |  80 ++++--
 .../jvm/processor/imagecropper/ImageCropper.java   |  76 ------
 .../imagecropper/ImageCropperController.java       |  67 -----
 .../imagecropper/ImageCropperProcessor.java        | 116 +++++++++
 .../imageenrichment/ImageEnrichmentController.java |  66 -----
 .../imageenrichment/ImageEnrichmentParameters.java | 101 --------
 ...Enricher.java => ImageEnrichmentProcessor.java} |  71 ++++--
 .../jvm/processor/qrreader/QrCodeReader.java       |  98 --------
 .../processor/qrreader/QrCodeReaderController.java |  77 ------
 .../processor/qrreader/QrCodeReaderParameters.java |  48 ----
 .../processor/qrreader/QrCodeReaderProcessor.java  | 133 ++++++++++
 .../streampipes/model/datalake/PageResult.java     |   1 +
 ui/Dockerfile                                      |  12 +-
 .../booleanCounter1/expected.csv                   |  10 +-
 .../booleanCounter2/expected.csv                   |  14 +-
 ui/nginx_config/default.conf                       |  23 +-
 ui/nginx_config/ssl.conf                           |   2 +-
 ui/package-lock.json                               | 278 ++++++---------------
 ui/package.json                                    |   6 +-
 ui/webpack.partial.base.js                         |  11 +
 102 files changed, 2867 insertions(+), 1547 deletions(-)
 delete mode 100644 installer/k8s/templates/core/backend-pv-pvc.yaml
 rename installer/k8s/templates/{extensions/pipeline-elements/pipeline-elements-all-flink-service.yaml => core/backend-pvc.yaml} (71%)
 create mode 100644 installer/k8s/templates/core/ui-configmap.yaml
 rename installer/k8s/templates/core/{ui.yaml => ui-deployment.yaml} (68%)
 create mode 100644 installer/k8s/templates/core/ui-ingressroute.yaml
 rename installer/k8s/templates/extensions/pipeline-elements/{extensions-all-jvm-deployment.yaml => extensions-all-iiot-deployment.yaml} (86%)
 rename installer/k8s/templates/extensions/pipeline-elements/{extensions-all-jvm-service.yaml => extensions-all-iiot-service.yaml} (91%)
 delete mode 100644 installer/k8s/templates/extensions/pipeline-elements/pipeline-elements-all-flink-deployment.yaml
 delete mode 100644 installer/k8s/templates/external/flink/jobmanager-deployment.yaml
 delete mode 100644 installer/k8s/templates/external/flink/jobmanager-service.yaml
 delete mode 100644 installer/k8s/templates/external/flink/taskmanager-deployment.yaml
 create mode 100644 streampipes-client-python/docs/img/tutorial-preparation.gif
 copy streampipes-client-python/{streampipes => tests/endpoint}/__init__.py (100%)
 create mode 100644 streampipes-client-python/tests/endpoint/test_data_lake_measure.py
 copy streampipes-extensions/{streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationParameters.java => streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/exceptions/SpJtsGeoemtryException.java} (56%)
 mode change 100644 => 100755
 copy streampipes-extensions/{streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperParameters.java => streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/BufferSide.java} (57%)
 mode change 100644 => 100755
 copy streampipes-extensions/{streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationParameters.java => streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/CapStyle.java} (57%)
 mode change 100644 => 100755
 rename streampipes-extensions/{streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationParameters.java => streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/JoinStyle.java} (57%)
 mode change 100644 => 100755
 create mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/SpBufferBuilder.java
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/bufferpoint/BufferPointProcessor.java
 copy streampipes-extensions/{streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperParameters.java => streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/validation/ValidationOutput.java} (56%)
 mode change 100644 => 100755
 rename streampipes-extensions/{streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperParameters.java => streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/validation/ValidationType.java} (56%)
 mode change 100644 => 100755
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/validation/complex/TopologyValidationProcessor.java
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/validation/simple/GeometryValidationProcessor.java
 create mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/icon.png
 create mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/strings.en
 create mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/documentation.md
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/output.png
 copy ui/Dockerfile => streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/strings.en (50%)
 mode change 100644 => 100755
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.validation.complex/documentation.md
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.validation.complex/icon.png
 copy ui/Dockerfile => streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.validation.complex/strings.en (56%)
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.validation.simple/documentation.md
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.validation.simple/icon.png
 copy ui/Dockerfile => streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.validation.simple/strings.en (55%)
 create mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/commons/ImagePropertyConstants.java
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationController.java
 rename streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/{GenericImageClassification.java => GenericImageClassificationProcessor.java} (50%)
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropper.java
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperController.java
 create mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imagecropper/ImageCropperProcessor.java
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imageenrichment/ImageEnrichmentController.java
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imageenrichment/ImageEnrichmentParameters.java
 rename streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/imageenrichment/{ImageEnricher.java => ImageEnrichmentProcessor.java} (51%)
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/qrreader/QrCodeReader.java
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/qrreader/QrCodeReaderController.java
 delete mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/qrreader/QrCodeReaderParameters.java
 create mode 100644 streampipes-extensions/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/qrreader/QrCodeReaderProcessor.java


[streampipes] 02/03: [#1353] finish polygon processor, adjust documentation and variables

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

micklich pushed a commit to branch 1353-geo-create-derived-polygon-of-input-geometry-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 31234778bde65a5f314944257e6d382a79a128bd
Author: micklich <mi...@apache.org>
AuthorDate: Mon Feb 27 21:14:37 2023 +0100

    [#1353] finish polygon processor, adjust documentation and variables
---
 .../streampipes/processors/geo/jvm/GeoJvmInit.java      |   5 ++++-
 .../polygon/CreateDerivedPolygonProcessor.java          |  12 ++++++------
 .../derivedPolygon.png                                  | Bin 0 -> 29773 bytes
 .../documentation.md                                    |   6 +++---
 .../icon.png                                            | Bin 0 -> 22932 bytes
 .../strings.en                                          |   6 +++---
 6 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
index d3024ff10..a0d9f7076 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
@@ -30,6 +30,7 @@ import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory;
 import org.apache.streampipes.processors.geo.jvm.config.ConfigKeys;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry.BufferGeomProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint.BufferPointProcessor;
+import org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon.CreateDerivedPolygonProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.epsg.EpsgProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.LatLngToJtsPointProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.reprojection.ReprojectionProcessor;
@@ -74,6 +75,8 @@ public class GeoJvmInit extends ExtensionsModelSubmitter {
             new LatLngToJtsPointProcessor(),
             new TrajectoryFromPointsProcessor(),
             new SpeedCalculatorProcessor(),
+            new CreateDerivedPolygonProcessor(),
+            new ReprojectionProcessor(),
             new ReprojectionProcessor(),
             new GeometryValidationProcessor(),
             new TopologyValidationProcessor(),
@@ -97,7 +100,7 @@ public class GeoJvmInit extends ExtensionsModelSubmitter {
     PGSimpleDataSource ds = new PGSimpleDataSource();
     String[] serverAddresses = {"localhost"};
     ds.setServerNames(serverAddresses);
-    int[] portNumbers = {54320};
+    int [] portNumbers = {54320};
     ds.setPortNumbers(portNumbers);
     ds.setDatabaseName("EPSG");
     ds.setUser("streampipes");
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java
index e4e253af6..103f5dd2c 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java
@@ -51,11 +51,11 @@ import org.slf4j.LoggerFactory;
 public class CreateDerivedPolygonProcessor extends StreamPipesDataProcessor {
   public static final String GEOM_KEY = "geometry-key";
   public static final String EPSG_KEY = "epsg-key";
-  public static final String POINT_OUTPUT_TYPE_KEY = "point-output-type-key";
+  public static final String POLYGON_OUTPUT_TYPE_KEY = "polygon-output-type-key";
   public static final String DERIVED_GEOM_KEY = "derived-point-geom-key";
   public static final String DERIVED_EPSG_KEY = "derived-point-epsg-key";
-  public static final String DERIVED_GEOM_RUNTIME = "derived-point";
-  public static final String DERIVED_EPSG_RUNTIME = "epsg-derived-point";
+  public static final String DERIVED_GEOM_RUNTIME = "derived-polygon";
+  public static final String DERIVED_EPSG_RUNTIME = "epsg-derived-polygon";
   private String geometryMapper;
   private String epsgMapper;
   private String outputType;
@@ -67,7 +67,7 @@ public class CreateDerivedPolygonProcessor extends StreamPipesDataProcessor {
     return ProcessingElementBuilder.create(
             "org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon")
         .category(DataProcessorType.GEO)
-        .withAssets(Assets.DOCUMENTATION, Assets.ICON, "derivedPoint.png")
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON, "derivedPolygon.png")
         .withLocales(Locales.EN)
         .requiredStream(StreamRequirementsBuilder
             .create()
@@ -80,7 +80,7 @@ public class CreateDerivedPolygonProcessor extends StreamPipesDataProcessor {
                 Labels.withId(EPSG_KEY),
                 PropertyScope.MEASUREMENT_PROPERTY)
             .build())
-        .requiredSingleValueSelection(Labels.withId(POINT_OUTPUT_TYPE_KEY),
+        .requiredSingleValueSelection(Labels.withId(POLYGON_OUTPUT_TYPE_KEY),
             Options.from("Bounding Box", "Convex Hull"))
         .outputStrategy(OutputStrategies.append(
                 EpProperties.stringEp(
@@ -102,7 +102,7 @@ public class CreateDerivedPolygonProcessor extends StreamPipesDataProcessor {
 
     this.geometryMapper = parameters.extractor().mappingPropertyValue(GEOM_KEY);
     this.epsgMapper = parameters.extractor().mappingPropertyValue(EPSG_KEY);
-    this.outputType = parameters.extractor().selectedSingleValue(POINT_OUTPUT_TYPE_KEY, String.class);
+    this.outputType = parameters.extractor().selectedSingleValue(POLYGON_OUTPUT_TYPE_KEY, String.class);
     this.params = parameters;
   }
 
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/derivedPolygon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/derivedPolygon.png
new file mode 100644
index 000000000..bd71d5a10
Binary files /dev/null and b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/derivedPolygon.png differ
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md
index 73adb2769..d71804b99 100755
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md
@@ -56,9 +56,9 @@ Chose between
 ## Output
 A polygon geometry with EPSG code.
 
+<p align="center">
+    <img src="derived_polygon.png.png" width="500;" class="pe-image-documentation"/>
+</p>
 
 ### Example
 
-<p align="center">
-    <img src="derivedPoint.png" width="500;" class="pe-image-documentation"/>
-</p>
\ No newline at end of file
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/icon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/icon.png
new file mode 100644
index 000000000..35fe1c8ed
Binary files /dev/null and b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/icon.png differ
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en
index c8b8d84b3..d24b41461 100755
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en
@@ -15,8 +15,8 @@
 # limitations under the License.
 #
 
-org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.point.title=Geo Derived Point Creation
-org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.point.description=Creates a Point from other Geometries greater than point
+org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon.title=Geo Derived Polygon Creation
+org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon.description=Creates a Polygon from other Geometries greater than point
 
 geometry-key.title=JTS Geometry Event
 geometry-key.description=Single Geometry
@@ -24,5 +24,5 @@ geometry-key.description=Single Geometry
 epsg-key.title=EPSG
 epsg-key.description=EPSG
 
-point-output-type-key.title=Point Type
+point-output-type-key.title=Polygon Type
 point-output-type-key.description=Choose Output Type


[streampipes] 01/03: [#1353] Implement Basic derived polygon processor

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

micklich pushed a commit to branch 1353-geo-create-derived-polygon-of-input-geometry-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 17ef0a90f742cdadfa69e5c5f424a283e1c5de60
Author: micklich <mi...@apache.org>
AuthorDate: Mon Feb 27 18:38:15 2023 +0100

    [#1353] Implement Basic derived polygon processor
---
 .../polygon/CreateDerivedPolygonProcessor.java     | 139 +++++++++++++++++++++
 .../documentation.md                               |  64 ++++++++++
 .../strings.en                                     |  28 +++++
 3 files changed, 231 insertions(+)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java
new file mode 100644
index 000000000..e4e253af6
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/derivedgeometry/polygon/CreateDerivedPolygonProcessor.java
@@ -0,0 +1,139 @@
+/*
+ * 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.derivedgeometry.polygon;
+
+import org.apache.streampipes.commons.exceptions.SpRuntimeException;
+import org.apache.streampipes.extensions.management.monitoring.SpMonitoringManager;
+import org.apache.streampipes.model.DataProcessorType;
+import org.apache.streampipes.model.StreamPipesErrorMessage;
+import org.apache.streampipes.model.graph.DataProcessorDescription;
+import org.apache.streampipes.model.monitoring.SpLogEntry;
+import org.apache.streampipes.model.runtime.Event;
+import org.apache.streampipes.model.schema.PropertyScope;
+import org.apache.streampipes.processors.geo.jvm.jts.exceptions.SpNotSupportedGeometryException;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
+import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
+import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
+import org.apache.streampipes.sdk.helpers.EpProperties;
+import org.apache.streampipes.sdk.helpers.EpRequirements;
+import org.apache.streampipes.sdk.helpers.Labels;
+import org.apache.streampipes.sdk.helpers.Locales;
+import org.apache.streampipes.sdk.helpers.Options;
+import org.apache.streampipes.sdk.helpers.OutputStrategies;
+import org.apache.streampipes.sdk.utils.Assets;
+import org.apache.streampipes.wrapper.context.EventProcessorRuntimeContext;
+import org.apache.streampipes.wrapper.routing.SpOutputCollector;
+import org.apache.streampipes.wrapper.standalone.ProcessorParams;
+import org.apache.streampipes.wrapper.standalone.StreamPipesDataProcessor;
+
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.Point;
+import org.locationtech.jts.geom.Polygon;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CreateDerivedPolygonProcessor extends StreamPipesDataProcessor {
+  public static final String GEOM_KEY = "geometry-key";
+  public static final String EPSG_KEY = "epsg-key";
+  public static final String POINT_OUTPUT_TYPE_KEY = "point-output-type-key";
+  public static final String DERIVED_GEOM_KEY = "derived-point-geom-key";
+  public static final String DERIVED_EPSG_KEY = "derived-point-epsg-key";
+  public static final String DERIVED_GEOM_RUNTIME = "derived-point";
+  public static final String DERIVED_EPSG_RUNTIME = "epsg-derived-point";
+  private String geometryMapper;
+  private String epsgMapper;
+  private String outputType;
+  ProcessorParams params;
+  private static final Logger LOG = LoggerFactory.getLogger(CreateDerivedPolygonProcessor.class);
+
+  @Override
+  public DataProcessorDescription declareModel() {
+    return ProcessingElementBuilder.create(
+            "org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon")
+        .category(DataProcessorType.GEO)
+        .withAssets(Assets.DOCUMENTATION, Assets.ICON, "derivedPoint.png")
+        .withLocales(Locales.EN)
+        .requiredStream(StreamRequirementsBuilder
+            .create()
+            .requiredPropertyWithUnaryMapping(
+                EpRequirements.domainPropertyReq("http://www.opengis.net/ont/geosparql#Geometry"),
+                Labels.withId(GEOM_KEY),
+                PropertyScope.MEASUREMENT_PROPERTY)
+            .requiredPropertyWithUnaryMapping(
+                EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
+                Labels.withId(EPSG_KEY),
+                PropertyScope.MEASUREMENT_PROPERTY)
+            .build())
+        .requiredSingleValueSelection(Labels.withId(POINT_OUTPUT_TYPE_KEY),
+            Options.from("Bounding Box", "Convex Hull"))
+        .outputStrategy(OutputStrategies.append(
+                EpProperties.stringEp(
+                    Labels.withId(DERIVED_GEOM_KEY),
+                    DERIVED_GEOM_RUNTIME,
+                    "http://www.opengis.net/ont/geosparql#Geometry"),
+                EpProperties.integerEp(
+                    Labels.withId(DERIVED_EPSG_KEY),
+                    DERIVED_EPSG_RUNTIME,
+                    "http://data.ign.fr/def/ignf#CartesianCS")
+            )
+        )
+        .build();
+  }
+
+  @Override
+  public void onInvocation(ProcessorParams parameters, SpOutputCollector spOutputCollector,
+                           EventProcessorRuntimeContext runtimeContext) throws SpRuntimeException {
+
+    this.geometryMapper = parameters.extractor().mappingPropertyValue(GEOM_KEY);
+    this.epsgMapper = parameters.extractor().mappingPropertyValue(EPSG_KEY);
+    this.outputType = parameters.extractor().selectedSingleValue(POINT_OUTPUT_TYPE_KEY, String.class);
+    this.params = parameters;
+  }
+
+  @Override
+  public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeException {
+    String geom = event.getFieldBySelector(geometryMapper).getAsPrimitive().getAsString();
+    Integer epsg = event.getFieldBySelector(epsgMapper).getAsPrimitive().getAsInt();
+    Geometry geometry = SpGeometryBuilder.createSPGeom(geom, epsg);
+    if (geometry instanceof Point) {
+      SpMonitoringManager.INSTANCE.addErrorMessage(params.getGraph().getElementId(),
+          SpLogEntry.from(System.currentTimeMillis(),
+              StreamPipesErrorMessage.from(new SpNotSupportedGeometryException(
+                  "Point Geometry is not supported"))));
+    } else {
+      Polygon derivedPolygonOutput = null;
+      switch (this.outputType) {
+        case "Bounding Box":
+          derivedPolygonOutput = (Polygon) SpGeometryBuilder.createSPGeom(geometry.getEnvelope(), geometry.getSRID());
+          break;
+        case "Convex Hull":
+          derivedPolygonOutput = (Polygon) SpGeometryBuilder.createSPGeom(geometry.convexHull(), geometry.getSRID());
+          break;
+      }
+      event.addField(DERIVED_GEOM_RUNTIME, derivedPolygonOutput.toText());
+      event.addField(DERIVED_EPSG_RUNTIME, derivedPolygonOutput.getSRID());
+      collector.collect(event);
+    }
+  }
+
+  @Override
+  public void onDetach() throws SpRuntimeException {
+
+  }
+}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md
new file mode 100755
index 000000000..73adb2769
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/documentation.md
@@ -0,0 +1,64 @@
+<!--
+  ~ 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.
+  ~
+  -->
+
+## Interior Point
+
+<p align="center">
+    <img src="icon.png" width="150px;" class="pe-image-documentation"/>
+</p>
+
+***
+
+## Description
+A single polygon geometry is derived from any geometry (except a
+point itself)
+
+***
+
+## Required inputs
+
+* JTS Geometry
+* EPSG Code
+* Polygon Output Type
+***
+
+## Configuration
+
+### Geometry field
+Input Geometry
+
+### EPSG field
+Integer value representing EPSG code
+
+### Point Output Type
+Chose between 
+* **Bounding Box:**  Gets a Geometry representing the bounding box of this geometry, whose vertices are 
+(minx miny, minx maxy, maxx maxy, maxx miny, minx miny).
+* **Convex Hull**: Computes the smallest convex Polygon that contains all the points in the Geometry.
+
+***
+
+## Output
+A polygon geometry with EPSG code.
+
+
+### Example
+
+<p align="center">
+    <img src="derivedPoint.png" width="500;" class="pe-image-documentation"/>
+</p>
\ No newline at end of file
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en
new file mode 100755
index 000000000..c8b8d84b3
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.polygon/strings.en
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+
+org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.point.title=Geo Derived Point Creation
+org.apache.streampipes.processors.geo.jvm.jts.processor.derivedgeometry.point.description=Creates a Point from other Geometries greater than point
+
+geometry-key.title=JTS Geometry Event
+geometry-key.description=Single Geometry
+
+epsg-key.title=EPSG
+epsg-key.description=EPSG
+
+point-output-type-key.title=Point Type
+point-output-type-key.description=Choose Output Type


[streampipes] 03/03: [#1353] fix double processor entry in init

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

micklich pushed a commit to branch 1353-geo-create-derived-polygon-of-input-geometry-processor
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 2c859999b865a2fde408a49d9d0a050d5b0512d1
Author: micklich <mi...@apache.org>
AuthorDate: Fri Mar 3 23:48:05 2023 +0100

    [#1353] fix double processor entry in init
---
 .../main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java  | 1 -
 1 file changed, 1 deletion(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
index a0d9f7076..ae86bc0e8 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java
@@ -77,7 +77,6 @@ public class GeoJvmInit extends ExtensionsModelSubmitter {
             new SpeedCalculatorProcessor(),
             new CreateDerivedPolygonProcessor(),
             new ReprojectionProcessor(),
-            new ReprojectionProcessor(),
             new GeometryValidationProcessor(),
             new TopologyValidationProcessor(),
             new BufferGeomProcessor(),