关于栅格的美丽事情是它们对于可视化和数学分析非常有用。它们是简单,多功能的,最佳方法,可以在连续,像素逐个像素基础上表示数据。

Here are a bunch of ways you can work with this data type—and I hope the list inspires you to think of even more possibilities. You’ll see how to重组rasters to get exactly what you need, exerting specific control over cells, bands, palettes, even the way they’re geocoded. You’ll also see many ways to整合它们,导致数据集更丰富和说明。如果您围绕足够长,您甚至可能会学习如何使用数学和表达评估来给您的朋友留下深刻印象。

1。Convert between data formats

该地产区已从分层DWG转换,从而创建了载体的图像,更好地满足结构要求。

该地产区已从分层DWG转换,从而创建了载体的图像,更好地满足结构要求。

There are a lot of raster formats. I don’t want to embarrass myself by guessing how many (I’ve always been terrible at those Jelly Bean Jar guessing games), but I can tell you thatFME works with more than 60他们。我们使用统计数据中最受欢迎的是地理灯/ TIFF和ECW。

要得到all the benefits of data integration,通常值得转换为另一个栅格格式,或在光栅和向量之间转换,或将栅格与点云,数据库,CAD,GIS或任何其他数据类型组合。在一个世界的地方数据是液体, it’s suicide to keep information locked in a single format.

2.改变尺寸

这是一个已逐渐下采样为10x10的25x25 DEM的视觉表示。

这是一个已经向下采样至10×10的25×25个DEM的视觉表示。

将图像重新示例到所需的行/列尺寸,单元格大小或原始大小的百分比。通常进行重采样来生成较小的图像,但它也可以用于制造更大(虽然较低的质量)。

Unless you’re looking to make pixel art, you’ll want to get essentially the same representation of a picture (for a color image) or value distribution (for a numeric raster) when downsampling. Useful interpolation methods include nearest neighbor (fast), bicubic (best quality), bilinear (a compromise), and average 4 or 16 (good for numeric rasters like DEMs).

3.更改坐标系

LAT / LONG投影可能是我们的使用统计数据中最受欢迎的,但不同的任务需要不同的坐标系。

LAT / LONG投影可能是我们的使用统计数据中最受欢迎的,但不同的任务需要不同的坐标系。

与任何值得的,可敬的空间数据格式一样,栅格可以是地理位置的并且可以进入各种坐标系。

如果您需要将图形投影到地图上或与其他数据组合,则可以将其恢复为另一个系统。例如,KML需要WGS84(LL84),而Web地图块服务中的图块很可能在球形Mercator中。

如果您想要真正具体,您甚至可以控制您的光栅的地理编码。例如,一些栅格嵌入有地面控制点(GCP),而不是在角落上具有地理码。您可以根据需要提取或设置GCP。

4. Combine tiles into one image

Mosaicking means bringing multiple images together. At Safe, this is our most popular raster transformation.

Mosaicking means bringing multiple images together. At Safe, this is our most popular raster transformation.

马赛克多个栅格进入一个特征。例如,也许您需要将瓷砖带到Lat / Long投影中的简单概述中。这将涉及马赛克,重组(#2)和reproject(#3)转换。

It’s like a puzzle! One where the pieces don’t really fit together!

Yes. About that. Reprojecting can rotate an image slightly, and when this is followed by mosaicking, we often end up with empty black areas in between the pieces. An obsessive-compulsive nightmare. Don’t worry. You can fix it by adding a “nodata” value, so the empty areas become transparent and pick up whatever background is underneath.

This image has been compressed by 75% to make it easier to work with while not compromising the overall quality.

此图像已被压缩以使其更易于使用,而不会降低质量。

5.压缩栅格文件

Like putting your raster in Spanx, compressing it makes everything slimmer and trimmer. 75% is a pretty good ratio to use if you want a smaller image that’s quicker to process, but still good quality.

Many formats support compression: JPEG/JPEG2000, ECW, GeoTIFF/TIFF, Oracle Spatial GeoRaster, ArcSDE Raster, Geodatabase Raster, CADRG, and WebP, to name ten.

6. Clip to boundaries

Clipping is essentially a combination of rasters and vectors to produce more useful output. For instance, each of these clipped pieces can be stored in a PostGIS database with its associated metadata.

Clipping is essentially a combination of rasters and vectors to produce more useful output. For instance, each of these clipped pieces can be stored in a PostGIS database with its associated metadata.

Clip an image to keep only the pieces you need, and toss away the parts outside of your defined boundary.

For example, you can merge an ECW of California with a polygon defining the coastline, and clip away the ocean (who needs that big blue wet thing anyway?). The result will be an image of just the state.

如果你剪断许多地区,像公园boundaries, you can merge the attributes from the vector features so each clipped piece retains all the properties, like the park name. As mentioned in #4, it’s handy to define the empty pieces as “nodata” so they stay transparent, making it easy to view over a background map.

Check out fme.ly/parks to see a sample HTML catalog of images and metadata.

Check outfme.ly/parksto see a sample HTML catalog of images and metadata.

7.制作光栅图形和/或元数据的目录

Consolidate graphics and their properties into a useful place, one you can share with your mom to show her all the cool stuff you do at work.

看看我的意思,退房fme.ly/parks。这是一堆剪辑图像的目录和每件作品的信息。

目录从不支持图像的数据库中将栅格作为二进制blob读取,然后使用一些简单的html来使一切都看起来很好。

这个GIF已经平铺,导致许多件中的输出相同。注意此图像中的阴影已被夸大,因此可以区分瓷砖。

This GIF has been tiled, resulting in the same output in pieces. The shadows have been exaggerated to distinguish the tiles.

8. Split a big image into tiles

Split a raster into a series of tiles. Maybe you want images in a particular size, or maybe you want a particular number. Maybe you need smaller pieces for processing. Maybe you need to load your raster in software that doesn’t support highly compressed wavelengths. Maybe you just like your data in really tiny pieces—like data confetti. I don’t blame you. Confetti is fun.

Whatever your situation, you have a giant image and you want it in smaller pieces. Tile it.

The most commonly used web map tiling scheme is the Google and Bing Maps compatible one. Visit MSDN for more info about this tiling scheme.

The most commonly used web map tiling scheme is the谷歌和Bing地图兼容one.

9.创建Web映射图块服务

创建一系列可通过Web映射应用程序使用的图像块,例如Google地图,Bing映射或其他Web地图图块服务。

The imagery in a WMTS is stored in tile sets, so as you zoom, you see different tile sets at different resolutions. You can create a WMTS by reprojecting to spherical mercator (#3), resampling to various resolutions (#2), and splitting into tiles (#8).

10.。Texture a geometric surface

该3D模型是多步光栅转换的结果:JPEG覆盖到从DEM产生的锡表面上。

该3D模型是多步光栅转换的结果:JPEG覆盖到从DEM产生的锡表面上。

我觉得没有栅格已经实现了它的命运,直到它被用来纹理表面。首先,Rasters是3D世界的2D表示。其次,3D模型通常是普通和织物的。也没有像它一样有帮助。在3D模型上覆盖光栅通常是一个启发整合。

假设你有一个轮廓的ESRI Shapefile,以及MRSID Orthophoto。您可以通过基于高程将轮廓转换为3D来创建DEM。当生成为锡并与原子光电子集成时,您最终通过具有纹理表面的更有用的3D模型,如右侧的糖果山。

Draping a point cloud with RGB and DEM rasters也导致一些伟大的表面模型转换(我们最受欢迎的一个LiDAR处理任务)。

11。Attach an image as an attribute of a feature

Esri ArcGIS supports the ability to add attachments in a Geodatabase feature class.

Esri ArcGIS supports the ability to add attachments in aGeodatabase要素类。

A lot of formats, likeGeodatabase或Excel,允许图像附件。

This is great news for interoperability, because you can make a raster out of anything. Photos, scans, statistical data, charts, illustrations, satellite imagery … One time I demoed an enterprise raster reader/writer using a picture of a pony.

任何可以进入栅格的任何东西都可以以支持图像附件的格式。

该32位RGBA PNG已被转换为具有α频带,因此它可以代表透明度。这种类型的“羽化”在拼接时可以有用。

该32位RGBA PNG已被转换为具有α频带,因此它可以代表透明度。这种类型的“羽化”在拼接时可以有用。

12. Restructure the bands

好的,现在我们正在进入一些更强大的东西。(穿上太阳镜。)

If you have multi-band data and you need to convert to a format that doesn’t support it—for example, if you have an intense 8-band format but all you want is an RGB overview—you can remove bands you don’t need.

您还可以重新介绍或添加频带,例如以具有透明度的RGB从RGB重新介绍,或删除Alpha Band,以便使用普通RGB。

在该示例中,用户基于DEM中的值生成一组矢量多边形。

在该示例中,用户基于DEM中的值生成一组矢量多边形。

13. Vectorize a raster based on values

One way to convert raster to vector is to create a polygon for each contiguous area of pixels with the same value. We call this classifying a raster.

在右侧的矢量图像中,通过在分类之前从高程模型中的最接近的25米舍入到电梯上产生多边形。然后由多边形进行NURBS,导致矢量化轮廓图。

无论是那个,还是有人把彩虹放在搅拌机中。我不知道。

This Canadian Digital Elevation Data has been hill-shaded then overlaid on a background map.

This Canadian Digital Elevation Data has been hill-shaded then overlaid on a background map.

14. Make the bitmap realistic with hill shading

If you work with elevation data, you’re probably familiar with the plain, black and white graphics where high elevations are white and low elevations are black. Sorry, but even 3D glasses can’t make that stuff look 3D. Trust me, I tried.

Hill Shading提供了一个真实的渲染图片实际上看起来像什么。这对于在将地形放在一起制图产品时,这尤其有用。

15. Colorize point clouds

这个漂亮的点云已经用栅格着色。

此点云已被栅格着色。

数据集就像香料,直到将它们混合在一起,你不经历完整的味道。

Overlay a point cloud on a georeferenced raster to color the points.

结合栅格和点云使LIDAR可视化更加令人欣喜。看看我的博客帖子14 Ways to Take Charge of LiDAR Datato see many ways to integrate point clouds. Some of the most useful, beautiful outputs involve rasters.

这些红色多边形基于进行的代数来覆盖以确定感兴趣的区域。

这些红色多边形基于进行的代数来覆盖以确定感兴趣的区域。

16.像素表达式评估的像素

根据一个或多个小区的值执行计算。例如,您可以计算每个小区的斜率或方面(斜率方向),或提取范围,或者检测两个输入之间的变化。

You could also modify pixel values based on an algorithm. Yes, friends, if these pixels store RGB values, then this is just a fancy way of saying “make your own Valencia or X-Pro II”. Free spork to anyone who uses raster expression evaluation to make their own Instagram filter.

在该示例中,通过将路线图像从路面复制到背景层来组合地理员和PNG。

GeoTIFF和PNG已经被复制组合cell values from the road image over to the background layer.

17. Layer rasters by copying cells or using semi-transparency

组合两个栅格以查看两层的信息。您可以通过仅从其中一个图像(例如,白色和黄色道路)或通过添加透明度(#12)来完成此操作。Alpha Band允许您在覆盖它们时平滑融合图像。有点像数字铁上的转移纸。

To see how to accomplish all of the above tasks with FME, visitsafe.com/raster。我建议你在2013年10月观看webinar recordingfor great live demos, including impressive scenarios that combine several data sources (including WMS), advanced transformations, and mathematics. We also have a huge collection of articles in ourFME Community帮助您完成光栅需求。

What kind of translations and transformations do you do with raster data? What do you find the most challenging?

关于数据 Data Transformation 图形 图片 Integration Raster 罗斯克斯 空间数据互操作性 转型

天安华纳

天坛is a Senior Marketing Specialist at Safe Software. Her background in computer programming and creative hobbies led her to be one of the main producers of creative content for Safe Software. Tiana spends her free time writing fantasy novels, riding her horse, and exploring nature with her rescue pup, Joey.

Comments

16回应“17种方式成为光栅大师”

  1. ruz. 说:

    Ha Ha! 14 out of 17 – I am almost there!

    Of course it is missing things like running interpolation processes, raster calculator, finding edges, time lapses, etc…

    • 天安华纳 说:

      ruz,我认为17人中有17人让你真正成为罗斯塔的主人!谢谢你指出那些额外的功能。有趣的是,阅读所有先进的工作流程所需的数据所需的数据。亚搏在线

  2. Jeremy Dunn. 说:

    大家早,

    有没有人有一个用FME规范化光栅图像的例子。这是一些简单的乐队数学,但我想知道有人是否已经在FME中完成了这一点。

    Regards.

    Jeremy.

  3. Dave Campanas 说:

    嗨杰里米,

    我假设通过归一化,你的意思是拉伸像素值以适合频带范围。您可以用几个变形金刚执行此操作:

    1。You can use a RasterBandMinMaxExtractor to extract the range of values present in the band.

    2. Using the Offsetter to offset the X and Y of an raster will move it, but offsetting the Z will offset the pixel values. Set the Z offset to -(minimum data value) to move the pixel values to the bottom of the band.

    3.与offsetter一样,缩放器将通过z比例因子缩放像素值。将z比例设置为(最大可能的频带值/(最大数据值 - min数据值))。这将扩展数据值以填充频带范围。

    If you would like a workspace example using your own data, please contact our Support crew through//www.baooytra.com/support, and we would be happy to help you.

    Kind regards,
    Dave Campanas
    Product Specialist

  4. Teresa B. 说:

    Hello,
    I’m trying to achieve nr 6 “clip to boundaries”. I’ve got a .tif-file which I’m clipping with the .shp-file of a country. That’s simple enough with the clipper transformer. What I’m struggling with is setting empty pieces to ‘nodata’ and getting transparency around the country. At the moment it’s all filled white. Which other transformer do I need to get transparency? I’d very grateful for all suggestions.

    Kind regards,
    Teresa

    • 天安华纳 说:

      嗨特蕾莎,

      It sounds like you need a RasterBandNodataSetter transformer after the Clipper, to set the background value to nodata.

      Clipping and transparency is discussed in our raster webinar at about 43 minutes:http://www.亚搏在线safe.com/webinar/13-ways-to-avoid-a-raster-disaster/You can also download the workspaces from that webinar.

      Please feel free to send us your workspace and source if you’re struggling. Our support team will be happy to help.http://fmepedia.safe.com/knowledgeSubmitCase

      干杯,
      天坛

      • Teresa B. 说:

        嗨tiana,
        感谢您的回复和有趣的链接。我用RasterBandNodatasetter变压器尝试了它,但从图像中删除了每一件的每一件。这可能是由于我的原始数据是带有调色板的栅格。我试图用rastedpaletteremover在剪辑之后和一个rasterpalettegenerator一起解决这个问题,但同样的问题仍然存在 - 现在是黑色的。调色板都搞砸了。
        Something I thought would be quite easy to do, appears to be much more difficult….
        一旦我用我的主管清算了它,我会向同事发送我的数据/工作区。也许他们可以解决问题。
        Regards,
        Teresa

  5. […] together to make photos, and those photos capture all the wonderful memories we hold most dear! Raster images can become finicky to use though if not formatted correctly for your print or web needs. In […]

  6. Paal. 说:

    Hello,

    I am wondering how can I find properties like the size of an image pixel width * pixel hight?
    我必须用变形金刚或用pythoncaller找到这些,
    Any suggestions?

    干杯。
    Paal.

  7. Paal. 说:

    Got it, RasterPropertiesExtractor.

  8. 罗布choucroun. 说:

    第7部分中的链接不起作用。栅格目录。这对我来说非常有用。

  9. Kristof 说:

    Is in the figure in 2 DEM resampled from 25 to 10 or from 10 to 25? I believe the later.

    • 天安华纳 说:

      谢谢你的评论。图片显示左边的25×25光栅的表示,右侧为10×10光栅,因此在这种情况下,通过将25到10重新采样来取决于我们的意思。

      干杯,
      天坛

  10. Harmen 说:

    Hi,

    我喜欢通过插值填充的Nodata地区......怎么做?

    最好,
    Harmen

Leave a Reply toAnonymous取消回复

Your email address will not be published.必需的地方已做标记*

相关文章