0

Assume I want to perist JSON files in GeoMesa (on Accumulo). These JSON files have geometries and time. Can I use a XZ3 index? If yes then how?

NB: By JSON I am not refering to GeoJSON.

Mike Argyriou
  • 1,250
  • 2
  • 18
  • 30

1 Answers1

1

You can write a GeoMesa converter (a configuration file) to extract the values you want out of your JSON and into a GeoTools SimpleFeature, and ingest those into GeoMesa. Download the Accumulo distribution from github and look at the example under examples/ingest/json/. Full documentation for converters is available here.

You also have the option of storing JSON strings as attributes, and querying them using JSON-Path. There is more information on that here.

The indices created for your data will depend on the attributes present. If you have a non-point geometry and a date defined, then you will automatically build an XZ3 index. More information on indices is available here and here

Emilio Lahr-Vivaz
  • 1,439
  • 6
  • 5
  • Thank you for the prompt answer. I will check the links. Fast question: JSON string as attribute also uses an index (only for GeoJSON I have seen index)? I haven't seen any reference to create to give a JSONPath where to create the index. Populating a SimpleFeature from a JSON can be done manually and adding an index to SimpleFeature can also be done (this is clear). – Mike Argyriou Oct 25 '17 at 19:20
  • 1
    The JSON string attribute itself can't be indexed. If you want to index a particular JSONPath, you can extract it into a separate attribute in the converter, and index that attribute. – Emilio Lahr-Vivaz Oct 26 '17 at 12:48