I want to know what is the best way to display a geojson mongo LineString using GeoMesa, i found that GeoMesa can read from cassandra database but my case is that my data is stored in mongoDb. so i see that GeoMesa can be integrated with apache spark which i am already using apache-spark to import this data. my question is does any one try or know how spark dataset of geodata can be the input of geomesa ?
1 Answers
Generally you can't point GeoMesa at an existing database, you have to ingest the data through GeoMesa so that it can build up the appropriate spatial indices. The easiest way to ingest data is through the command-line tools bundled with GeoMesa, as that doesn't require any coding.
If you want to use Spark, you can build up an RDD of SimpleFeatures and then persist that. The 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 method.

- 1,439
- 6
- 5