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 2022/11/23 22:53:08 UTC

[streampipes] branch STREAMPIPES-642 updated (773495cca -> 09f7bda23)

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

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


    from 773495cca misc changes on resources
     add a7e377fae [STREAMPIPES-589] Explicitly name MIT-licsensed files in LICENSE
     add d15065ad9 [STREAMPIPES-588] Use range in NOTICE file
     add 655cdc7a2 Merge branch 'dev' of github.com:apache/streampipes into dev
     add fbbe78677 Streampipes 634 - ADD MkDocs Documentation  (#143)
     add 896994031 [STREAMPIPES-591] Prevent tests from failing with Java 17+
     add d0300e2e5 [STREAMPIPES-590] add licence header to resource files
     add e3c1c660c [STREAMPIPES-566] Fix query download, improve code structure
     add 3ae6e5375 [STREAMPIPES-566] Delete unused classes
     add e7123dbdc [STREAMPIPES-566] Add license header
     add 4aeef8b3a [STREAMPIPES-566] Do not use wildcard imports
     add 50af75b11 [STREAMPIPES-566] Add basic tests
     add c6ad8b85a [STREAMPIPES-566] Use time field index over fixed assignment
     new 260e1e49b rewrite to 1-class processor model
     new 7c40df163 delete old setEPSG classes
     new 5a547e860 move resources
     new 83870dbdd misc changes on resources
     new c42696c3d rewrite latlng to 1 class
     new f4518d265 replace processor call in init
     new 7ff20a765 adjust resources text
     new 63b3199d6 fix text in epsg processor resource
     new eb60bb9b5 change icon logo
     new be9b59937 latlng delete old classes
     new d4f785d1d rewrite trajectory to 1 class
     new 768b5a082 change descriptions on string.en
     new d22ab8680 styleguide and change input value for method addPoint
     new f4dc7ea69 replace proesor call in init
     new 3df9394b0 trajectory delete old classes
     new 09f7bda23 Merge remote-tracking branch 'origin/STREAMPIPES-642' into STREAMPIPES-642

The 16 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:
 LICENSE                                            |  10 +-
 NOTICE                                             |   2 +-
 .../strings.en                                     |  17 ++
 .../__package__.pe.__packageName__.sink/strings.en |  17 ++
 pom.xml                                            |  14 +-
 .../docs/getting-started/installation.md           |  17 +-
 .../getting-started/quickstart.md}                 |  36 +---
 .../{README.md => docs/index.md}                   |   4 +-
 streampipes-client-python/docs/overrides/main.html |  47 +++++
 .../docs/overrides/partials/footer.html            |  44 +++--
 .../docs/scripts/gen_ref_pages.py                  |  50 ++++++
 .../docs/stylesheets/extra.css                     |  21 +++
 streampipes-client-python/mkdocs.yml               |  81 +++++++++
 streampipes-client-python/setup.py                 |   6 +-
 streampipes-data-explorer/pom.xml                  |   6 +
 .../dataexplorer/DataLakeManagementV4.java         | 199 +--------------------
 .../autoagg/AbstractAutoAggregationQuery.java      |  70 --------
 .../autoagg/FromNowAutoAggregationQuery.java       |  49 -----
 .../autoagg/GroupedAutoAggregationQuery.java       |  48 -----
 .../autoagg/TimeBoundAutoAggregationQuery.java     |  49 -----
 .../param/AggregatedTimeBoundQueryParams.java      |  50 ------
 .../param/AggregatedTimeUnitQueryParams.java       |  51 ------
 .../dataexplorer/param/CountQueryParams.java       |  21 ---
 .../GroupedAggregatedTimeBoundQueryParams.java     |  46 -----
 .../dataexplorer/param/GroupedQueryParams.java     |  42 -----
 .../dataexplorer/param/PagingQueryParams.java      |  95 ----------
 .../dataexplorer/param/TimeBoundQueryParams.java   |  44 -----
 .../dataexplorer/param/TimeUnitQueryParams.java    |  42 -----
 .../query/GetAggregatedEventsFromNowQuery.java     |  47 -----
 .../query/GetAggregatedEventsQuery.java            |  45 -----
 .../query/GetDateFromSortedTableRecord.java        |  69 -------
 .../query/GetEventsAutoAggregationQuery.java       |  21 ---
 .../dataexplorer/query/GetEventsFromNowQuery.java  |  44 -----
 .../dataexplorer/query/GetEventsQuery.java         |  42 -----
 .../query/GetGroupedAggregatedEventsQuery.java     |  44 -----
 .../dataexplorer/query/GetGroupedEventsQuery.java  |  42 -----
 .../query/GetHeadersWithTypesQuery.java            |  46 -----
 .../dataexplorer/query/GetMaxPagesQuery.java       |  41 -----
 .../query/GetNumberOfRecordsByTimeUnitQuery.java   |  52 ------
 .../query/GetNumberOfRecordsQuery.java             |  51 ------
 .../dataexplorer/query/GetPagingEventsQuery.java   |  72 --------
 .../dataexplorer/v4/query/QueryResultProvider.java |  64 +++++++
 .../v4/query/StreamedQueryResultProvider.java      | 118 ++++++++++++
 .../v4/query/writer/ConfiguredCsvOutputWriter.java |  76 ++++++++
 .../query/writer/ConfiguredJsonOutputWriter.java   |  70 ++++++++
 .../v4/query/writer/ConfiguredOutputWriter.java    |  53 ++++++
 .../dataexplorer/v4/query/writer/OutputFormat.java |  17 +-
 .../v4/query/writer/item/CsvItemWriter.java        |  23 +--
 .../v4/query/writer/item/ItemGenerator.java        |  57 ++++++
 .../v4/query/writer/item/JsonItemWriter.java       |  37 ++--
 .../dataexplorer/v4/utils/TimeParser.java          |  48 +++++
 .../writer/TestConfiguredCsvOutputWriter.java      |  52 ++++++
 .../writer/TestConfiguredJsonOutputWriter.java     |  53 ++++++
 .../query/writer/TestConfiguredOutputWriter.java   |  28 ++-
 .../v4/query/writer/item/TestCsvItemWriter.java    |  31 ++--
 .../v4/query/writer/item/TestItemWriter.java       |  28 ++-
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../streampipes/processors/geo/jvm/GeoJvmInit.java |   8 +-
 .../geo/jvm/jts/helper/SpTrajectoryBuilder.java    |  44 +++--
 .../jvm/jts/processor/latLngToGeo/LatLngToGeo.java |  72 --------
 .../latLngToGeo/LatLngToGeoController.java         |  87 ---------
 .../latLngToGeo/LatLngToGeoParameter.java          |  49 -----
 .../LatLngToJtsPointProcessor.java                 | 118 ++++++++++++
 .../trajectory/CreateTrajectoryFromPoints.java     |  80 ---------
 .../CreateTrajectoryFromPointsController.java      | 113 ------------
 .../CreateTrajectoryFromPointsParameter.java       |  60 -------
 .../trajectory/TrajectoryFromPointsProcessor.java  | 140 +++++++++++++++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../icon.png                                       | Bin 20621 -> 0 bytes
 .../strings.en                                     |   6 -
 .../documentation.md                               |   2 +-
 .../icon.png                                       | Bin 0 -> 16698 bytes
 .../strings.en                                     |  23 +--
 .../strings.en                                     |  24 ++-
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  18 ++
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  18 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  19 +-
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../strings.en                                     |  17 ++
 .../apache/streampipes/ps/DataLakeResourceV4.java  |   3 +-
 .../services/data-export.service.ts                |   2 +-
 234 files changed, 4123 insertions(+), 2086 deletions(-)
 copy CONTRIBUTING.md => streampipes-client-python/docs/getting-started/installation.md (76%)
 copy streampipes-client-python/{README.md => docs/getting-started/quickstart.md} (63%)
 copy streampipes-client-python/{README.md => docs/index.md} (95%)
 create mode 100644 streampipes-client-python/docs/overrides/main.html
 copy ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.html => streampipes-client-python/docs/overrides/partials/footer.html (52%)
 create mode 100644 streampipes-client-python/docs/scripts/gen_ref_pages.py
 create mode 100644 streampipes-client-python/docs/stylesheets/extra.css
 create mode 100644 streampipes-client-python/mkdocs.yml
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/autoagg/AbstractAutoAggregationQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/autoagg/FromNowAutoAggregationQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/autoagg/GroupedAutoAggregationQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/autoagg/TimeBoundAutoAggregationQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/AggregatedTimeBoundQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/AggregatedTimeUnitQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/CountQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/GroupedAggregatedTimeBoundQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/GroupedQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/PagingQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/TimeBoundQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/param/TimeUnitQueryParams.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetAggregatedEventsFromNowQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetAggregatedEventsQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetDateFromSortedTableRecord.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetEventsAutoAggregationQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetEventsFromNowQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetEventsQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetGroupedAggregatedEventsQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetGroupedEventsQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetHeadersWithTypesQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetMaxPagesQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetNumberOfRecordsByTimeUnitQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetNumberOfRecordsQuery.java
 delete mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/GetPagingEventsQuery.java
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/QueryResultProvider.java
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/StreamedQueryResultProvider.java
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/ConfiguredCsvOutputWriter.java
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/ConfiguredJsonOutputWriter.java
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/ConfiguredOutputWriter.java
 copy streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/connect/AbstractAdapterResource.java => streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/OutputFormat.java (66%)
 copy streampipes-integration-tests/src/test/java/org/apache/streampipes/integration/containers/PulsarDevContainer.java => streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/item/CsvItemWriter.java (69%)
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/item/ItemGenerator.java
 copy streampipes-extensions/streampipes-processors-transformation-flink/src/test/java/org/apache/streampipes/processors/transformation/flink/utils/DummyCollector.java => streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/query/writer/item/JsonItemWriter.java (55%)
 create mode 100644 streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/utils/TimeParser.java
 create mode 100644 streampipes-data-explorer/src/test/java/org/apache/streampipesdataexplorer/v4/query/writer/TestConfiguredCsvOutputWriter.java
 create mode 100644 streampipes-data-explorer/src/test/java/org/apache/streampipesdataexplorer/v4/query/writer/TestConfiguredJsonOutputWriter.java
 copy ui/src/app/connect/components/adapter-details/adapter-details-tabs.ts => streampipes-data-explorer/src/test/java/org/apache/streampipesdataexplorer/v4/query/writer/TestConfiguredOutputWriter.java (65%)
 copy streampipes-pipeline-management/src/test/java/org/apache/streampipes/manager/selector/TestSelectorGenerator.java => streampipes-data-explorer/src/test/java/org/apache/streampipesdataexplorer/v4/query/writer/item/TestCsvItemWriter.java (55%)
 copy streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/Filetypes.java => streampipes-data-explorer/src/test/java/org/apache/streampipesdataexplorer/v4/query/writer/item/TestItemWriter.java (68%)
 delete mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java
 delete mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
 delete mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java
 delete mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
 delete mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
 delete mode 100755 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java
 delete mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png
 delete mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
 rename streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/{org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo => org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint}/documentation.md (96%)
 create mode 100644 streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png
 copy streampipes-wrapper-python/streampipes/api/resources/processor.py => streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en (63%)


[streampipes] 05/16: rewrite latlng to 1 class

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

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

commit c42696c3d489fc68641dfc07f894d7b97d395cba
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 19:58:02 2022 +0100

    rewrite latlng to 1 class
---
 .../LatLngToJtsPointProcessor.java                 | 118 +++++++++++++++++++++
 .../documentation.md                               |   0
 .../icon.png                                       | Bin
 .../strings.en                                     |   0
 4 files changed, 118 insertions(+)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java
new file mode 100644
index 000000000..38bfdcd80
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java
@@ -0,0 +1,118 @@
+/*
+ * 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.latlngtojtspoint;
+
+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.sdk.builder.PrimitivePropertyBuilder;
+import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
+import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
+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.OutputStrategies;
+import org.apache.streampipes.sdk.utils.Assets;
+import org.apache.streampipes.sdk.utils.Datatypes;
+import org.apache.streampipes.vocabulary.Geo;
+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.Point;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LatLngToJtsPointProcessor extends StreamPipesDataProcessor {
+    public static final String LAT_KEY = "latitude-key";
+    public static final String LNG_KEY = "longitude-key";
+    public static final String EPSG_KEY = "epsg-key";
+    public static final String WKT_RUNTIME = "geomWKT";
+    private String latitudeMapper;
+    private String longitudeMapper;
+    private String epsgMapper;
+    private static final Logger LOG = LoggerFactory.getLogger(LatLngToJtsPointProcessor.class);
+    public static final String EPA_NAME = "Latitude Longitude To JTS Point";
+
+    @Override
+    public DataProcessorDescription declareModel() {
+        return ProcessingElementBuilder
+                .create("org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint")
+                .category(DataProcessorType.GEO)
+                .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+                .withLocales(Locales.EN)
+                .requiredStream(
+                        StreamRequirementsBuilder
+                                .create()
+                                .requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lat),
+                                        Labels.withId(LAT_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                                .requiredPropertyWithUnaryMapping(
+                                        EpRequirements.domainPropertyReq(Geo.lng),
+                                        Labels.withId(LNG_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(
+                                PrimitivePropertyBuilder
+                                        .create(Datatypes.String, WKT_RUNTIME)
+                                        .domainProperty("http://www.opengis.net/ont/geosparql#Geometry")
+                                        .build()
+                        )
+                )
+                .build();
+    }
+
+    @Override
+    public void onInvocation(ProcessorParams parameters, SpOutputCollector spOutputCollector,
+                             EventProcessorRuntimeContext runtimeContext) throws SpRuntimeException {
+        this.latitudeMapper = parameters.extractor().mappingPropertyValue(LAT_KEY);
+        this.longitudeMapper = parameters.extractor().mappingPropertyValue(LNG_KEY);
+        this.epsgMapper = parameters.extractor().mappingPropertyValue(EPSG_KEY);
+    }
+
+    @Override
+    public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeException {
+        Double lat = event.getFieldBySelector(latitudeMapper).getAsPrimitive().getAsDouble();
+        Double lng = event.getFieldBySelector(longitudeMapper).getAsPrimitive().getAsDouble();
+        Integer epsg = event.getFieldBySelector(epsgMapper).getAsPrimitive().getAsInt();
+
+        Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
+
+        if (!geom.isEmpty()) {
+            event.addField(WKT_RUNTIME, geom.toString());
+            LOG.debug("Created Geometry: " + geom.toString());
+            collector.collect(event);
+        } else {
+            LOG.warn("An empty point geometry in " + EPA_NAME + " is created due"
+                    + "invalid input field. Latitude: " + lat + "Longitude: " + lng);
+            LOG.error("An event is filtered out because of invalid geometry");
+        }
+    }
+
+    @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.latLngToGeo/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/documentation.md
similarity index 100%
rename from streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/documentation.md
rename to streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/documentation.md
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png
similarity index 100%
rename from streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/icon.png
rename to streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en
similarity index 100%
rename from streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo/strings.en
rename to streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en


[streampipes] 06/16: replace processor call 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 STREAMPIPES-642
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit f4518d2652ac1c125f646185179bf3be1173d471
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 19:58:59 2022 +0100

    replace processor call in init
---
 .../java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java    | 4 ++--
 1 file changed, 2 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 52897a751..75d335169 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,7 +30,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.epsg.EpsgProcessor;
-import org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.LatLngToGeoController;
+import org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.LatLngToJtsPointProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.CreateTrajectoryFromPointsController;
 import org.apache.streampipes.processors.geo.jvm.processor.distancecalculator.DistanceCalculatorController;
 import org.apache.streampipes.processors.geo.jvm.processor.geocoder.GoogleMapsGeocodingController;
@@ -53,7 +53,7 @@ public class GeoJvmInit extends StandaloneModelSubmitter {
                     new StaticGoogleMapsGeocodingController(),
                     new ReverseGeocodingController(),
                     new EpsgProcessor(),
-                    new LatLngToGeoController(),
+                    new LatLngToJtsPointProcessor(),
                     new CreateTrajectoryFromPointsController(),
                     new SpeedCalculatorController(),
                     new StaticDistanceCalculatorController())


[streampipes] 02/16: delete old setEPSG classes

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

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

commit 7c40df1635912b6b96897dfb9a747b47f833464b
Author: micklich <mi...@apache.org>
AuthorDate: Sat Nov 19 23:35:50 2022 +0100

    delete old setEPSG classes
---
 .../geo/jvm/jts/processor/setEPSG/SetEPSG.java     | 53 ----------------
 .../jts/processor/setEPSG/SetEpsgController.java   | 72 ----------------------
 .../jts/processor/setEPSG/SetEpsgParameter.java    | 37 -----------
 3 files changed, 162 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java
deleted file mode 100755
index 4d5639b60..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEPSG.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.setEPSG;
-
-import org.apache.streampipes.logging.api.Logger;
-import org.apache.streampipes.wrapper.context.EventProcessorRuntimeContext;
-import org.apache.streampipes.wrapper.routing.SpOutputCollector;
-import org.apache.streampipes.wrapper.runtime.EventProcessor;
-import org.apache.streampipes.model.runtime.Event;
-
-
-public class SetEPSG implements EventProcessor<SetEpsgParameter> {
-
-  public static Logger LOG;
-  public SetEpsgParameter params;
-  public Integer epsg;
-
-
-  @Override
-  public void onInvocation(SetEpsgParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
-
-    LOG = params.getGraph().getLogger(SetEPSG.class);
-    this.epsg = params.getEpsg();
-  }
-
-  @Override
-  public void onEvent(Event in, SpOutputCollector out) {
-    in.addField(SetEpsgController.EPSG_RUNTIME, epsg);
-
-    out.collect(in);
-  }
-
-  @Override
-  public void onDetach() {
-
-  }
-}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
deleted file mode 100755
index eb85e0b74..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgController.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.setEPSG;
-
-import org.apache.streampipes.model.DataProcessorType;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.model.schema.PropertyScope;
-import org.apache.streampipes.sdk.builder.PrimitivePropertyBuilder;
-import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
-import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
-import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor;
-import org.apache.streampipes.sdk.helpers.*;
-import org.apache.streampipes.sdk.utils.Datatypes;
-import org.apache.streampipes.vocabulary.SO;
-import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
-import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
-import org.apache.streampipes.sdk.utils.Assets;
-
-public class SetEpsgController extends StandaloneEventProcessingDeclarer<SetEpsgParameter> {
-
-  public final static String EPA_NAME = "EPSG Enricher";
-
-  public final static String EPSG_KEY = "epsg-key";
-  public final static String EPSG_RUNTIME = "epsg";
-
-  @Override
-  public DataProcessorDescription declareModel() {
-    return ProcessingElementBuilder
-        .create("org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG")
-        .category(DataProcessorType.GEO)
-        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-        .withLocales(Locales.EN)
-        .requiredStream(StreamRequirementsBuilder
-            .create()
-            .build())
-        .requiredIntegerParameter(Labels.withId(EPSG_KEY), 4326)
-
-        .outputStrategy(
-            OutputStrategies.append(PrimitivePropertyBuilder
-                .create(Datatypes.Integer, EPSG_RUNTIME)
-                .domainProperty("http://data.ign.fr/def/ignf#CartesianCS")
-                .build())
-        )
-        .build();
-  }
-
-  @Override
-  public ConfiguredEventProcessor<SetEpsgParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
-
-    Integer epsg_value = extractor.singleValueParameter(EPSG_KEY, Integer.class);
-    SetEpsgParameter params = new SetEpsgParameter(graph, epsg_value);
-
-    return new ConfiguredEventProcessor<>(params, SetEPSG::new);
-  }
-}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
deleted file mode 100755
index a08141e66..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/setEPSG/SetEpsgParameter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.setEPSG;
-
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams;
-
-public class SetEpsgParameter extends EventProcessorBindingParams {
-
-
-  private Integer epsg;
-
-  public SetEpsgParameter(DataProcessorInvocation graph, Integer epsg) {
-    super(graph);
-    this.epsg = epsg;
-  }
-
-  public Integer getEpsg() {
-    return epsg;
-  }
-}


[streampipes] 10/16: latlng delete old classes

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

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

commit be9b5993741333058b86f351dafa1e4a6cf72302
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 21:31:52 2022 +0100

    latlng delete old classes
---
 .../jvm/jts/processor/latLngToGeo/LatLngToGeo.java | 72 ------------------
 .../latLngToGeo/LatLngToGeoController.java         | 87 ----------------------
 .../latLngToGeo/LatLngToGeoParameter.java          | 49 ------------
 3 files changed, 208 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java
deleted file mode 100755
index 652b41285..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.latLngToGeo;
-
-import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
-import org.locationtech.jts.geom.Point;
-import org.apache.streampipes.logging.api.Logger;
-import org.apache.streampipes.wrapper.context.EventProcessorRuntimeContext;
-import org.apache.streampipes.wrapper.routing.SpOutputCollector;
-import org.apache.streampipes.wrapper.runtime.EventProcessor;
-import org.apache.streampipes.model.runtime.Event;
-
-
-public class LatLngToGeo implements EventProcessor<LatLngToGeoParameter> {
-
-  private static Logger LOG;
-  private String latitude;
-  private String longitude;
-  private String epsg_code;
-
-
-  @Override
-  public void onInvocation(LatLngToGeoParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
-
-    LOG = params.getGraph().getLogger(LatLngToGeoParameter.class);
-    this.latitude = params.getLat();
-    this.longitude = params.getLng();
-    this.epsg_code = params.getEpsg();
-
-  }
-
-  @Override
-  public void onEvent(Event in, SpOutputCollector out) {
-
-    Double lat = in.getFieldBySelector(latitude).getAsPrimitive().getAsDouble();
-    Double lng = in.getFieldBySelector(longitude).getAsPrimitive().getAsDouble();
-    Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
-
-    Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
-
-    if (!geom.isEmpty()) {
-      in.addField(LatLngToGeoController.WKT_RUNTIME, geom.toString());
-      out.collect(in);
-    } else {
-      LOG.warn("An empty point geometry in " + LatLngToGeoController.EPA_NAME + " is created due" +
-          "invalid input field. Latitude: " + lat + "Longitude: " + lng);
-      LOG.error("Event is filtered out due invalid geometry");
-
-    }
-  }
-
-  @Override
-  public void onDetach() {
-
-  }
-}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
deleted file mode 100755
index 28cdfe1dc..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoController.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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.latLngToGeo;
-
-import org.apache.streampipes.model.DataProcessorType;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.model.schema.PropertyScope;
-import org.apache.streampipes.sdk.builder.PrimitivePropertyBuilder;
-import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
-import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
-import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor;
-import org.apache.streampipes.sdk.helpers.*;
-import org.apache.streampipes.sdk.utils.Assets;
-import org.apache.streampipes.sdk.utils.Datatypes;
-import org.apache.streampipes.vocabulary.Geo;
-import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
-import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
-
-public class LatLngToGeoController extends StandaloneEventProcessingDeclarer<LatLngToGeoParameter> {
-
-
-  public final static String LAT_KEY = "latitude-key";
-  public final static String LNG_KEY = "longitude-key";
-  public final static String EPSG_KEY = "epsg-key";
-
-  public final static String WKT_RUNTIME = "geomWKT";
-  public final static String EPA_NAME = "Create Point from Latitude and Longitude";
-
-  @Override
-  public DataProcessorDescription declareModel() {
-    return ProcessingElementBuilder
-        .create("org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo")
-        .category(DataProcessorType.GEO)
-        .withAssets(Assets.DOCUMENTATION, Assets.ICON)
-        .withLocales(Locales.EN)
-        .requiredStream(
-            StreamRequirementsBuilder
-                .create()
-                .requiredPropertyWithUnaryMapping(EpRequirements.domainPropertyReq(Geo.lat),
-                    Labels.withId(LAT_KEY), PropertyScope.MEASUREMENT_PROPERTY)
-                .requiredPropertyWithUnaryMapping(
-                    EpRequirements.domainPropertyReq(Geo.lng),
-                    Labels.withId(LNG_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(
-                PrimitivePropertyBuilder
-                    .create(Datatypes.String, WKT_RUNTIME)
-                    .domainProperty("http://www.opengis.net/ont/geosparql#Geometry")
-                    .build())
-        )
-        .build();
-  }
-
-  @Override
-  public ConfiguredEventProcessor<LatLngToGeoParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
-
-    String lat = extractor.mappingPropertyValue(LAT_KEY);
-    String lng = extractor.mappingPropertyValue(LNG_KEY);
-    String epsg = extractor.mappingPropertyValue(EPSG_KEY);
-
-    LatLngToGeoParameter params = new LatLngToGeoParameter(graph, epsg, lat, lng);
-
-    return new ConfiguredEventProcessor<>(params, LatLngToGeo::new);
-  }
-}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
deleted file mode 100755
index b8a2a06a2..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latLngToGeo/LatLngToGeoParameter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.latLngToGeo;
-
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams;
-
-public class LatLngToGeoParameter extends EventProcessorBindingParams {
-
-  private String epsg;
-  private String lat;
-  private String lng;
-
-  public LatLngToGeoParameter(DataProcessorInvocation graph, String epsg, String lat, String lng) {
-    super(graph);
-    this.epsg = epsg;
-    this.lat = lat;
-    this.lng = lng;
-  }
-
-
-  public String getEpsg() {
-    return epsg;
-  }
-
-  public String getLat() {
-    return lat;
-  }
-
-  public String getLng() {
-    return lng;
-  }
-}


[streampipes] 12/16: change descriptions on string.en

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

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

commit 768b5a082121f10fe27b7ea403734a06f69a74d8
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 23:39:10 2022 +0100

    change descriptions on string.en
---
 .../strings.en                                                      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
index 93fd927a8..ec85e696d 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory/strings.en
@@ -20,16 +20,16 @@ org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.title=Single
 org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.description=Creates a trajectory from JTS point events
 
 point-key.title=JTS Point Event
-point-key.description=Single Point Event which will be added to the trajectory
+point-key.description=Single Point Event added to the trajectory
 
 point-key.title=JTS Point Event
-point-key.description=Single Point Event which will be added to the trajectory
+point-key.description=Single Point Event added to the trajectory
 
 epsg-key.title=CRS of Input Point
 epsg-key.description=EPSG-Code of input point
 
 m-key.title=measurement value
-m-key.description=Measurement value which will be stored with each point event
+m-key.description=Measurement value which is stored together with each point event and can be used for internal calculations
 
 description-key.title=description text of trajectory
 description-key.description=A description text for the trajectory


[streampipes] 07/16: adjust resources text

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

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

commit 7ff20a76512e648b14e513194fbdbae2986963d0
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 20:43:52 2022 +0100

    adjust resources text
---
 .../documentation.md                                        |  2 +-
 .../strings.en                                              | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/documentation.md
index f80cd9b5f..3c5e76ca1 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/documentation.md
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/documentation.md
@@ -26,7 +26,7 @@
 
 ## Description
 
-This processor creates a  JTS Point geometry from  latitude and longitude value.
+This processor creates a JTS Point geometry from  latitude and longitude value.
 
 ***
 
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en
index d150cbdf1..20abbec01 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/strings.en
@@ -16,9 +16,12 @@
 #
 
 
-org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.title=Creates JTS Point
-org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.description=Creates a JTS Point from Latitude and Longitude values
+org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.title=Creates JTS Point
+org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.description=Creates a JTS Point from Latitude and Longitude values
 
-latitude-key=Latitude value
-longitude-key=Longitude value
-epsg-key= EPSG Code
+latitude-key.title=Latitude value
+latitude-key.description=Latitude value
+longitude-key.title=Longitude value
+longitude-key.description=Longitude value
+epsg-key.title=EPSG Code field
+epsg-key.description=EPSG Code


[streampipes] 08/16: fix text in epsg processor resource

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

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

commit 63b3199d61343a0437271d00100ff03bdef49d74
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 20:47:27 2022 +0100

    fix text in epsg processor resource
---
 .../strings.en                                                       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/strings.en
index 5d41c8db9..cd7520755 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/strings.en
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/strings.en
@@ -15,9 +15,8 @@
 # limitations under the License.
 #
 
-
-org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG.title=EPSG Code
-org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG.description=Adds a corresponding EPSG Code to the Geo-Event
+org.apache.streampipes.processors.geo.jvm.jts.processor.epsg.title=EPSG Code
+org.apache.streampipes.processors.geo.jvm.jts.processor.epsg.description=Adds a corresponding EPSG Code to the Geo-Event
 
 epsg-key.title=EPSG Code field
 epsg-key.description=EPSG Code


[streampipes] 03/16: move resources

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

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

commit 5a547e860a39d5e70a8f857574769974f5b9b278
Author: micklich <mi...@apache.org>
AuthorDate: Sat Nov 19 23:39:05 2022 +0100

    move resources
---
 .../documentation.md                                        |   0
 .../icon.png                                                | Bin
 .../strings.en                                              |   0
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/documentation.md
similarity index 100%
rename from streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/documentation.md
rename to streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/documentation.md
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/icon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/icon.png
similarity index 100%
rename from streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/icon.png
rename to streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/icon.png
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/strings.en b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/strings.en
similarity index 100%
rename from streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG/strings.en
rename to streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/strings.en


[streampipes] 16/16: Merge remote-tracking branch 'origin/STREAMPIPES-642' into STREAMPIPES-642

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

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

commit 09f7bda23145ef3053928c0a24c1f00ecfd72681
Merge: 3df9394b0 773495cca
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 23:52:22 2022 +0100

    Merge remote-tracking branch 'origin/STREAMPIPES-642' into STREAMPIPES-642

 .../v4/query/writer/item/TestJsonItemWriter.java   | 39 ----------------------
 1 file changed, 39 deletions(-)


[streampipes] 01/16: rewrite to 1-class processor model

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

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

commit 260e1e49bf818d62b7141830686a56c24a4b2452
Author: micklich <mi...@apache.org>
AuthorDate: Sat Nov 19 23:35:11 2022 +0100

    rewrite to 1-class processor model
---
 .../streampipes/processors/geo/jvm/GeoJvmInit.java |  4 +-
 .../geo/jvm/jts/processor/epsg/EpsgProcessor.java  | 80 ++++++++++++++++++++++
 2 files changed, 82 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 949887050..52897a751 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,8 +29,8 @@ 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.epsg.EpsgProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.latLngToGeo.LatLngToGeoController;
-import org.apache.streampipes.processors.geo.jvm.jts.processor.setEPSG.SetEpsgController;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.CreateTrajectoryFromPointsController;
 import org.apache.streampipes.processors.geo.jvm.processor.distancecalculator.DistanceCalculatorController;
 import org.apache.streampipes.processors.geo.jvm.processor.geocoder.GoogleMapsGeocodingController;
@@ -52,7 +52,7 @@ public class GeoJvmInit extends StandaloneModelSubmitter {
                     new GoogleMapsGeocodingController(),
                     new StaticGoogleMapsGeocodingController(),
                     new ReverseGeocodingController(),
-                    new SetEpsgController(),
+                    new EpsgProcessor(),
                     new LatLngToGeoController(),
                     new CreateTrajectoryFromPointsController(),
                     new SpeedCalculatorController(),
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/epsg/EpsgProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/epsg/EpsgProcessor.java
new file mode 100644
index 000000000..44057d9d2
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/epsg/EpsgProcessor.java
@@ -0,0 +1,80 @@
+/*
+ *
+ *  * 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.epsg;
+
+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.sdk.builder.PrimitivePropertyBuilder;
+import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
+import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
+import org.apache.streampipes.sdk.helpers.Labels;
+import org.apache.streampipes.sdk.helpers.Locales;
+import org.apache.streampipes.sdk.helpers.OutputStrategies;
+import org.apache.streampipes.sdk.utils.Assets;
+import org.apache.streampipes.sdk.utils.Datatypes;
+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;
+
+public class EpsgProcessor extends StreamPipesDataProcessor {
+    private static final String EPSG_KEY  = "epsg-key";
+    public static final String EPSG_RUNTIME = "epsg";
+
+    private int epsgCode;
+
+    @Override
+    public DataProcessorDescription declareModel() {
+        return ProcessingElementBuilder.create("org.apache.streampipes.processors.geo.jvm.jts.processor.epsg")
+                .category(DataProcessorType.GEO)
+                .withAssets(Assets.DOCUMENTATION, Assets.ICON)
+                .withLocales(Locales.EN)
+                .requiredStream(StreamRequirementsBuilder
+                        .create()
+                        .build())
+                .outputStrategy(OutputStrategies.append(PrimitivePropertyBuilder
+                                .create(Datatypes.Integer, EPSG_RUNTIME)
+                                .domainProperty("http://data.ign.fr/def/ignf#CartesianCS")
+                                .build())
+                )
+                .requiredIntegerParameter(Labels.withId(EPSG_KEY), 4326)
+                .build();
+    }
+
+    @Override
+    public void onInvocation(ProcessorParams parameters, SpOutputCollector spOutputCollector,
+                             EventProcessorRuntimeContext runtimeContext) throws SpRuntimeException {
+        this.epsgCode = parameters.extractor().singleValueParameter(EPSG_KEY, Integer.class);
+    }
+
+    @Override
+    public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeException {
+        event.addField(EpsgProcessor.EPSG_RUNTIME, this.epsgCode);
+        collector.collect(event);
+    }
+
+    @Override
+    public void onDetach() throws SpRuntimeException {
+
+    }
+}


[streampipes] 13/16: styleguide and change input value for method addPoint

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

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

commit d22ab8680e8c09f019d7f8529aee43b080cb6586
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 23:40:25 2022 +0100

    styleguide and change input value for method addPoint
---
 .../geo/jvm/jts/helper/SpTrajectoryBuilder.java    | 44 +++++++++++++---------
 1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
index 7f6b48b3e..dff143021 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpTrajectoryBuilder.java
@@ -18,18 +18,23 @@
 
 package org.apache.streampipes.processors.geo.jvm.jts.helper;
 
-import org.locationtech.jts.geom.*;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.CoordinateList;
+import org.locationtech.jts.geom.CoordinateXYM;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LineString;
+import org.locationtech.jts.geom.Point;
 
 public class SpTrajectoryBuilder {
-
     private int numberSubPoints;
     private String description;
     private CoordinateList coordinateList;
 
     /**
      * Constructor of SpTrajectory
+     *
      * @param numberSubPoints Integer number of allowed sub-points of the trajectory
-     * @param description Text Description of the single Trajectory
+     * @param description     Text Description of the single Trajectory
      */
     public SpTrajectoryBuilder(int numberSubPoints, String description) {
         this.numberSubPoints = numberSubPoints;
@@ -38,20 +43,23 @@ public class SpTrajectoryBuilder {
     }
 
 
-    /**
+     /**
      * getter method for description text
+     *
      * @return description text
      */
     public String getDescription() {
         return description;
     }
 
+
     /**
      * Adds a Point to the trajectory object and also handle removes old point if {link #numberSubPoints} threshold is exceeded.
+     *
      * @param point {@link org.locationtech.jts.geom.Point}
-     * @param m stores an extra integer to the sub-point of a trajectory {@link org.locationtech.jts.geom.CoordinateXYM#M}
+     * @param m     stores an extra integer to the sub-point of a trajectory {@link org.locationtech.jts.geom.CoordinateXYM#M}
      */
-    public void addPointToTrajectory(Point point, Integer m) {
+    public void addPointToTrajectory(Point point, Double m) {
         coordinateList.add(createSingleTrajectoryCoordinate(point, m));
         if (coordinateList.size() > numberSubPoints) {
             removeOldestPoint();
@@ -61,45 +69,45 @@ public class SpTrajectoryBuilder {
 
     /**
      * returns a JTS LineString geometry from the trajectory object. LineString only stores the point geometry without M value.
-     *  The lineString is oriented to the trajectory direction. This means: the newest point is always the last point and has the
-     *  highest subpoint index. The First point is the oldest point with the lowest index [0]
+     * The lineString is oriented to the trajectory direction. This means: the newest point is always the last point and has the
+     * highest subpoint index. The First point is the oldest point with the lowest index [0]
+     *
      * @param factory a Geometry factory for creating the lineString with the same precision and CRS and should be
      *                the factory of the input point geometry
      * @return JTS LineString JTS LineString
      */
-    public LineString returnAsLineString(GeometryFactory factory){
+    public LineString returnAsLineString(GeometryFactory factory) {
         LineString geom;
-        if ( coordinateList.size() > 1) {
+        if (coordinateList.size() > 1) {
             //only linestring if more than 2 points.
             // reverse output of linestring. so last added point is first
             geom = factory.createLineString(coordinateList.toCoordinateArray());
         } else {
             geom = factory.createLineString();
         }
-
         return geom;
     }
 
+
     /**
      * removes the oldest point (Index 0) from the CoordinateList object.
      */
-    private void removeOldestPoint(){
+    private void removeOldestPoint() {
         coordinateList.remove(0);
     }
 
     /**
-     * Creates an Coordinate object with X, Y and M Value to be stored later directly in the trajectory object. Should be used
+     * Creates a Coordinate object with X, Y and M Value to be stored later directly in the trajectory object. Should be used
      * always used if adding a subpoint to the trajectory list
+     *
      * @param geom Point geometry, which coordinates will be added to the trajectory list
-     * @param m Integer M value, which will be used to store as extra parameter  in the trajectory list
+     * @param m    Integer M value, which will be used to store as extra parameter  in the trajectory list
      * @return CoordinateXYM coordinate object
      */
-    private CoordinateXYM createSingleTrajectoryCoordinate(Point geom, Integer m){
-        CoordinateXYM coordinate =new CoordinateXYM((geom.getX()), geom.getY(), m);
+    private Coordinate createSingleTrajectoryCoordinate(Point geom, Double m) {
+        CoordinateXYM coordinate = new CoordinateXYM((geom.getX()), geom.getY(), m);
         return coordinate;
     }
-
-
 }
 
 


[streampipes] 14/16: replace proesor call 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 STREAMPIPES-642
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit f4dc7ea695f1dcea50fc271f30393dc8ae402487
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 23:41:12 2022 +0100

    replace proesor call in init
---
 .../java/org/apache/streampipes/processors/geo/jvm/GeoJvmInit.java    | 4 ++--
 1 file changed, 2 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 75d335169..815ada965 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
@@ -31,7 +31,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.epsg.EpsgProcessor;
 import org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint.LatLngToJtsPointProcessor;
-import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.CreateTrajectoryFromPointsController;
+import org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory.TrajectoryFromPointsProcessor;
 import org.apache.streampipes.processors.geo.jvm.processor.distancecalculator.DistanceCalculatorController;
 import org.apache.streampipes.processors.geo.jvm.processor.geocoder.GoogleMapsGeocodingController;
 import org.apache.streampipes.processors.geo.jvm.processor.revgeocoder.ReverseGeocodingController;
@@ -54,7 +54,7 @@ public class GeoJvmInit extends StandaloneModelSubmitter {
                     new ReverseGeocodingController(),
                     new EpsgProcessor(),
                     new LatLngToJtsPointProcessor(),
-                    new CreateTrajectoryFromPointsController(),
+                    new TrajectoryFromPointsProcessor(),
                     new SpeedCalculatorController(),
                     new StaticDistanceCalculatorController())
             .registerMessagingFormats(


[streampipes] 04/16: misc changes on resources

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

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

commit 83870dbdd21e00fe358070f90d646bddebde1a12
Author: micklich <mi...@apache.org>
AuthorDate: Sat Nov 19 23:41:00 2022 +0100

    misc changes on resources
---
 .../documentation.md                                    | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/documentation.md b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/documentation.md
index 1f19b7b10..a4e420892 100644
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/documentation.md
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.epsg/documentation.md
@@ -27,13 +27,14 @@
 
 ## Description
 
-This processor adds ab integer value to the stream. This integer value represents
-an [EPSG Code](https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset) as an Spatial Reference System Identifier [(SRID)](https://en.wikipedia.org/wiki/Spatial_reference_system#Identifier).
+This processor adds an integer value to the event. This integer value represents
+an  <a href="https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset" target="_blank">EPSG Code</a> as an Spatial Reference System Identifier
+an  <a href="https://en.wikipedia.org/wiki/Spatial_reference_system#Identifier" target="_blank">(SRID)</a>.
 
 
 ***
 
-## Required input
+## Required inputs
 
 None
 
@@ -41,13 +42,17 @@ None
 
 ## Configuration
 
-Integer values, representing a spatial reference system [(SRS)](https://en.wikipedia.org/wiki/Spatial_reference_system#Identifier).  Other possible values can be looked up under https://spatialreference.org/ref/epsg/.
+Integer values, representing a spatial reference system
+<a href="https://en.wikipedia.org/wiki/Spatial_reference_system#Identifier" target="_blank">SRID</a>.
+Other possible values can be looked up via
+<a href="https://spatialreference.org/ref/epsg/" target="_blank">spatialreference.org</a>.
 
 ### Parameter
 
-4- to 5-digit key integer number. Default value is 4326 representing the World Geodetic System [(WGS84)](https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84).
+4- to 5-digit key integer number. Default value is 4326 representing the World Geodetic System
+<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84" target="_blank">(WGS84)</a>.
 
 ***
 ## Output
 
-Adds a number to the event.
+Adds the epsg number to the event.


[streampipes] 15/16: trajectory delete old classes

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

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

commit 3df9394b071e07b0143120c8e3fb9b359046851c
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 23:41:34 2022 +0100

    trajectory delete old classes
---
 .../trajectory/CreateTrajectoryFromPoints.java     |  80 ---------------
 .../CreateTrajectoryFromPointsController.java      | 113 ---------------------
 .../CreateTrajectoryFromPointsParameter.java       |  60 -----------
 3 files changed, 253 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
deleted file mode 100755
index 12fe8aa09..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPoints.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.trajectory;
-
-import org.apache.streampipes.logging.api.Logger;
-import org.apache.streampipes.model.runtime.Event;
-import org.apache.streampipes.processors.geo.jvm.jts.helper.SpGeometryBuilder;
-import org.apache.streampipes.processors.geo.jvm.jts.helper.SpTrajectoryBuilder;
-import org.apache.streampipes.wrapper.context.EventProcessorRuntimeContext;
-import org.apache.streampipes.wrapper.routing.SpOutputCollector;
-import org.apache.streampipes.wrapper.runtime.EventProcessor;
-import org.locationtech.jts.geom.LineString;
-import org.locationtech.jts.geom.Point;
-
-
-public class CreateTrajectoryFromPoints implements EventProcessor<CreateTrajectoryFromPointsParameter> {
-
-  private static Logger LOG;
-
-  private SpTrajectoryBuilder trajectory;
-
-  private String geom_wkt;
-  private String epsg_code;
-  private String m_value;
-
-  @Override
-  public void onInvocation(CreateTrajectoryFromPointsParameter params, SpOutputCollector spOutputCollector, EventProcessorRuntimeContext runtimeContext) {
-
-    LOG = params.getGraph().getLogger(CreateTrajectoryFromPointsParameter.class);
-    this.geom_wkt = params.getWkt();
-    this.epsg_code = params.getEpsg();
-    this.m_value = params.getM();
-
-    trajectory = new SpTrajectoryBuilder(params.getSubpoints(), params.getDescription());
-  }
-
-  @Override
-  public void onEvent(Event in, SpOutputCollector out) {
-
-    // extract values
-    String wkt = in.getFieldBySelector(geom_wkt).getAsPrimitive().getAsString();
-    Integer epsg = in.getFieldBySelector(epsg_code).getAsPrimitive().getAsInt();
-    Integer m = in.getFieldBySelector(m_value).getAsPrimitive().getAsInt();
-
-    //create JTS geometry
-    Point eventGeom = (Point) SpGeometryBuilder.createSPGeom(wkt, epsg);
-
-    //adds point and m value to trajectory object
-    trajectory.addPointToTrajectory(eventGeom, m);
-    // returns JTS LineString
-    LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
-
-    // adds to stream
-    in.addField(CreateTrajectoryFromPointsController.DESCRIPTION_RUNTIME, trajectory.getDescription());
-    in.addField(CreateTrajectoryFromPointsController.WKT_RUNTIME, geom.toString());
-    out.collect(in);
-  }
-
-  @Override
-  public void onDetach() {
-
-  }
-}
-
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
deleted file mode 100755
index 61e559e36..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsController.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.trajectory;
-
-import org.apache.streampipes.model.DataProcessorType;
-import org.apache.streampipes.model.graph.DataProcessorDescription;
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.model.schema.PropertyScope;
-import org.apache.streampipes.sdk.builder.ProcessingElementBuilder;
-import org.apache.streampipes.sdk.builder.StreamRequirementsBuilder;
-import org.apache.streampipes.sdk.extractor.ProcessingElementParameterExtractor;
-import org.apache.streampipes.sdk.helpers.*;
-import org.apache.streampipes.sdk.utils.Assets;
-import org.apache.streampipes.vocabulary.SO;
-import org.apache.streampipes.wrapper.standalone.ConfiguredEventProcessor;
-import org.apache.streampipes.wrapper.standalone.declarer.StandaloneEventProcessingDeclarer;
-
-public class CreateTrajectoryFromPointsController extends StandaloneEventProcessingDeclarer<CreateTrajectoryFromPointsParameter> {
-
-
-  public final static String POINT_KEY = "point-key";
-  public final static String EPSG_KEY = "epsg-key";
-  public final static String M_KEY = "m-key";
-  public final static String DESCRIPTION_KEY = "description-key";
-  public final static String SUBPOINTS_KEY = "subpoints-key";
-
-  public final static String WKT_KEY = "trajectory-key";
-  public final static String WKT_RUNTIME = "trajectoryWKT";
-
-  public final static String DESCRIPTION_RUNTIME = "trajectoryDescription";
-
-
-  @Override
-  public DataProcessorDescription declareModel() {
-    return ProcessingElementBuilder
-        .create("org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory")
-        .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(POINT_KEY), PropertyScope.MEASUREMENT_PROPERTY
-                )
-                .requiredPropertyWithUnaryMapping(
-                    EpRequirements.domainPropertyReq("http://data.ign.fr/def/ignf#CartesianCS"),
-                    Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY
-                )
-                .requiredPropertyWithUnaryMapping(
-                    EpRequirements.numberReq(),
-                    Labels.withId(M_KEY), PropertyScope.MEASUREMENT_PROPERTY
-                )
-                .build()
-        )
-        .requiredTextParameter(
-            Labels.withId(DESCRIPTION_KEY)
-        )
-        .requiredIntegerParameter(
-            Labels.withId(SUBPOINTS_KEY),
-            2, 30, 1
-        )
-
-        .outputStrategy(OutputStrategies.append(
-            EpProperties.stringEp(
-                Labels.withId(DESCRIPTION_KEY),
-                DESCRIPTION_RUNTIME,
-                SO.Text
-            ),
-            EpProperties.stringEp(
-                Labels.withId(WKT_KEY),
-                WKT_RUNTIME,
-                "http://www.opengis.net/ont/geosparql#Geometry")
-            )
-        )
-        .build();
-  }
-
-
-  @Override
-  public ConfiguredEventProcessor<CreateTrajectoryFromPointsParameter> onInvocation(DataProcessorInvocation graph, ProcessingElementParameterExtractor extractor) {
-
-
-    String wkt = extractor.mappingPropertyValue(POINT_KEY);
-    String epsg = extractor.mappingPropertyValue(EPSG_KEY);
-    String m = extractor.mappingPropertyValue(M_KEY);
-
-    String description = extractor.singleValueParameter(DESCRIPTION_KEY, String.class);
-    Integer subpoints = extractor.singleValueParameter(SUBPOINTS_KEY, Integer.class);
-
-
-    CreateTrajectoryFromPointsParameter params = new CreateTrajectoryFromPointsParameter(graph, wkt, epsg, description, subpoints, m);
-
-    return new ConfiguredEventProcessor<>(params, CreateTrajectoryFromPoints::new);
-  }
-}
diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
deleted file mode 100755
index 872fb00e9..000000000
--- a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/CreateTrajectoryFromPointsParameter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.trajectory;
-
-import org.apache.streampipes.model.graph.DataProcessorInvocation;
-import org.apache.streampipes.wrapper.params.binding.EventProcessorBindingParams;
-
-public class CreateTrajectoryFromPointsParameter extends EventProcessorBindingParams {
-
-  private String epsg;
-  private String wkt;
-  private String description;
-  private Integer subpoints;
-  private String m;
-
-  public CreateTrajectoryFromPointsParameter(DataProcessorInvocation graph, String wkt, String epsg, String description, Integer subpoints, String m) {
-    super(graph);
-    this.wkt = wkt;
-    this.epsg = epsg;
-    this.description = description;
-    this.subpoints = subpoints;
-    this.m = m;
-  }
-
-  public String getEpsg() {
-    return epsg;
-  }
-
-  public String getWkt() {
-    return wkt;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public Integer getSubpoints() {
-    return subpoints;
-  }
-
-  public String getM() {
-    return m;
-  }
-}


[streampipes] 09/16: change icon logo

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

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

commit eb60bb9b56fd51cf7a35d265b35997d2447f393c
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 21:30:25 2022 +0100

    change icon logo
---
 .../icon.png                                        | Bin 20621 -> 16698 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png
index d37330b5b..848778583 100644
Binary files a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png and b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/resources/org.apache.streampipes.processors.geo.jvm.jts.processor.latlngtojtspoint/icon.png differ


[streampipes] 11/16: rewrite trajectory to 1 class

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

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

commit d4f785d1d409d877c5e77f3ef6dd46d597a766f1
Author: micklich <mi...@apache.org>
AuthorDate: Wed Nov 23 23:38:00 2022 +0100

    rewrite trajectory to 1 class
    
    
    dd
---
 .../trajectory/TrajectoryFromPointsProcessor.java  | 140 +++++++++++++++++++++
 1 file changed, 140 insertions(+)

diff --git a/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java
new file mode 100644
index 000000000..4c9eee5f1
--- /dev/null
+++ b/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java
@@ -0,0 +1,140 @@
+/*
+ * 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.trajectory;
+
+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.SpTrajectoryBuilder;
+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.OutputStrategies;
+import org.apache.streampipes.sdk.utils.Assets;
+import org.apache.streampipes.vocabulary.SO;
+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.LineString;
+import org.locationtech.jts.geom.Point;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TrajectoryFromPointsProcessor extends StreamPipesDataProcessor {
+    public static final  String POINT_KEY = "point-key";
+    public static final  String EPSG_KEY = "epsg-key";
+    public static final String M_KEY = "m-key";
+    public static final  String SUBPOINTS_KEY = "subpoints-key";
+    public static final  String DESCRIPTION_KEY = "description-key";
+    public static final  String TRAJECTORY_KEY = "trajectory-key";
+    public static final  String TRAJECTORY_RUNTIME = "trajectoryWKT";
+    public static final  String DESCRIPTION_RUNTIME = "trajectoryDescription";
+    private String pointMapper;
+    private String epsgMapper;
+    private String mValueMapper;
+    private String description;
+    private Integer subpoints;
+    private SpTrajectoryBuilder trajectory;
+    private static final Logger LOG = LoggerFactory.getLogger(TrajectoryFromPointsProcessor.class);
+    @Override
+    public DataProcessorDescription declareModel() {
+        return ProcessingElementBuilder
+                .create("org.apache.streampipes.processors.geo.jvm.jts.processor.trajectory")
+                .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(POINT_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                                .requiredPropertyWithUnaryMapping(
+                                        EpRequirements.domainPropertyReq
+                                                ("http://data.ign.fr/def/ignf#CartesianCS"),
+                                        Labels.withId(EPSG_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                                .requiredPropertyWithUnaryMapping(
+                                        EpRequirements.numberReq(),
+                                        Labels.withId(M_KEY), PropertyScope.MEASUREMENT_PROPERTY)
+                                .build()
+                )
+                .requiredTextParameter(
+                        Labels.withId(DESCRIPTION_KEY))
+                .requiredIntegerParameter(
+                        Labels.withId(SUBPOINTS_KEY),
+                        2, 30, 1)
+
+                .outputStrategy(OutputStrategies.append(
+                        EpProperties.stringEp(
+                                Labels.withId(DESCRIPTION_KEY),
+                                DESCRIPTION_RUNTIME,
+                                SO.Text),
+                        EpProperties.stringEp(
+                                Labels.withId(TRAJECTORY_KEY),
+                                TRAJECTORY_RUNTIME,
+                                "http://www.opengis.net/ont/geosparql#Geometry")
+                        )
+                )
+                .build();
+    }
+
+    @Override
+    public void onInvocation(ProcessorParams parameters, SpOutputCollector spOutputCollector,
+                             EventProcessorRuntimeContext runtimeContext) throws SpRuntimeException {
+        this.pointMapper = parameters.extractor().mappingPropertyValue(POINT_KEY);
+        this.mValueMapper = parameters.extractor().mappingPropertyValue(M_KEY);
+        this.epsgMapper = parameters.extractor().mappingPropertyValue(EPSG_KEY);
+        this.description = parameters.extractor().singleValueParameter(DESCRIPTION_KEY, String.class);
+        this.subpoints = parameters.extractor().singleValueParameter(SUBPOINTS_KEY, Integer.class);
+
+        trajectory = new SpTrajectoryBuilder(subpoints, description);
+    }
+
+    @Override
+    public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeException {
+        // extract values
+        String point = event.getFieldBySelector(pointMapper).getAsPrimitive().getAsString();
+        Integer epsg = event.getFieldBySelector(epsgMapper).getAsPrimitive().getAsInt();
+        Double m = event.getFieldBySelector(mValueMapper).getAsPrimitive().getAsDouble();
+        //create JTS geometry
+        Point eventGeom = (Point) SpGeometryBuilder.createSPGeom(point, epsg);
+        LOG.debug("Geometry Point created");
+        //adds point and m value to trajectory object
+        trajectory.addPointToTrajectory(eventGeom, m);
+        LOG.debug("Point added to trajectory");
+        // returns JTS LineString
+        LineString geom = trajectory.returnAsLineString(eventGeom.getFactory());
+        // adds to stream
+        event.addField(DESCRIPTION_RUNTIME, trajectory.getDescription());
+        event.addField(TRAJECTORY_RUNTIME, geom.toString());
+        collector.collect(event);
+    }
+
+    @Override
+    public void onDetach() throws SpRuntimeException {
+
+    }
+}