首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Geomesa accumulo存储几何的空点

Geomesa accumulo存储几何的空点
EN

Stack Overflow用户
提问于 2017-05-15 16:33:24
回答 1查看 152关注 0票数 0

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

代码语言:javascript
复制
sf.setAttribute(Attributes.GEOMETRY.getValue(), JTSFactoryFinder.getGeometryFactory().createPoint((Coordinate)null/*new Coordinate(event.lat, event.lng)*/));

为异常附加日志:

代码语言:javascript
复制
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)
EN

回答 1

Stack Overflow用户

发布于 2017-05-16 23:07:20

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43974754

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档