I have a geojson file that I want to ingest to geomesa. As I understood from other posts, That I should create a converter to do so.
The file is as follow:
{
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
},
"features": [
{
"type": "Feature",
"properties": {
"id_trip": 1547,
"starttime": "2017-09-18 04:16:58UTC",
"endtime": "2017-09-18 04:26:26UTC"
},
"geometry": {
"type": "MultiLineString",
"coordinates": [
[
[
-73.651166,
45.544501
],
[
-73.651227,
45.544519
],
[
-73.653826,
45.545258
],
[
-73.654753,
45.545521
],
[
-73.654917,
45.545565
],
[
-73.654615,
45.546086
],
[
-73.65365,
45.545816
],
[
-73.653426,
45.545753
],
[
-73.653625,
45.545809
],
[
-73.65365,
45.545816
],
[
-73.654615,
45.546086
],
[
-73.654917,
45.545565
],
[
-73.654753,
45.545521
],
[
-73.654167,
45.545354
],
[
-73.651227,
45.544519
],
[
-73.651166,
45.544501
],
[
-73.651457,
45.543993
],
[
-73.651702,
45.543567
],
[
-73.651561,
45.543526
],
[
-73.651316,
45.54394
],
[
-73.651044,
45.544401
],
[
-73.651011,
45.544456
],
[
-73.651166,
45.544501
],
[
-73.651227,
45.544519
],
[
-73.654278,
45.545386
],
[
-73.654621,
45.545483
],
[
-73.654753,
45.545521
]
]
]
}
}
Im having trouble to get the right json converter for these data, any idea on that pls? The tutorial of geomesa does give some help regarding normal json but for geojson its ambiguous.
GeoMesa support type-inference for GeoJSON, as mentioned under the ingest command documentation. This will create a converter definition for you, which you can persist and tweak as needed. I would recommend using the convert command first (which also supports type-inference), and once you are satisfied with the output switch to the ingest
command. If you are not using the CLI, then you can take the persisted converter and feature type definitions and use them in e.g. NiFi or your alternate ingest pipeline.