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 57f67e033d8462023f36df169f1f8d01c2520123 Author: micklich <[email protected]> AuthorDate: Mon Feb 27 21:14:37 2023 +0100 [#1353] finish polygon processor, adjust documentation and variables --- .../streampipes/processors/geo/jvm/GeoJvmInit.java | 2 ++ .../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, 14 insertions(+), 12 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 abaca7715..804bb9d5d 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 @@ -28,6 +28,7 @@ import org.apache.streampipes.messaging.jms.SpJmsProtocolFactory; import org.apache.streampipes.messaging.kafka.SpKafkaProtocolFactory; 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.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; @@ -70,6 +71,7 @@ public class GeoJvmInit extends ExtensionsModelSubmitter { new LatLngToJtsPointProcessor(), new TrajectoryFromPointsProcessor(), new SpeedCalculatorProcessor(), + new CreateDerivedPolygonProcessor(), new ReprojectionProcessor()) .registerMessagingFormats( new JsonDataFormatFactory(), 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
