-
Notifications
You must be signed in to change notification settings - Fork 44
GridRenderer
ebiiii edited this page Oct 27, 2014
·
1 revision
This processing class renders a grid into an image. The class reads from a grid wrapper. It requires one parameter:
- cellpixels this is the size in pixels of of the rendered cells
And has optional ones:
- mapoverlay enable ("yes" or "true") or disable (default, "no" or "false") a map to be overlaid on the grid.
- max_value value that will be associated to the maximum of the color scale. All values above this one will be rendered as black.
- min_value value that will be associated to the minimum of the color scale. All values below this one will be rendered as white.
If you want to use the map overlay feature, please edit the url of the Map Tile Service in the code of the virtual sensor gsn.vsensor.GridRenderer
. You can find a list of such services here: http://wiki.openstreetmap.org/wiki/TMS. Because of the granularity of the zoom level, the size of the final image can vary a bit and the cellpixels is used as a minimum of pixels for a cell.
Sample code:
<virtual-sensor name="dataclean_example" priority="10">
<processing-class>
<class-name>gsn.vsensor.GRidRenderer</class-name>
<init-params>
<param name="cellpixels">5</param>
<param name="mapoverlay">no</param>
<param name="max_value">100</param>
<param name="min_value">0</param>
</init-params>
<output-structure>
<field name="grid" type="binary:image/png"/>
</output-structure>
...
<address wrapper="grid">
<predicate key="directory">.</predicate>
<predicate key="extension">dem</predicate>
<predicate key="file-mask">^(\d{14}).dem</predicate>
<predicate key="time-format">yyyyMMddHHmmss</predicate>
<predicate key="rate">3600000</predicate> <!-- in milliseconds -->
</address>
<query>SELECT * FROM wrapper</query>