将一个大的 Geojson 摄取到 Geomesa

Ingest a big Geojson to Geomesa

我有一个 geojson 文件,我想将其提取到 geomesa。 正如我从其他帖子中了解到的那样,我应该为此创建一个转换器。

文件如下:

{
    "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
                        ]
                    ]
                ]
            }
        }

我无法为这些数据获得正确的 json 转换器,请问有什么想法吗? geomesa 的教程确实提供了一些关于正常 json 的帮助,但对于 geojson 它是模棱两可的。

GeoMesa 支持 GeoJSON type-inference,首先在 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 命令下提到(它也支持 type-inference),一旦您对输出感到满意,切换到 ingest 命令。如果您不使用 CLI,那么您可以采用持久化的转换器和功能类型定义并将它们用于例如NiFi 或您的备用摄取管道。