简体   繁体   English

在传单中的地图上显示栅格数据

[英]Displaying raster data on map in leaflet

I have a trouble with displaying raster data on leaflet maps. 我在传单地图上显示栅格数据时遇到了麻烦。

There is an float NxM array and RGB scale. 有一个浮动NxM阵列和RGB比例。 I want to add new layer with the colorful tiles. 我想用彩色瓷砖添加新图层。 I tried just to draw rectangles, but it's incredibly slow displaying. 我试图绘制矩形,但显示速度非常慢。 I noticed method L.GridLayer.extend() , but I didn't find any examples of what I want (just simple grid with text of coords on each tile). 我注意到方法L.GridLayer.extend() ,但我没有找到任何我想要的例子(只是简单的网格,每个图块上有coords文本)。

Can somebody give an example where the raster data displayed by this or any other method? 有人可以举例说明这个或任何其他方法显示的栅格数据吗?

If you look at the list of Leaflet plugins , you'll see quite a few that do per-pixel raster manipulation, including: 如果查看Leaflet插件列表 ,您会看到很多针对每像素光栅操作的操作,包括:

  • L.TileLayer.BPG : extends tilelayer, loading a tile means rendering a <canvas> and dumping its contents into the <img> L.TileLayer.BPG :扩展tilelayer,加载tile意味着渲染<canvas>并将其内容转储到<img>
  • L.TileLayer.PixelFilter : loads an image and replaces individual pixels L.TileLayer.PixelFilter :加载图像并替换单个像素
  • Leaflet-fractal : Displays the mandelbrot set, calculating each pixel of a <canvas> Leaflet-fractal :显示mandelbrot集,计算<canvas>每个像素
  • L.TileLayer.GL : Manipulate images with WebGL. L.TileLayer.GL :使用WebGL处理图像。 Very useful and fast for heavy computations (fractal sets are several orders of magnitude faster) or manipulating existing images. 非常有用且快速的重型计算(分形集快几个数量级)或操纵现有图像。 Do have a look at the hypsometric tint demo; 看看hypsometric色调演示; it will be useful if your NxM array is in any kind of graphical format (as the "terrain-rgb" tiles). 如果您的NxM阵列采用任何类型的图形格式(如“terrain-rgb”图块),它将非常有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM