You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Joseph Obernberger <jo...@lovehorsepower.com> on 2015/05/23 17:48:52 UTC
Solr & Heatmap & Geotools
Hi All - I've been working with geo tools to build a heat map based on
location data coming back from Solr Cloud using these nifty feature
where you can facet on location
(https://issues.apache.org/jira/browse/SOLR-7005) and generate a raster.
I've been able to take this data and build a GridCoverage2D object and
.show() that OK - works nice (even displays a nice map), but I don't
know how to apply the HeatmapProcess to it. What I've tried so far is:
HeatmapProcess process = new HeatmapProcess();
SimpleFeatureCollection sfc = null;
try {
sfc = FeatureUtilities.wrapGridCoverage(rasterCov);
} catch (TransformException ex) {
System.out.println("Error: "+ex);
} catch (SchemaException ex) {
System.out.println("Error: "+ex);
}
if (sfc == null) {
System.out.println("Bummer");
System.exit(1);
}
GridCoverage2D cov = process.execute(sfc, // data
1024, //radius
"0", // weightAttr
1, // pixelsPerCell
bounds, // outputEnv
1024, // outputWidth
1024, // outputHeight
monitor // monitor)
);
cov.show();
So far all I get is an empty frame. Any tips, or links on how to use
HeatmapProcess? Anyone trying anything like this?
Thanks very much!
-Joe