0

I am using Point geometry type in geomesa for strong lat-long details in feature type. In on of the use case while storing a new feature I don't have value for lat-long so I tried sending null object for createPoint function, but the library 'jts' throwing exception while processing null Geometry type. Here is the source code. By seeing the implementation of jtslibrary, It seems difficult for storing null in geomesa Point. What are the possibilities I can go for? Here is the snapshot of my code:

sf.setAttribute(Attributes.GEOMETRY.getValue(), JTSFactoryFinder.getGeometryFactory().createPoint((Coordinate)null/*new Coordinate(event.lat, event.lng)*/));

Attaching logs for exception:

java.lang.IllegalStateException: getX called on empty Point
    at com.vividsolutions.jts.geom.Point.getX(Point.java:124)
    at org.locationtech.geomesa.utils.uuid.Z3UuidGenerator$.createUuid(Z3FeatureIdGenerator.scala:93)
    at org.locationtech.geomesa.utils.uuid.Z3UuidGenerator$.createUuid(Z3FeatureIdGenerator.scala:70)
    at org.locationtech.geomesa.utils.uuid.Z3FeatureIdGenerator.createId(Z3FeatureIdGenerator.scala:32)
    at org.locationtech.geomesa.index.geotools.GeoMesaFeatureWriter$.featureWithFid(GeoMesaFeatureWriter.scala:64)
    at org.locationtech.geomesa.index.geotools.GeoMesaFeatureWriter.writeFeature(GeoMesaFeatureWriter.scala:128)
    at org.locationtech.geomesa.index.geotools.GeoMesaAppendFeatureWriter$class.write(GeoMesaFeatureWriter.scala:194)
    at org.locationtech.geomesa.accumulo.data.AccumuloAppendFeatureWriter.write(AccumuloFeatureWriter.scala:19)
    at com.hps.GeomesaClient.insert(GeomesaClient.java:129)
Suresh Prajapati
  • 3,991
  • 5
  • 26
  • 38
  • There are several places where Integrating with SimpleFeatures, GeoTools, and GeoServer assumes non-null geometries. – GeoJim May 16 '17 at 15:08

1 Answers1

0

GeoMesa is a spatial/spatio-temporal database system. As such, storing data without a geometry is not a primary use case. Many of the indices in GeoMesa assume valid longitude-latitude points.

GeoJim
  • 1,320
  • 7
  • 12