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/13 01:17:30 UTC
[streampipes] branch 1272-buffer-processor updated (238c7cd08 -> 5a3802640)
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 238c7cd08 chore(docs): describe official support of Java 17 (#1252)
new dfe72ebbf #1272 add buffer geometry
new b6a1f648b #1272 misc changes of buffer geometry
new 5a3802640 #1272 add buffer point processor
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:
.../streampipes/processors/geo/jvm/GeoJvmInit.java | 8 +-
.../geo/jvm/jts/helper/buffer/BufferSide.java | 18 +-
.../geo/jvm/jts/helper/buffer/CapStyle.java | 18 +-
.../geo/jvm/jts/helper/buffer/JoinStyle.java | 19 +-
.../geo/jvm/jts/helper/buffer/SpBufferBuilder.java | 124 ++++++++++++
.../buffergeometry/BufferGeomProcessor.java | 212 +++++++++++++++++++++
.../bufferpoint/BufferPointProcessor.java | 158 +++++++++++++++
.../documentation.md | 96 ++++++++++
.../icon.png | Bin 0 -> 12978 bytes
.../strings.en | 32 ++++
.../documentation.md | 47 +++--
.../icon.png | Bin 0 -> 13832 bytes
.../strings.en | 20 ++
13 files changed, 705 insertions(+), 47 deletions(-)
copy streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/model/Order.java => streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/BufferSide.java (76%)
mode change 100644 => 100755
copy streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/model/Order.java => streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/CapStyle.java (77%)
mode change 100644 => 100755
copy streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/model/Order.java => streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/JoinStyle.java (76%)
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
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
copy streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/{org.apache.streampipes.processors.geo.jvm.jts.processor.reprojection => org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint}/documentation.md (55%)
create mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png
create mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/strings.en
[streampipes] 01/03: #1272 add buffer geometry
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 dfe72ebbf9a1238e882ca2ff928b067af66e1e2d
Author: micklich <mi...@apache.org>
AuthorDate: Sun Feb 12 23:46:00 2023 +0100
#1272 add buffer geometry
---
.../streampipes/processors/geo/jvm/GeoJvmInit.java | 6 +-
.../geo/jvm/jts/helper/buffer/BufferSide.java | 32 ++++
.../geo/jvm/jts/helper/buffer/CapStyle.java | 32 ++++
.../geo/jvm/jts/helper/buffer/JoinStyle.java | 33 ++++
.../geo/jvm/jts/helper/buffer/SpBufferBuilder.java | 124 ++++++++++++
.../buffergeometry/BufferGeomProcessor.java | 213 +++++++++++++++++++++
.../documentation.md | 98 ++++++++++
.../icon.png | Bin 0 -> 12978 bytes
.../strings.en | 32 ++++
9 files changed, 568 insertions(+), 2 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..13776f657 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.buffergeometry.BufferGeomProcessor;
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,7 +71,8 @@ public class GeoJvmInit extends ExtensionsModelSubmitter {
new LatLngToJtsPointProcessor(),
new TrajectoryFromPointsProcessor(),
new SpeedCalculatorProcessor(),
- new ReprojectionProcessor())
+ new ReprojectionProcessor(),
+ new BufferGeomProcessor())
.registerMessagingFormats(
new JsonDataFormatFactory(),
new CborDataFormatFactory(),
@@ -89,7 +91,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/helper/buffer/BufferSide.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/BufferSide.java
new file mode 100755
index 000000000..af51c9972
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/BufferSide.java
@@ -0,0 +1,32 @@
+/*
+ * 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.helper.buffer;
+
+public enum BufferSide {
+ Left(-1), Both(0), Right(1);
+
+ private final int number;
+
+ BufferSide(int number) {
+ this.number = number;
+ }
+
+ public int getNumber() {
+ return number;
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/CapStyle.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/CapStyle.java
new file mode 100755
index 000000000..f1225eec1
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/CapStyle.java
@@ -0,0 +1,32 @@
+/*
+ * 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.helper.buffer;
+
+public enum CapStyle {
+ Round(1), Flat(2), Square(3);
+
+ private int number;
+
+ CapStyle(int number) {
+ this.number = number;
+ }
+
+ public int getNumber() {
+ return number;
+ }
+}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/JoinStyle.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/JoinStyle.java
new file mode 100755
index 000000000..f9a8212d9
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/JoinStyle.java
@@ -0,0 +1,33 @@
+/*
+ * 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.helper.buffer;
+
+public enum JoinStyle {
+ Round(1), Mitre(2), Bevel(3);
+
+ private int number;
+
+ JoinStyle(int number) {
+ this.number = number;
+ }
+
+ public int getNumber() {
+ return number;
+ }
+}
+
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/SpBufferBuilder.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/SpBufferBuilder.java
new file mode 100755
index 000000000..db496ff0f
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/SpBufferBuilder.java
@@ -0,0 +1,124 @@
+/*
+ * 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.helper.buffer;
+
+import org.apache.streampipes.processors.geo.jvm.jts.exceptions.SpNotSupportedGeometryException;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.SpReprojectionBuilder;
+
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.Point;
+import org.locationtech.jts.geom.Polygon;
+import org.locationtech.jts.operation.buffer.BufferOp;
+import org.locationtech.jts.operation.buffer.BufferParameters;
+
+public class SpBufferBuilder {
+
+ public static Polygon createSpBuffer(Point geom, double distance, int capStyle, int segments, double simplifyFactor) {
+
+ Point geomInternal = geom;
+ Polygon bufferGeom = null;
+
+ //if capStyle is flat it will be forced to be round
+ if (capStyle == 2) {
+ capStyle = 1;
+ }
+
+ try {
+ // transform to metric coordinate system
+ if (!SpReprojectionBuilder.isMeterCRS(geom.getSRID())) {
+
+ geomInternal =
+ (Point) SpReprojectionBuilder.reprojectSpGeometry(geom, SpReprojectionBuilder.findWgsUtm_EPSG(geom));
+ }
+
+ //creates buffer params
+ BufferParameters bufferParam = new BufferParameters(); //init
+ bufferParam.setEndCapStyle(capStyle);
+ bufferParam.setQuadrantSegments(segments);
+ bufferParam.setSimplifyFactor(simplifyFactor);
+
+ bufferGeom = (Polygon) SpGeometryBuilder.createSPGeom(BufferOp.bufferOp(geomInternal, distance, bufferParam),
+ geomInternal.getSRID());
+
+ if (bufferGeom.getSRID() != geom.getSRID()) {
+ bufferGeom = (Polygon) SpReprojectionBuilder.reprojectSpGeometry(bufferGeom, geom.getSRID());
+ }
+ } catch (SpNotSupportedGeometryException e) {
+ //if reprojection geometry is not supported an empty geometry has to be created
+ bufferGeom = (Polygon) SpGeometryBuilder.createEmptyGeometry(bufferGeom);
+ }
+
+ return bufferGeom;
+ }
+
+ public static Geometry createSpBuffer(Geometry geom,
+ Double distance,
+ int endCapStyle,
+ int joinStyle,
+ double mitreLimit,
+ int segment,
+ double simplifyFactor,
+ boolean singleSided,
+ int side) {
+ Geometry internal = geom;
+ Geometry result = null;
+ BufferParameters bufferParameter = new BufferParameters();
+ bufferParameter.setEndCapStyle(endCapStyle);
+ bufferParameter.setJoinStyle(joinStyle);
+ bufferParameter.setMitreLimit(mitreLimit);
+ bufferParameter.setQuadrantSegments(segment);
+ bufferParameter.setSimplifyFactor(simplifyFactor);
+ bufferParameter.setSingleSided(singleSided);
+ //
+ if (side != 0) {
+ distance = distance * side;
+ }
+
+ try {
+ //if epsg is not a metric CRS, it will be transformed to corresponding utm zone
+ if (!SpReprojectionBuilder.isMeterCRS(geom.getSRID())) {
+
+ internal = SpReprojectionBuilder.reprojectSpGeometry(internal,
+ SpReprojectionBuilder.findWgsUtm_EPSG(SpGeometryBuilder.extractPoint(internal)));
+ }
+
+ //using bufferOP with input geometry (internal) distance and Parameter)
+ result = SpGeometryBuilder.createSPGeom(BufferOp.bufferOp(internal, distance, bufferParameter).toText(),
+ internal.getSRID());
+
+
+ // if geometry wasn't metric, transformation took place. to get the result in the same coordinate system like input, it will
+ // be back transformed
+ if (result.getSRID() != geom.getSRID()) {
+ result = SpReprojectionBuilder.reprojectSpGeometry(result, geom.getSRID());
+ }
+ } catch (SpNotSupportedGeometryException e) {
+ result = SpGeometryBuilder.createEmptyGeometry(internal);
+ }
+
+ //========VALIDATE RESULT
+ if (result.isEmpty()) {
+ // TODO: Logger Info
+ }
+
+ return result;
+ }
+
+
+}
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
new file mode 100644
index 000000000..cf8271228
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java
@@ -0,0 +1,213 @@
+/*
+ * 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.buffergeometry;
+
+import org.apache.streampipes.commons.exceptions.SpRuntimeException;
+import org.apache.streampipes.model.DataProcessorType;
+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.buffer.BufferSide;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.CapStyle;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.JoinStyle;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.SpBufferBuilder;
+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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BufferGeomProcessor extends StreamPipesDataProcessor {
+ public static final String GEOM_KEY = "geometry-key";
+ public static final String EPSG_KEY = "epsg-key";
+ public static final String CAP_KEY = "cap-style-key";
+ public static final String SEGMENTS_KEY = "segments-key";
+ public static final String SIMPLIFY_FACTOR_KEY = "simplify-factor-key";
+ public static final String DISTANCE_KEY = "distance-key";
+ public static final String JOIN_KEY = "join-style-key";
+ public static final String MITRE_LIMIT_KEY = "mitre-limit-key";
+ public static final String SIDE_KEY = "side-key";
+ public static final String IS_SINGLE_SIDE = "is-single-side-key";
+ public static final String GEOM_RUNTIME = "geometry-buffer";
+ public static final String EPSG_RUNTIME = "epsg-buffer";
+ private String geometryMapper;
+ private String epsgMapper;
+ private Integer capStyle;
+ private Integer joinStyle;
+ private Integer side;
+ private Double mitreLimit;
+ private Integer segments;
+ private Double simplifyFactor;
+ private Double distance;
+ private Boolean singleSided;
+ private static final Logger LOG = LoggerFactory.getLogger(BufferGeomProcessor.class);
+
+ @Override
+ public DataProcessorDescription declareModel() {
+ return ProcessingElementBuilder.create("org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry")
+ .category(DataProcessorType.GEO)
+ .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+ .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())
+ .outputStrategy(OutputStrategies.append(
+ EpProperties.stringEp(
+ Labels.withId(GEOM_KEY),
+ GEOM_RUNTIME,
+ "http://www.opengis.net/ont/geosparql#Geometry"
+ ),
+ EpProperties.numberEp(
+ Labels.withId(EPSG_KEY),
+ EPSG_RUNTIME,
+ "http://data.ign.fr/def/ignf#CartesianCS"
+ )
+ )
+ )
+ .requiredSingleValueSelection(
+ Labels.withId(CAP_KEY),
+ Options.from(
+ CapStyle.Square.name(),
+ CapStyle.Flat.name(),
+ CapStyle.Round.name())
+ )
+ .requiredSingleValueSelection(
+ Labels.withId(JOIN_KEY),
+ Options.from(
+ JoinStyle.Bevel.name(),
+ JoinStyle.Mitre.name(),
+ JoinStyle.Round.name())
+ )
+ .requiredSingleValueSelection(
+ Labels.withId(SIDE_KEY),
+ Options.from(
+ BufferSide.Both.name(),
+ BufferSide.Left.name(),
+ BufferSide.Right.name())
+ )
+ .requiredIntegerParameter(
+ Labels.withId(MITRE_LIMIT_KEY),
+ 5)
+ .requiredIntegerParameter(
+ Labels.withId(SEGMENTS_KEY),
+ 8
+ )
+ .requiredFloatParameter(
+ Labels.withId(SIMPLIFY_FACTOR_KEY),
+ 0.01f
+ )
+ .requiredFloatParameter(
+ Labels.withId(DISTANCE_KEY)
+ )
+ .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);
+ String readCapStyle = parameters.extractor().selectedSingleValue(CAP_KEY, String.class);
+ String readJoinStyle = parameters.extractor().selectedSingleValue(JOIN_KEY, String.class);
+ String readSide = parameters.extractor().selectedSingleValue(SIDE_KEY, String.class);
+ this.mitreLimit = parameters.extractor().singleValueParameter(MITRE_LIMIT_KEY, Double.class);
+ 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())) {
+ this.capStyle = CapStyle.Square.getNumber();
+ } else if (readCapStyle.equals(CapStyle.Flat.name())) {
+ this.capStyle = CapStyle.Flat.getNumber();
+ }
+ // transform names to numbers
+ this.joinStyle = 1;
+ if (readJoinStyle.equals(JoinStyle.Bevel.name())) {
+ this.joinStyle = JoinStyle.Bevel.getNumber();
+ } else if (readJoinStyle.equals(JoinStyle.Mitre.name())) {
+ this.joinStyle = JoinStyle.Mitre.getNumber();
+ }
+ // transform names to numbers
+ this.singleSided = false;
+ this.side = 0;
+ if (readSide.equals(BufferSide.Right.name())) {
+ this.side = BufferSide.Right.getNumber();
+ this.singleSided = true;
+ } else if (readSide.equals(BufferSide.Left.name())) {
+ this.side = BufferSide.Left.getNumber();
+ singleSided = true;
+ }
+ }
+
+ @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);
+ Geometry bufferGeom =
+ SpBufferBuilder.createSpBuffer(
+ geometry,
+ distance,
+ capStyle,
+ joinStyle,
+ mitreLimit,
+ segments,
+ simplifyFactor,
+ singleSided,
+ side);
+
+ if (!bufferGeom.isEmpty()) {
+ event.addField(GEOM_RUNTIME, bufferGeom.toText());
+ event.addField(EPSG_RUNTIME, bufferGeom.getSRID());
+ collector.collect(event);
+ } else {
+ LOG.warn("An empty polygon geometry is created and is not parsed into the stream");
+ }
+
+ 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.buffergeometry/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md
new file mode 100755
index 000000000..b799534a4
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md
@@ -0,0 +1,98 @@
+<!--
+ ~ 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.
+ ~
+ -->
+
+## Buffer Geometry
+
+<p align="center">
+ <img src="icon.png" width="150px;" class="pe-image-documentation"/>
+</p>
+
+***
+
+## Description
+
+Creates a buffer Polygon Geometry from a geometry
+***
+
+## Required inputs
+
+* WKT of a JTS Geometry
+* Integer value representing EPSG code
+* Distance
+* Cap Style
+* Join Style
+* Mitre-Limit
+* Side
+* Simplify Factor
+* Quadrant Segments
+***
+
+## Configuration
+
+### 1st parameter
+Input Geometry
+
+### 2nd parameter
+EPSG code value
+
+### 3rd parameter
+Distance
+the buffer distance around in geometry in meter
+
+### 4rd parameter
+Cap Style
+CAP_ROUND - the usual round end caps
+CAP_FLAT - end caps are truncated flat at the line ends
+CAP_SQUARE - end caps are squared off at the buffer distance beyond the line ends
+
+### 5rd parameter
+Simplify Factor
+The default simplify factor Provides an accuracy of about 1%, which matches the accuracy of the
+default Quadrant Segments parameter.
+
+### 6rd parameter
+Quadrant Segments
+The default number of facets into which to divide a fillet of 90 degrees. A value of 8 gives
+less than 2% max error in the buffer distance. For a max error of < 1%, use QS = 12.
+For a max error of < 0.1%, use QS = 18.
+
+### 7rd parameter
+Join Style
+Defines the corners in a buffer
+JOIN_ROUND - the usual round join
+JOIN_MITRE - corners are "sharp" (up to a distance limit)
+JOIN_BEVEL - corners are beveled (clipped off).
+
+### 8rd parameter
+Mitre-Limit
+mitre ratio limit (only affects mitered join style)
+
+### 9rd parameter
+Side
+: 'left' or 'right' performs a single-sided buffer on the geometry, with the buffered side
+relative to the direction of the line. This is only applicable to LINESTRING geometry and
+does not affect POINT or POLYGON geometries.
+
+***
+
+## Output
+
+
+
+### Example
+
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
new file mode 100644
index 000000000..32c49ca7b
Binary files /dev/null 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.buffergeometry/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/strings.en
new file mode 100755
index 000000000..bcc328a55
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/strings.en
@@ -0,0 +1,32 @@
+org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry.title=Geo Buffer Geometry
+org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry.description=Creates a polygon buffer from a geometry
+
+geometry-key.title=JTS Geometry Event
+geometry-key.description=Single Geometry
+
+epsg-key.title=EPSG
+epsg-key.description=EPSG
+
+cap-style-key.title=Cap Style Parameter
+cap-style-key.description= Cap style
+
+segments-key.title=Segment Value
+segments-key.description=Set the parameter
+
+simplify-factor-key.title=Simplify factor
+simplify-factor-key.description=Simplify factor
+
+distance-key.title=Distance
+distance-key.description=Distance in meters with radius of the buffer
+
+join-style-key.title=Join Style Parameter
+join-style-key.description=Join Style Parameter
+
+mitre-limit-key.title=Mitre Limit
+mitre-limit-key.description=Mitre Limit
+
+side-key.title= Side Choice
+side-key.description= Side Choice
+
+is-single-side-key.title=Is Single Sided
+is-single-side-key.description=Value for options single sided
\ No newline at end of file
[streampipes] 03/03: #1272 add buffer point processor
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 5a3802640fd9ead910d0e3ee9d2df08068d84b86
Author: micklich <mi...@apache.org>
AuthorDate: Mon Feb 13 01:35:47 2023 +0100
#1272 add buffer point processor
---
.../streampipes/processors/geo/jvm/GeoJvmInit.java | 4 +-
.../bufferpoint/BufferPointProcessor.java | 158 +++++++++++++++++++++
.../documentation.md | 79 +++++++++++
.../icon.png | Bin 0 -> 13832 bytes
.../strings.en | 20 +++
5 files changed, 260 insertions(+), 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 13776f657..214531d11 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
@@ -29,6 +29,7 @@ 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.buffergeometry.BufferGeomProcessor;
+import org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint.BufferPointProcessor;
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;
@@ -72,7 +73,8 @@ public class GeoJvmInit extends ExtensionsModelSubmitter {
new TrajectoryFromPointsProcessor(),
new SpeedCalculatorProcessor(),
new ReprojectionProcessor(),
- new BufferGeomProcessor())
+ new BufferGeomProcessor(),
+ new BufferPointProcessor())
.registerMessagingFormats(
new JsonDataFormatFactory(),
new CborDataFormatFactory(),
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
new file mode 100644
index 000000000..890d255cc
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/bufferpoint/BufferPointProcessor.java
@@ -0,0 +1,158 @@
+/*
+ * 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.bufferpoint;
+
+import org.apache.streampipes.commons.exceptions.SpRuntimeException;
+import org.apache.streampipes.model.DataProcessorType;
+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.buffer.CapStyle;
+import org.apache.streampipes.processors.geo.jvm.jts.helper.buffer.SpBufferBuilder;
+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.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";
+ public static final String CAP_KEY = "cap-style-key";
+ public static final String SEGMENTS_KEY = "segments-key";
+ public static final String SIMPLIFY_FACTOR_KEY = "simplify-factor-key";
+ public static final String DISTANCE_KEY = "distance-key";
+ public static final String GEOM_RUNTIME = "geometry-buffer";
+ public static final String EPSG_RUNTIME = "epsg-buffer";
+ private String geometryMapper;
+ private String epsgMapper;
+ private Integer capStyle;
+ private Integer segments;
+ private Double simplifyFactor;
+ private Double distance;
+ private static final Logger LOG = LoggerFactory.getLogger(BufferPointProcessor.class);
+
+ @Override
+ public DataProcessorDescription declareModel() {
+ return ProcessingElementBuilder.create("org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint")
+ .category(DataProcessorType.GEO)
+ .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+ .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())
+ .outputStrategy(OutputStrategies.append(
+ EpProperties.stringEp(
+ Labels.withId(GEOM_KEY),
+ GEOM_RUNTIME,
+ "http://www.opengis.net/ont/geosparql#Geometry"
+ ),
+ EpProperties.numberEp(
+ Labels.withId(EPSG_KEY),
+ EPSG_RUNTIME,
+ "http://data.ign.fr/def/ignf#CartesianCS"
+ )
+ )
+ )
+ .requiredSingleValueSelection(
+ Labels.withId(CAP_KEY),
+ Options.from(
+ CapStyle.Square.name(),
+ CapStyle.Round.name())
+ )
+ .requiredIntegerParameter(
+ Labels.withId(SEGMENTS_KEY),
+ 8
+ )
+ .requiredFloatParameter(
+ Labels.withId(SIMPLIFY_FACTOR_KEY),
+ 0.01f
+ )
+ .requiredFloatParameter(
+ Labels.withId(DISTANCE_KEY)
+ )
+ .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);
+ String readCapStyle = parameters.extractor().selectedSingleValue(CAP_KEY, String.class);
+ 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())) {
+ this.capStyle = CapStyle.Square.getNumber();
+ } else if (readCapStyle.equals(CapStyle.Flat.name())) {
+ this.capStyle = CapStyle.Flat.getNumber();
+ }
+ }
+
+ @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) {
+ Geometry buffer = SpBufferBuilder.createSpBuffer((Point) geometry, distance, capStyle, segments, simplifyFactor);
+
+ if (!buffer.isEmpty()) {
+ event.addField(GEOM_RUNTIME, buffer.toText());
+ event.addField(EPSG_RUNTIME, buffer.getSRID());
+ collector.collect(event);
+ } else {
+ LOG.warn("An empty polygon geometry is created and is not parsed into the stream");
+ }
+ } else {
+ LOG.warn("Only points are supported but input type is " + geometry.getGeometryType());
+ }
+ }
+ @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.bufferpoint/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/documentation.md
new file mode 100755
index 000000000..191b3642f
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/documentation.md
@@ -0,0 +1,79 @@
+<!--
+ ~ 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.
+ ~
+ -->
+
+## Buffer Point Geometry
+
+<p align="center">
+ <img src="icon.png" width="150px;" class="pe-image-documentation"/>
+</p>
+
+***
+
+## Description
+
+Creates a buffer polygon geometry from a point geometry
+***
+
+## Required inputs
+
+* WKT of a JTS Point Geometry
+* Integer value representing EPSG code
+* Distance
+* Cap Style
+* Simplify Factor
+* Quadrant Segments
+***
+
+## Configuration
+
+
+### 1st parameter
+Input Point Geometry
+
+### 2nd parameter
+EPSG code value
+
+### 3rd parameter
+Distance
+The buffer distance around in geometry in meter
+
+### 4rd parameter
+Cap Style
+CAP_ROUND - the usual round end caps
+CAP_SQUARE - end caps are squared off at the buffer distance beyond the line ends
+
+
+### 5rd parameter
+Simplify Factor
+The default simplify factor Provides an accuracy of about 1%, which matches the accuracy of the
+default Quadrant Segments parameter.
+
+### 6rd parameter
+Quadrant Segments
+The default number of facets into which to divide a fillet of 90 degrees.
+
+***
+
+## Output
+
+<p align="center">
+ <img src="output.png" width="500;" class="pe-image-documentation"/>
+</p>
+
+### Example
+
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
new file mode 100755
index 000000000..7a8e8fea4
Binary files /dev/null and b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/icon.png differ
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/strings.en
new file mode 100755
index 000000000..488586bf1
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint/strings.en
@@ -0,0 +1,20 @@
+org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint.title=Geo Buffer Point
+org.apache.streampipes.processors.geo.jvm.jts.processor.bufferpoint.description=Creates a polygon buffer from a point
+
+geometry-key.title=JTS Point Event
+geometry-key.description=Single Point Event which will be added to the trajectory
+
+epsg-key.title=JTS Point
+epsg-key.description=JTS Point
+
+cap-style-key.title=Cap Style Parameter
+cap-style-key.description= Cap style
+
+segments-key.title=Quadrant segments
+segments-key.description= Accuracy of approximation for circular arcs
+
+simplify-factor-key.title=Simplify factor
+simplify-factor-key.description=Simplify factor
+
+distance-key.title=Distance
+distance-key.description=Distance in meters with radius of the buffer
\ No newline at end of file
[streampipes] 02/03: #1272 misc changes of buffer geometry
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 b6a1f648b1f89918c4a904568ff9e85022193f6f
Author: micklich <mi...@apache.org>
AuthorDate: Mon Feb 13 01:35:24 2023 +0100
#1272 misc changes of buffer geometry
---
.../geo/jvm/jts/processor/buffergeometry/BufferGeomProcessor.java | 1 -
.../documentation.md | 8 +++-----
2 files changed, 3 insertions(+), 6 deletions(-)
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 cf8271228..7aa162aa9 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
@@ -55,7 +55,6 @@ public class BufferGeomProcessor extends StreamPipesDataProcessor {
public static final String JOIN_KEY = "join-style-key";
public static final String MITRE_LIMIT_KEY = "mitre-limit-key";
public static final String SIDE_KEY = "side-key";
- public static final String IS_SINGLE_SIDE = "is-single-side-key";
public static final String GEOM_RUNTIME = "geometry-buffer";
public static final String EPSG_RUNTIME = "epsg-buffer";
private String geometryMapper;
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md
index b799534a4..57e3fe5d6 100755
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.buffergeometry/documentation.md
@@ -26,7 +26,7 @@
## Description
-Creates a buffer Polygon Geometry from a geometry
+Creates a buffer polygon geometry from a geometry
***
## Required inputs
@@ -52,7 +52,7 @@ EPSG code value
### 3rd parameter
Distance
-the buffer distance around in geometry in meter
+The buffer distance around in geometry in meter
### 4rd parameter
Cap Style
@@ -67,9 +67,7 @@ default Quadrant Segments parameter.
### 6rd parameter
Quadrant Segments
-The default number of facets into which to divide a fillet of 90 degrees. A value of 8 gives
-less than 2% max error in the buffer distance. For a max error of < 1%, use QS = 12.
-For a max error of < 0.1%, use QS = 18.
+The default number of facets into which to divide a fillet of 90 degrees.
### 7rd parameter
Join Style