2

I use Geoserver to post regular temperature points layer from an Accumulo/Geomesa dataset. I have to publish interpolated "temperature map" that's why I use SLD Transformation with an vec:BarnesSurface function. This SLD works good for PostGIS datasource but for Accumulo/Geomesa shows white map and writes following to the Geoserver's log:

2017-09-27 10:28:48,862 DEBUG [org.geotools.process.factory] - Failed to locate the field 0.3 in class class org.geotools.process.vector.BarnesSurfaceProcess
2017-09-27 10:28:48,862 DEBUG [org.geotools.process.factory] - Failed to locate the field 0.3 in class class java.lang.Double
2017-09-27 10:28:48,862 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2017-09-27 10:28:48,862 DEBUG [org.geotools.process.factory] - Failed to locate the field 2 in class class org.geotools.process.vector.BarnesSurfaceProcess
2017-09-27 10:28:48,862 DEBUG [org.geotools.process.factory] - Failed to locate the field 2 in class class java.lang.Integer
2017-09-27 10:28:48,863 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2017-09-27 10:28:48,863 DEBUG [org.geotools.process.factory] - Failed to locate the field 0 in class class org.geotools.process.vector.BarnesSurfaceProcess
2017-09-27 10:28:48,863 DEBUG [org.geotools.process.factory] - Failed to locate the field 0 in class class java.lang.Double
2017-09-27 10:28:48,863 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2017-09-27 10:28:48,863 DEBUG [org.geotools.process.factory] - Failed to locate the field -999 in class class org.geotools.process.vector.BarnesSurfaceProcess
2017-09-27 10:28:48,863 DEBUG [org.geotools.process.factory] - Failed to locate the field -999 in class class java.lang.Double
2017-09-27 10:28:48,863 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2017-09-27 10:28:48,863 DEBUG [org.geotools.process.factory] - Failed to locate the field 1 in class class org.geotools.process.vector.BarnesSurfaceProcess
2017-09-27 10:28:48,864 DEBUG [org.geotools.process.factory] - Failed to locate the field 1 in class class java.lang.Integer
2017-09-27 10:28:48,864 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS  only.
2017-09-27 10:28:48,864 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,865 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,866 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.
2017-09-27 10:28:48,866 TRACE [org.geotools.factory] - ENTRY  (FeatureTypeFactory, FEATURE_TYPE_FACTORY)
2017-09-27 10:28:48,866 TRACE [org.geotools.factory] - RETURN (FeatureTypeFactory, FEATURE_TYPE_FACTORY): found implementation FeatureTypeFactoryImpl.

I have checked valueAttr in my SLD. It has proper value. Any ideas?

-----EDIT-----

I think my problem is the way I load my data points into Geomesa/Accumulo. I use


List attributes = Lists.newArrayList(
  "GFS_TIME:Date",
  "PARAM_ID:Integer",
  "NAME:String",
  "TYPE:String",
  "TIMING:Integer",
  "RESOLUTION:Double",
  "VAL:Double",
  "*geom:Point:srid=4326"
);

String simpleFeatureTypeSchema = Joiner.on(",").join(attributes);
SimpleFeatureType simpleFeatureType = DataUtilities.createType(simpleFeatureTypeName, simpleFeatureTypeSchema);

simpleFeatureType.getUserData().put(SimpleFeatureTypes.DEFAULT_DATE_KEY, "GFS_TIME");

// ... prepare 2d array with my temperature data

// iterate 2d-array
// ...
      UUID uuid = UUID.randomUUID();
      id = uuid.toString();
      SimpleFeature simpleFeature = 
      SimpleFeatureBuilder.build(simpleFeatureType, NO_VALUES, id);

      simpleFeature.getUserData().put(Hints.USE_PROVIDED_FID, java.lang.Boolean.TRUE);

      simpleFeature.setAttribute("GFS_TIME", dt);
      simpleFeature.setAttribute("PARAM_ID", data.getParamId());
      simpleFeature.setAttribute("NAME", data.getParamName());
      simpleFeature.setAttribute("TYPE", data.getParamLevel());
      simpleFeature.setAttribute("TIMING", data.getParamTiming());
      simpleFeature.setAttribute("RESOLUTION", data.getParamResolution());
      simpleFeature.setAttribute("VAL", data.data[i][j]);

      double lat = 90 - j * data.getParamResolution();
      double lon = -180 + i * data.getParamResolution();

      GeometryFactory geometryFactory = new GeometryFactory();
      Geometry geometry = geometryFactory.createPoint(new com.vividsolutions.jts.geom.Coordinate(lon, lat));

      simpleFeature.setDefaultGeometry(geometry);

      // accumulate this new feature in the collection
      featureCollection.add(simpleFeature);

// ... then load feature collection to Accumulo dataset

When I ingest similar data using geomesa command line tools it works with the same SLD file! May by my fields or geom definitions are wrong?

  • Starting with the output, is the white or empty map returning zero value results? (One thing to check is if the results are scaled, say to between 0 and 1.) – GeoMesaJim Sep 27 '17 at 13:06
  • When I execute vec:BarnesSurface WPS on my data directly (Geoserver->Demo->WPS) it results with an unreadable "no-data" tiff. – Timur Kobilov Sep 28 '17 at 0:11
  • Posted some edits above – Timur Kobilov Sep 28 '17 at 0:44
  • Since it sounds like data ingested two different ways is acting differently, it might be worth checking for any differences in the schemas (the geomesa get-schema command may help) and seeing if there are differences in the data (comparing a sample export). One possibility is that one of the attributes names (e.g. NAME or TYPE) might conflict with some handling internal to GeoServer. – GeoMesaJim Sep 28 '17 at 15:39
3

GeoTools Rendering Transforms like creating a Density (Heatmap) and the BarnesSurface Process are handled in a rather special way when GeoServer uses them.

To see what is happening, I'd suggest firing up a debugger and stepping through the code. From a quick look at the GeoTools code, it looks like one might be able to take what we've previously done for the DensityProcess and create a similar approach (https://github.com/locationtech/geomesa/blob/master/geomesa-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/analytic/DensityProcess.scala).

| improve this answer | |
  • Thanks! Finally I found that my grid resolution was too high for my current hardware architecture. When I decreased the resolution the process stopped dying. Currently I use Geodocker (Accumulo/Geomesa)+Geoserver for the test purposes. – Timur Kobilov Oct 3 '17 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.