Closed SebaDro closed 4 years ago
Feature branch "feature/genericReferenceDataPreprocessor" provides a generic implementation of ReferenceDataPreprocessor. This implemantation simply copies the input schema to the output data.
Note: 1) Shape format has a limit of 10 characters for attribute names. Currently attributes which name is longer than 10 characters do not appear in the output data. Make sure that mandatory attributes use identifiers that have only 10 or fewer characters. 2) Currently ther is no validation of the input data (e.g check for mandatory attributes) 3) A few extra attributes appear in the output data because GeoTools internally adds attributes while parsing gml input (e.g. location, description ...)
Thanks for the fix. With 773094d I added a test with more complex feature data and tested the generic implementation. So, I will merge it into the master branch. A more complex solution for supporting a schema mapping will be developed in https://github.com/WaCoDiS/javaps-wacodis-backend/tree/feature/processingGraph soon.
I tried to execute the LandcoverClassification process with a slightly different WFS as input for the reference data. Even though the preprocessing of the reference data finishes with no failure, the ReferenceDataPreprocessor does not work properly. The resulting shape file contains all the features' attributes but no geometries. This might be due to a very static way of defining a schema for the resulting shape file: https://github.com/WaCoDiS/javaps-wacodis-backend/blob/b43a1ad5144f9b83a6626d5a6ab825a7cb9c07e9/src/main/java/org/n52/wacodis/javaps/preprocessing/ReferenceDataPreprocessor.java#L274-L289 Please, consider a more generic way of defining the final schema in order to support various WFS.