#!#! #! #!#! #!#! #!#! #!#! #!#! #!#! #!#! #!#! #!#! #! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#! #!#!#!#!#!#!#!#!#!#!#!#!#! #!#! #!#! #!#! #!#!FME_PYTHON_VERSION 27 # !START_HEADER # !START_WB_HEADER READER_TYPE NULL READER_KEYWORD NULL_SOURCE NULL_SOURCE_DATASET null WRITER_TYPE NULL WRITER_KEYWORD NULL_DEST NULL_DEST_DATASET null #! END_WB_HEADER #! START_WB_HEADER #! END_WB_HEADER #! END_HEADER LOG_FILENAME "$(FME_MF_DIR)HilbertCurve.log" LOG_APPEND NO LOG_MAX_FEATURES 200 LOG_MAX_RECORDED_FEATURES 200 FME_REPROJECTION_ENGINE FME FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto FME_GEOMETRY_HANDLING Enhanced FME_STROKE_MAX_DEVIATION 0 LOG_TIMINGS YES LOG_FILTER_MASK -1 # ------------------------------------------------------------------------- MULTI_READER_CONTINUE_ON_READER_FAILURE No FME_BEGIN_PYTHON_ENC def 希尔伯特_Curve. n : 进口 numpy from numpy 进口 * Generate 希尔伯特 curve 在dexing 为了 n n 大批。 n must be a power two. 递归 base 如果 n ==. 1: return numpy.zeros 1 1 在t32 制作 n 2 n 2 在dex t = 希尔伯特_Curve. n 2 flip it 时代 添加 在dex 抵消 a = flipud rot90 t b = t + t.size c = t + t.size*2 d = flipud rot90 t -1 + t.size*3 瓷砖 在to resulting 大批 return vstack map h a b d c #---------------------------------------------------------------------- MACRO WORKSPACE_NAME HilbertCurve MACRO FME_VIEWER_APP fmedatainspector # ------------------------------------------------------------------------- INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES DEFAULT_MACRO WB_CURRENT_CONTEXT # ------------------------------------------------------------------------- Tcl2 proc Creator_CoordSysRemover {} { global FME_CoordSys; set FME_CoordSys {}; } MACRO Creator_XML NOT_ACTIVATED MACRO Creator_CLASSIC NOT_ACTIVATED MACRO Creator_2D3D 2D_GEOMETRY MACRO Creator_COORDS INCLUDE [ if { {Geometry Object} == {Geometry Object} } { puts {MACRO Creator_XML *} } ] INCLUDE [ if { {Geometry Object} == {2D Coordinate List} } { puts {MACRO Creator_2D3D 2D_GEOMETRY}; puts {MACRO Creator_CLASSIC *} } ] INCLUDE [ if { {Geometry Object} == {3D Coordinate List} } { puts {MACRO Creator_2D3D 3D_GEOMETRY}; puts {MACRO Creator_CLASSIC *} } ] INCLUDE [ if { {Geometry Object} == {2D Min/Max Box} } { set comment { We need to turn the COORDS which are minX minY maxX maxY into a full polygon list of coordinates }; set splitCoords [split [string trim { }]]; if { [llength $splitCoords] > 4} { set trimmedCoords {}; foreach item $splitCoords { if { $item != {} } {lappend trimmedCoords $item} }; set splitCoords $trimmedCoords; }; if { [llength $splitCoords] != 4 } { error {Creator: Coordinate list is expected to be a space delimited list of four numbers as 'minx miny maxx maxy' - ` ' 是无效的};};设置minx [Lindex $ splitCoords 0];设置Miny [Lindex $ SplitCoords 1];设置maxx [lindex $ splitcoords 2];设置maxy [lindex $ splitcoords 3];Puts“Macro Creator_coords $ minx $ miny $ minx $ maxy $ maxx $ maxy $ maxx $ miny $ minx $ miny”;放{宏creator_2d3d 2d_geometry};puts {宏creator_classic *}}] foress_def $(creator_xml)creationfactory factory_name creator_xml_creator create_at_end没有输出feature_type _____created______ @geometry(from_encoded_string, ?xml 版本= 1.0 编码= US_ASCII. 独立= ? geometry 尺寸= 2 空值 geometry )FACTORY_DEF $(Creator_CLASSIC)CreationFactory FACTORY_NAME Creator_CLASSIC_Creator $(Creator_2D3D)$(Creator_COORDS)CREATE_AT_END无输出FEATURE_TYPE _____CREATED______ FACTORY_DEF * TeeFactory FACTORY_NAME Creator_Cloner INPUT FEATURE_TYPE _____CREATED______ NUMBER_OF_COPIES 1 COPY_NUMBER_ATTRIBUTE “_creation_instance” 输出FEATURE_TYPE Creator_CREATED @ TCL2(Creator_CoordSysRemover)@CoordSys()fme_feature_type造物主factory_def * branchingfactory factory_name“creator_created brancher -1 25”输入feature_type creator_created target_factory“$(wb_current_context)_creator_branch_target”输出传递feature_type * @removeattributes(“creator_created brancher -1 25”.branchingfactory.count)#---a------------------------------------------------------------------------------------ Factory_def * buddingboxfactory factory_name 2dgridcreator budding_box_type grid_corners grid_cell_size 100 100 grid_cell_count 15 15 grid_origin top_left grid_row_attr _row grid_col_attr _column grid_seed_x 0 grID_SEED_Y 0输出BOUNDING_BOX FEATURE_TYPE 2DGridCreator_CREATED @CoordSys()FACTORY_DEF * BranchingFactory FACTORY_NAME “2DGridCreator_CREATED分支器-1 21” INPUT FEATURE_TYPE 2DGridCreator_CREATED TARGET_FACTORY “$(WB_CURRENT_CONTEXT)_CREATOR_BRANCH_TARGET” 的Passed FEATURE_TYPE * @RemoveAttributes( “2DGridCreator_CREATED分支器-1 21” .BranchingFactory.Count)#--------------------------------------------------------------------- Factory_def * teefactory factory_name“$(wb_current_context)_creator_branch_target”输入feature_type *输出feature_type *#-------------------------------------------------------------------------------------- Factory_def * sortfactory factory_name分拣机输入feature_type 2dgridcreator_created sort_by _row数字升序_column数字升序排序feature_type sorter_sorted#---a--------------------------------------------------------------------------------#创建此变压器将使用的域名。#因为@count本身将评估表达式来计算#域,我们不需要通过包含[Set DomainPrefix {}的每个功能的TCL中的任何内容。如果{{global} == {local}} {set domainprefix [fme_encodeText {counter_}];}; puts "MACRO Counter_FULL_DOMAIN ${domainPrefix}counter2"; ] FACTORY_DEF * TeeFactory FACTORY_NAME Counter_Counter INPUT FEATURE_TYPE Sorter_SORTED @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "_count" @Count(REJECTABLE,fme_encoded,$(Counter_FULL_DOMAIN),"0") FACTORY_DEF * TestFactory FACTORY_NAME Counter_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE Counter_ @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE Counter_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) FACTORY_DEF * TeeFactory FACTORY_NAME "Counter 输出Nuker“输入Feature_type计数器_ #---------------------------------------------------------------------- FME_PYTHON_PATH "$(FME_MF_DIR)" FACTORY_DEF * PythonFactory FACTORY_NAME PythonCaller_3 INPUT FEATURE_TYPE Creator_CREATED SYMBOL_NAME processFeature PYTHON_NAMESPACE FMEOBJECTS SOURCE_CODE import fme 进口 fmeobjects Template 功能 在terface: When 使用 function 制作 当然 它的 名称 is set as the 价值 the 班级 或者 功能 to Process 特征 变压器 范围 def Processfeature. feature : 进口 fme 进口 fmeobjects 为了 i s 枚举 希尔伯特_Curve. 16. : 为了 j v 枚举 s : feature.setattribute. _list2 %D. .sub %D. i j v pass OUTPUT PYOUTPUT FEATURE_TYPE PythonCaller_3_OUTPUT # ------------------------------------------------------------------------- FACTORY_DEF * ElementFactory FACTORY_NAME ListExploder INPUT FEATURE_TYPE PythonCaller_3_OUTPUT LIST_NAME "_list2{}" ELEMENT_NUMBER_FIELD "_element_index" CLONE_GEOMETRY ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "INCOMING_IF_CONFLICT" INCOMING_PREFIX " “输出元素FEATURE_TYPE ListExploder_ELEMENTS @RemoveAttributes(ElementFactory.baseCloned) # ------------------------------------------------------------------------- FACTORY_DEF * ElementFactory FACTORY_NAME ListExploder_2 INPUT FEATURE_TYPE ListExploder_ELEMENTS LIST_NAME "sub{}" ELEMENT_NUMBER_FIELD "_element_index" CLONE_GEOMETRY ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "INCOMING_IF_CONFLICT" INCOMING_PREFIX " “输出元素feature_type listexploder_2_elements @removeattributes(exporthfactory.basecloned)#--------------------------------------------------------------------------------------------------------------------------------------------------------因为@count本身将评估表达式来计算#域,我们不需要通过包含[Set DomainPrefix {};如果{{global} = {local}} {set domainprefix [fme_encodeText {corround_2_}];};看跌期权 “MACRO Counter_2_FULL_DOMAIN $ {domainPrefix}计数器1”;] FACTORY_DEF * TeeFactory FACTORY_NAME Counter_2_Counter INPUT FEATURE_TYPE ListExploder_2_ELEMENTS @RenameAttributes(FME_STRICT,___ fme_rejection_code ___,fme_rejection_code)OUTPUT FEATURE_TYPE ___TOREJECTOR___ “_count” @count(不合格,fme_encoded,$(Counter_2_FULL_DOMAIN),“0”)factory_def * testfactory factory_name countr_2_rectector输入feature_type ____toreporor___ test @value(fme_reimpting_code)!=“”输出传递Feature_type andert_2_ @removeattributes(___ fme_reimpe_code_code___)输出失败feature_type countr_2_output @renameattributes(fme_strict,fme_reempting_code_code______reempte_code___)factory_def * teefactory factory_name“counter_2 输出nuker“输入feature_type andert_2_ #--------------------------------------------------------------------____--} elsef {{attributes} == {geom_build} && { } == {polygons}} {puts“macro featuremerger_reference_info geom_build_polys”;} elsef {{attributes} == {geom_build} && { } == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && { } == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && { } == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && { } == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && { } == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] FACTORY_DEF * ReferenceFactory FACTORY_NAME FeatureMerger INPUT REFERENCER FEATURE_TYPE Counter_OUTPUT INPUT REFERENCEE FEATURE_TYPE Counter_2_OUTPUT REFERENCE_INFO $(FeatureMerger_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED, 价值 _数数 ,FeatureMerger) @EvaluateExpression(FDIV,STRING_ENCODED, 价值 _数数 HANDLE_CONFL FeatureMerger)汽车ATTR_ACCUM_MODE”ICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES No REFERENCEES_FIRST No OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_MERGED # ------------------------------------------------------------------------- FACTORY_DEF * SortFactory FACTORY_NAME Sorter_2 INPUT FEATURE_TYPE FeatureMerger_MERGED SORT_BY sub NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_2_SORTED # ------------------------------------------------------------------------- FACTORY_DEF * ConnectionFactory FACTORY_NAME PointConnector INPUT FEATURE_TYPE Sorter_2_SORTED ACCUM_INPUT_ATTRS One OUTPUT LINE FEATURE_TYPE PointConnector_LINE # ------------------------------------------------------------------------- # Set the directive to add all the meta-attributes to the features. # We do this so users see all possible information in the viewed # features. READER_META_ATTRIBUTES fme_feature_type fme_dataset fme_basename # Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir DEFAULT_MACRO WORKSPACE_TEMP_DIR INCLUDE [ set grpByAttrs {}; if { [string length $grpByAttrs] > 0 } { if { [string first "@EvaluateExpression" $grpByAttrs] == 0 } { puts "MACRO CATMAC _$grpByAttrs" ; } else { set catter "" ; set comma "" ; foreach attr $grpByAttrs { set catter "$catter$comma@Value(\"$attr\")" ; set comma ",_," ; } ; puts "MACRO CATMAC _@Concatenate($catter)" ; } } else { puts "MACRO CATMAC " ; }; set safeName "[regsub -all {[^a-zA-Z0-9]} {PointConnector_Line} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] # Make the temporary directory that the FFS files will live in. FACTORY_DEF * CreationFactory FACTORY_NAME PointConnector_Line_DirCreator OUTPUT FEATURE_TYPE __nukeme__ @Tcl2("catch {file mkdir {$(WORKSPACE_TEMP_DIR)}}") FACTORY_DEF * TeeFactory FACTORY_NAME PointConnector_Line_DirCreatorCleanerUpper INPUT FEATURE_TYPE __nukeme__ # Send raster, point cloud and vector features down different paths to prepare # them for viewing FACTORY_DEF * TestFactory FACTORY_NAME PointConnector_Line_FeatureDirector INPUT FEATURE_TYPE PointConnector_LINE TEST &fme_type == "fme_raster" OUTPUT FAILED FEATURE_TYPE PointConnector_Line___NotRasterFeatures___ OUTPUT PASSED FEATURE_TYPE PointConnector_Line___RasterFeatures___ FACTORY_DEF * TestFactory FACTORY_NAME PointConnector_Line___FeatureDirector1 INPUT FEATURE_TYPE PointConnector_Line___NotRasterFeatures___ TEST &fme_type == "fme_point_cloud" OUTPUT FAILED FEATURE_TYPE PointConnector_Line___VectorFeatures___ OUTPUT PASSED FEATURE_TYPE PointConnector_Line___PointCloudFeatures___ # Vector features simply may get their colors overridden FACTORY_DEF * TeeFactory FACTORY_NAME PointConnector_Line_VectorSetterUpper INPUT FEATURE_TYPE PointConnector_Line___VectorFeatures___ OUTPUT FEATURE_TYPE __viewme__ # Point Cloud Features Might Need to be thinned # Note that we don't call the ThinPointCloud function directly, but rather # do it through TCL. This should allow this transformer to be used with a # Desktop license, even though ThinPointCloud requires Professional. Tcl2 proc PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_thinPointCloud {} { if {[string equal {NO_THINNING} {KEEPNPOINT}]} { FME_Execute ThinPointCloud NO_THINNING "\" \ ";} elseif {[string equal {NO_THINNING} {MAXNUMPOINTS}]} { FME_Execute ThinPointCloud NO_THINNING "\" \ ";} elsef {[string等于{no_thinning} {firstnpoints}]} {fme_execute thinpointcloud no_thinning“\” \ ";} elseif {[string equal {NO_THINNING} {LASTNPOINTS}]} { FME_Execute ThinPointCloud NO_THINNING "\" \ ";};} FACTORY_DEF * TeeFactory FACTORY_NAME Po在tConnector_Line___PointCloudThinner INPUT FEATURE_TYPE PointConnector_Line___PointCloudFeatures___ OUTPUT FEATURE_TYPE __viewme__ @Tcl2("PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_thinPointCloud") Tcl2 proc PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_prepareRaster {subsetStartRow subsetNumRows subsetStartCol subsetNumCols} { set useDI [string equal -nocase {$(FME_VIEWER_APP)} {fmedatainspector}]; if {!$useDI} { FME_Execute ApplyRasterRotation BILINEAR; }; set doResample [string equal {NoReduction} {Resample}]; set doSubset [string equal {NoReduction} {Subset}]; set doBounds [string equal {NoReduction} {BoundingBoxOnly}]; if {$doBounds} { FME_Execute GeometryType fme_polygon; } elseif {$doResample || $doSubset} { set comment { First, we need to prefix all the attributes. This is done because we are going to call @RasterProperties, and we want to make sure it doesn't overwrite any existing attributes. }; set kAttrPrefix "."; set allNames [FME_AttributeNames]; foreach oldName $allNames { set newName $kAttrPrefix; append newName $oldName; FME_RenameAttribute $newName $oldName; }; FME_Execute RasterProperties RASTER; if {$doResample} { set oldNumCols [FME_GetAttribute _num_columns]; set oldNumRows [FME_GetAttribute _num_rows]; set oldSpacingX [FME_GetAttribute _spacing_x]; set oldSpacingY [FME_GetAttribute _spacing_y]; set kMinNumCells 32; set kMaxNumCells 512; set comment { We will only resample if both dimensions are greater than the minimum num cells, and at least one is greater than the maximum. }; if {$oldNumRows > $kMinNumCells && $oldNumCols > $kMinNumCells && ($oldNumRows > $kMaxNumCells || $oldNumCols > $kMaxNumCells)} { set newSpacingX 1.0; set newSpacingY 1.0; if {$oldNumRows > $oldNumCols} { set comment { If we have more rows than columns, we need to choose a spacing that reduces the number of rows to the maximum we've chosen. }; set newSpacingY [expr 1.0 * $oldNumRows * $oldSpacingY / $kMaxNumCells]; set newSpacingX [expr 1.0 * $newSpacingY / $oldSpacingY * $oldSpacingX]; set comment { Now we need to check if doing this will result in the columns going below the minimum. If so, choose the spacing such that we only go down to the minimum (and not past). }; set newNumCols [expr $oldNumCols * $oldSpacingX / $newSpacingX]; if {$newNumCols < $kMinNumCells} { set newSpacingX [expr 1.0 * $oldNumCols * $oldSpacingX / $kMinNumCells]; set newSpacingY [expr 1.0 * $newSpacingX / $oldSpacingX * $oldSpacingY]; }; } else { set comment { This is identical to the above case, except the roles of rows and cols are reversed. }; set newSpacingX [expr 1.0 * $oldNumCols * $oldSpacingX / $kMaxNumCells]; set newSpacingY [expr 1.0 * $newSpacingX / $oldSpacingX * $oldSpacingY]; set newNumRows [expr $oldNumRows * $oldSpacingY / $newSpacingY]; if {$newNumRows < $kMinNumCells} { set newSpacingY [expr 1.0 * $oldNumRows * $oldSpacingY / $kMinNumCells]; set newSpacingX [expr 1.0 * $newSpacingY / $oldSpacingY * $oldSpacingX]; }; }; FME_Execute ResampleRaster CELL_SIZE $newSpacingX $newSpacingY NearestNeighbor; }; } elseif {$doSubset} { set comment { Get the value of some strings that may be attributes or constants. Note that we pass in the attribute prefix we're using, because if one does turn out to be an attribute, it won't actually be the exact name in the string (since we renamed all our attributes above). }; set rasterNumRows [FME_GetAttribute _num_rows]; set rasterNumCols [FME_GetAttribute _num_columns]; set comment { Only do subsetting if the specified start position is actually within the raster. }; if {$subsetStartRow < $rasterNumRows && $subsetStartCol < $rasterNumCols} { set comment { Now bound the subset to the size of the raster, so that we don't create padding. }; if {[expr $subsetStartRow + $subsetNumRows] > $rasterNumRows} { set subsetNumRows [expr $rasterNumRows - $subsetStartRow]; }; if {[expr $subsetStartCol + $subsetNumCols] > $rasterNumCols} { set subsetNumCols [expr $rasterNumCols - $subsetStartCol]; }; FME_Execute SubsetRaster $subsetStartRow $subsetNumRows $subsetStartCol $subsetNumCols; }; }; set comment { Remove all the attributes added by @RasterProperties and remove the prefix from the real attributes. We assume they all start with an underscore. }; FME_Execute RemoveAttributes fme_regexp_match {^_}; foreach oldName $allNames { set newName $kAttrPrefix; append newName $oldName; FME_RenameAttribute $oldName $newName; }; }; } FACTORY_DEF * TeeFactory FACTORY_NAME PointConnector_Line_RasterSetterUpper INPUT FEATURE_TYPE PointConnector_Line___RasterFeatures___ OUTPUT FEATURE_TYPE __viewme__ @Tcl2("PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_prepareRaster { } { } { } { }”)#现在路线的所有特性到录音机, changing their # feature type to the transformer name so that they view nicely # PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_VIS_FEAT_TYPE changes the feature types # of the features being visualized. DEFAULT_MACRO PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_VIS_FEAT_TYPE PointConnector_Line$(CATMAC) DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO # [PR#45549] The Data Inspector will limit the maximum number of features # it reads on WIN32, so we will correspondingly limit the number of # features we record here using the MAX_FEATURES_TO_RECORD directive. FACTORY_DEF * RecorderFactory FACTORY_NAME PointConnector_Line_Recorder INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType($(PointConnector_Line_fb4439ef_9439_465a_a004_b79ed75ecf7c1_VIS_FEAT_TYPE)) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA _column,varchar 255 ,_row,varchar 255 ,_count,varchar 255 ,_creation_instance,varchar 255 ,_list2,varchar 255 ,sub,varchar 255 ,_element_index,varchar 255 MODE RECORD RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 # ------------------------------------------------------------------------- FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") # ------------------------------------------------------------------------- FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ # ------------------------------------------------------------------------- FACTORY_DEF * CreationFactory CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS $theFile & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") FACTORY_DEF * TeeFactory INPUT FEATURE_TYPE __NUKEME__