How can I generate an image in Ruby without extern

2020-07-06 03:27发布

问题:

I want to implement heat maps over Google maps with my own data beyond my Rails application. To do this I need to generate overlay images for each map coordinate (tile) based on my data.

I found how to generate that using ImageMagick but I do not want to depend on this, because I plan to distribute my application in several places, so I would like to do this using only the Ruby language.

Note that I need only to plot points in different colors over an small transparent square.

回答1:

I think chunky_png or oily_png will be your best bet on this. It has no external dependencies on ImageMagick, and generates images in a web-usable format.



回答2:

This is a big problem by itself, but is a resolved problem, see Geoserver or Mapserver.

  • http://docs.geoserver.org/stable/en/user/styling/sld-extensions/rendering-transform.html
  • http://mapserver.org/development/rfc/ms-rfc-108.html