第8页
span4
Previous: Modify Raster Cell Size by Resampling
In this tutorial,您将学习如何通过将多边形覆盖到光栅数据集来选择区域和更改光栅单元的值。This can be easily accomplished in FME using theMapnikRasterizer,现有的光栅数据集,and point,行,或多边形特征。
changing-raster-values-by-geographic-feature.fmwt
注:既然你是working on a public facing database,tables can occasionally be overwritten and/or modified.If your translation produces unexpected results,查看重置PostGIS培训数据库article.或者,you can download the provided file(s) and replace the PostGIS reader with a reader of the appropriate format.
In this scenario,you will reclassify raster cells based on areas where park polygons overlay urban cells.This will change the band values from [Band 0: 0],[波段1:0],[Band 2: 0],[Band 3: 255] to [Band 0: 0],[Band 1: 255],[Band 2: 0],[Band 3: 255] where park polygons overlay raster cells in the VancouverLand dataset.
mapnikrasterizer允许您转换点,行,和/多边形特征,通过将特征划分为称为图层的组,将其划分到新光栅或现有光栅上。有关更多信息,请参阅MapnikRasterizer Documentation.
注意两个连接是如何在呈现规则中列出的;然而,they are set as Line symbols.Since you are classifying raster values by park polygons,you need to change the symbolizers for both of the Rendering Rules.
Important: ensure the rendering rules are ordered as they are in the screenshot above otherwise the urban cells will be created on top of the park cells.The urban cells need to be classified first,followed by the park cells so they appear on the output raster.You can adjust the ordering of the rendering rules using the move up/down arrows below the Rendering Rules box.
Smoothing is used to control whether the output will have to follow Boolean or Fuzzy logic.平滑gamma值为1时使用模糊逻辑,该逻辑对于具有移动或不确定性的区域(如海岸线)很有用。或者,a Smoothing Gamma value of 0 uses Boolean logic which is useful when you want to classify cells with 100% certainty.这个练习将使用布尔逻辑,所以单元格将被分类为城市或公园-这将防止单元格被分类为20%公园和80%城市。
Fuzzy Logic
Boolean Logic
The Cell Spacing parameter specifies the width of the output raster cells,measured in ground units.注:较小的电池提供更高的分辨率,然而,在查看大范围(即a cell spacing of 1 will take longer to load than 5) and also have large file sizes.
自动属性定义是当工作台自动定义属性列表时,depending on which Reader feature types are connected,for more information see theAbout Writer Feature Types: User Attributes文档。
After running the translation,输出将显示在FME数据检查器中。请注意,公园单元已使用光栅带(带0-3)进行了分类,城市区域为黑色。
本教程中使用的数据源于City of Vancouver,British Columbia.它包含根据开放政府许可证(温哥华)获得许可的信息。
© 2019 亚搏在线Safe Software Inc |法律