Thanks Anthony, I’m looking at this now…Bob
From: geomesa-users-bounces@xxxxxxxxxxxxxxxx [mailto:geomesa-users-bounces@xxxxxxxxxxxxxxxx]
On Behalf Of Anthony Fox
Sent: Wednesday, May 28, 2014 9:48 AM
To: Geomesa User discussions
Subject: Re: [geomesa-users] Ingesting/indexing GeoJSON-format data?
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.,:
{![](gifs0IVbutgNh.gif)
"geometry":
{![](gifs0IVbutgNh.gif)
"coordinates":
[![](gifs0IVbutgNh.gif)
[![](gifs0IVbutgNh.gif)
[![](gifs0IVbutgNh.gif)
-84.1128178291065,
39.7765313706951
],
[![](gifs0IVbutgNh.gif)
-84.11741849441,
39.7733475271941
],
[![](gifs0IVbutgNh.gif)
-84.1202567157913,
39.7759156597665
],
[![](gifs0IVbutgNh.gif)
-84.1158185615507,
39.7789873477452
],
[![](gifs0IVbutgNh.gif)
-84.1128178291065,
39.7765313706951
]
]
],
"type":
"Polygon"
},
"id":
"...",
"properties":
{![](gifs0IVbutgNh.gif)
"centerlat":
39.7762177930103,
"centerlon":
-84.116603650207,
"coaobjtype":
"Polygon",
"effects":
{![](gifs0IVbutgNh.gif)
"vtt":
{![](gifs0IVbutgNh.gif)
"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
|