I have a set of data for world marine piracy. I'd like to build polygons encircling areas of active piracy.
So to start with I get piracy data and make a heatmap from it.
asamjson=Import["http://msi.nga.mil/MSI_JWS/ASAM_JSON/getJSON?typename=\
DateRange_AllRefNumbers&fromDate=19900101&toDate=20140801",
"JSON"];
Needs["GeneralUtilities`"]
asamdataset = Dataset[ToAssociations@asamjson];
piracyLocations =
Map[GeoPosition[ToExpression@{#["lat"], #["lng"]}] &, asamdataset];
sdh = SmoothDensityHistogram[
Reverse[First[#]] & /@ (Normal@piracyLocations)[[1 ;; 4000]],
ColorFunction -> "SunsetColors",
PlotRange -> {{-180, 180}, {-90, 90}}];
GeoGraphics[{Opacity[0.6], sdh[[1]]}, GeoBackground -> "ReliefMap"]
Next I'd like to build polygons encircling areas of piracy (Areas where the histogram is more than some threshold value), or perhaps within 100 miles of any past event.
I'm unsure of how to do this, though I know I've seen it done in demonstrations before. All the methods that spring to mind are computationally infusible.
What am I missing?
Edit: Here's my progress along a different approach.
p = Map[GeoDisk[#, 100000] &, Flatten[c, 1]];
GeoGraphics[p, GeoRange -> {{-40, 20}, {-20, 25}}, Frame -> True]
So with this approach I put a GeoDisk at each piracy location. I can vary the size of the GeoDisks to include more territory (say 100Km away from piracy locations).
So now the problem is simplified to building a bounding polygon on those GeoDisks. I think this simplifies the problem somewhat. Something like ConvexHullMesh would work, if it would work from the outside of the geoDisk. Obviously that's a bit problematic. But it's a thought.
There's a few stray events quite far from land which I can remove by hand.