【问题标题】:Geomesa accumulo storing null Point for geometryGeomesa accumulo 存储几何的空点
【发布时间】:2017-05-15 08:33:23
【问题描述】:

我在 geomesa 中使用 Point 几何类型来获取特征类型中强大的经纬度细节。在存储新功能的用例中,我没有 lat-long 的价值,所以我尝试为createPoint 函数发送null 对象,但库'jts' 在处理空几何类型时抛出异常。 Here 是源代码。通过查看jtslibrary 的实现,在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)

【问题讨论】:

  • 与 SimpleFeatures、GeoTools 和 GeoServer 集成有几个地方假定非空几何。

标签: geotools jts geomesa


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多