如何使用(GeoMesa 和 spark)或(GeoMesa 和 mongoDB 存储)显示地理空间数据

how can display Geospatial data using (GeoMesa and spark) or (GeoMesa and mongoDB store)

我想知道使用 GeoMesa 显示 geojson mongo LineString 的最佳方式是什么,我发现 GeoMesa 可以从 cassandra 数据库读取,但我的情况是我的数据存储在 mongoD b。 所以我看到 GeoMesa 可以与 apache spark 集成,我已经在使用 apache-spark 导入此数据。 我的问题是有没有人尝试过或知道地理数据的 spark 数据集如何成为 geomesa 的输入?

通常您不能将 GeoMesa 指向现有数据库,您必须通过 GeoMesa 摄取数据,以便它可以建立适当的空间索引。摄取数据的最简单方法是通过与 GeoMesa 捆绑在一起的 command-line tools,因为它不需要任何编码。

如果你想使用 Spark,你可以构建一个 SimpleFeatures 的 RDD,然后持久化它。 quick-start tutorials have example code for creating SimpleFeatures. To persist them, you would need an instance of a GeoMesa SpatialRDDProvider. This spark tutorial has details on how to instantiate one, although not all parts of the tutorial are relevant in this case. Once you have a SpatialRDDPRovider and an RDD[SimpleFeature], you can persist it using the save 方法。