Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Ingesting/indexing GeoJSON-format data?

Bob,

The GeoTools GeoJSON module allows you to encode and decode GeoJSON from/to GeoTools SimpleFeatures.  The FeatureWriter interface in GeoTools requires that you pass in SimpleFeatures.  So, your ingest code would need to use the GeoJSON module to decode the incoming GeoJSON into SimpleFeatures and pass the result to the FeatureWriter for persistence into GeoMesa.  Everything should just work from there - assuming the decode is working properly.  I've recently worked with the module - encoding SimpleFeatures coming out of GeoMesa into GeoJSON which gets published onto a Kafka queue.  I haven't tried decoding yet but the docs indicate it should work as well.  Here's a link to a test that converts GeoJSON into a GeoTools SimpleFeature collection:

https://github.com/geotools/geotools/blob/master/modules/unsupported/geojson/src/test/java/org/geotools/geojson/FeatureJSONTest.java#L110

Thanks,
Anthony


On Wed, May 28, 2014 at 12:24 PM, Barnhart, Bob M. <ROBERT.M.BARNHART@xxxxxxxxxx> wrote:

We have a requirement to store/index video/imagery data whose meta-data is in GeoJSON (http://geojson.org/geojson-spec.html) format, e.g.,:

 

{

    "geometry": {

        "coordinates": [

            [

                [

                    -84.1128178291065,

                    39.7765313706951

                ],

                [

                    -84.11741849441,

                    39.7733475271941

                ],

                [

                    -84.1202567157913,

                    39.7759156597665

                ],

                [

                    -84.1158185615507,

                    39.7789873477452

                ],

                [

                    -84.1128178291065,

                    39.7765313706951

                ]

            ]

        ],

        "type": "Polygon"

    },

    "id": "...",

    "properties": {

        "centerlat": 39.7762177930103,

        "centerlon": -84.116603650207,

        "coaobjtype": "Polygon",

        "effects": {

            "vtt": {

                "url": "..."

            }

        },

        "fillColor": "ffffffff",

        "guid": "...0999",

        "heading": 0,

        "imageurl": "images/...png",

        "lineColor": "00ff00ff",

        "movieurl": "videos/....mpg"

    },

    "type": "Feature"

}

 

Can GeoMesa directly handle data in [Geo]JSON format (e.g., using the GeoTools GeoJSON [http://docs.geotools.org/latest/userguide/unsupported/geojson.html])?

 

If not,

-          What (GeoMesa/Accumulo) representation should be used for such data (e.g., convert property:value pairs into property-path:value pairs)?

-          What APIs would you use to convey the location, bounding-polygon for indexing purposes?

 

 

Bob Barnhart

Chief Systems Engineer | 858 826 5596 (Office) | 619 972 9489 (Mobile) | Robert.M.Barnhart@xxxxxxxxxx

 

 


_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
http://www.locationtech.org/mailman/listinfo/geomesa-users



Back to the top