2017-05-15 8 views
0

フィーチャタイプの強いlat-longの詳細については、geomesaにPointジオメトリタイプを使用しています。新しい機能を格納しているユースケースではlat-longの値がありませんので、nullオブジェクトをcreatePoint関数に送信しようとしましたが、nullジオメトリタイプの処理中にライブラリ 'jts'例外がスローされました。 Hereがソースコードです。 jtsライブラリの実装を見ると、geomesa Pointにnullを格納するのは難しいようです。私が行く可能性は何ですか?例外のGeomesa accumulo containing Geometryのポイント

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) 
+0

SimpleFeatures、GeoTools、およびGeoServerとの統合で非ヌルジオメトリが想定される場所がいくつかあります。 – GeoMesaJim

答えて

0

GeoMesaは、時空間/空間データベースシステムです は、ここに私のコードのスナップショットです。したがって、ジオメトリなしでデータを格納することは、主な使用例ではありません。 GeoMesaのインデックスの多くは、有効な経度 - 緯度ポイントを想定しています。

関連する問題