Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geotrellis-user] Create raster tiles for heatmap from sensor data?

We can generate kernel density over raster tiles from RDD[PointFeature[Double]]. 
This is a spatial operation so you would have to munge your data to create temporal bins. 
Your workflow might look some thing like this:

https://gist.github.com/echeipesh/0ccf966889eb5f0cd5842c8a861b931a
(steam compiled so it may be short an import or two)

That generates a power of 2 layout raster RDD in lat-long which will totally display through Leaflet but probably won't line up with WebMercator base map.
You'd have to make a choice to either reproject the points or retroject the raster, depending on what you're trying to preserve. Probably the original projection is what you would want for time series anyway.

There is no GeoServer plugin to view the layers yet. Generally we make TMS endpoints using spray/akka-http.
It seems that each one is different enough and easy enough to implement using ValueReader like so:
https://github.com/geotrellis/geotrellis-chatta-demo/blob/master/geotrellis/src/main/scala/geotrellis/chatta/ChattaServiceRouter.scala#L103

The above code generates spatial layers with SpatialKeys but you could generate them together and generating a patio-temporal layer as well where time would be the start time of each bin.

There is support for writing raster layers to Cassandra so that is no problem, I used S3 for the mockup code to keep it more universal.

The spec for RDD Kernel density operation for reference:
https://github.com/locationtech/geotrellis/blob/master/spark/src/test/scala/geotrellis/spark/density/RDDKernelDensitySpec.scala

Hopefully this is useful info despite delayed response, I could help mock out the workflow in more detail for the spatio-temporal case if that would be helpful as well.

On Tue, May 9, 2017 at 4:17 PM Michael Bowen <michael.bowen17@xxxxxxxxx> wrote:
Hello all,

I am fairly new to raster/vector tiles and I am trying to figure out how to create heatmaps from sensor data in the format of lat, lon, time, sensor reading. I'm very comfortable in spark and munging around with the data, but I'm having trouble figuring out how to get started with creating raster or vector tiles for overlaying this data into leaflet. (There are millions of readings, about 64gb of data currently, but I have a cluster to play on.) I would ultimately like to query this data, generate tiles, store them in cassandra, and then serve them up through geoserver or something. Is creating raster/vector tiles from raw sensor data something that geotrellis can do?

Cheers,

Mike
_______________________________________________
geotrellis-user mailing list
geotrellis-user@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geotrellis-user
--
--
Eugene Cheipesh

Back to the top