Geomesa accumulo存储几何的零点

时间:2017-05-15 08:33:24

标签: geotools jts geomesa

我在geomesa中使用Point几何类型来获取要素类型中的强拉特细节。在存储新功能的用例中,我没有lat-long的值,所以我尝试为null函数发送createPoint对象,但是库'jts'在处理null时抛出异常几何类型。 Here是源代码。通过查看jts库的实现,在geomesa Point中存储null似乎很困难。我有什么可能的选择? 这是我的代码的快照:

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

附加异常日志:

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)

1 个答案:

答案 0 :(得分:0)

GeoMesa是一个空间/时空数据库系统。因此,存储没有几何的数据不是主要用例。 GeoMesa中的许多指数都假定有效的经度 - 纬度点。