Update traitements_phase_3_decoupage.fmw
modification sur la couche trace_secteur (généralisation pour JSON umap)
This commit is contained in:
parent
af25639ba5
commit
422e522d1a
|
@ -8,7 +8,7 @@
|
|||
# --DestDataset_POSTGIS "breizhpolenovo<at>redadeg"
|
||||
# --SourceDataset_POSTGIS "breizhpolenovo<at>redadeg"
|
||||
# --SourceDataset_POSTGRES "breizhpolenovo<at>redadeg"
|
||||
# --postgres_sql_where_clause "id<space>=<space>30"
|
||||
# --postgres_sql_where_clause ""
|
||||
#
|
||||
#! ATTR_TYPE_ENCODING="SDF"
|
||||
#! BEGIN_PYTHON=""
|
||||
|
@ -23,8 +23,8 @@
|
|||
#! END_TCL=""
|
||||
#! EXPLICIT_BOOKMARK_ORDER="false"
|
||||
#! FME_BUILD_NUM="18592"
|
||||
#! FME_DOCUMENT_GUID="0a67c2df-8a2f-4f57-9949-8e922409485f"
|
||||
#! FME_DOCUMENT_PRIORGUID="696c9d7c-e37d-4232-b9cf-4183183cacd1,75bea4c9-a241-4c15-b15f-d04ed56c4dc9"
|
||||
#! FME_DOCUMENT_GUID="f6d95960-7dda-46c7-8546-119d6e5eb63b"
|
||||
#! FME_DOCUMENT_PRIORGUID="696c9d7c-e37d-4232-b9cf-4183183cacd1,75bea4c9-a241-4c15-b15f-d04ed56c4dc9,0a67c2df-8a2f-4f57-9949-8e922409485f"
|
||||
#! FME_GEOMETRY_HANDLING="Enhanced"
|
||||
#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto"
|
||||
#! FME_REPROJECTION_ENGINE="FME"
|
||||
|
@ -33,7 +33,7 @@
|
|||
#! HISTORY=""
|
||||
#! IGNORE_READER_FAILURE="No"
|
||||
#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)"
|
||||
#! LAST_SAVE_DATE="2020-02-16T19:37:35"
|
||||
#! LAST_SAVE_DATE="2020-02-17T00:08:01"
|
||||
#! LOG_FILE=""
|
||||
#! LOG_MAX_RECORDED_FEATURES="200"
|
||||
#! MARKDOWN_DESCRIPTION=""
|
||||
|
@ -51,7 +51,7 @@
|
|||
#! TITLE=""
|
||||
#! USAGE=""
|
||||
#! USE_MARKDOWN=""
|
||||
#! VIEW_POSITION="-8609.3 1334.22"
|
||||
#! VIEW_POSITION="-8609.3 1330.28"
|
||||
#! WARN_INVALID_XFORM_PARAM="Yes"
|
||||
#! WORKSPACE_VERSION="1"
|
||||
#! ZOOM_SCALE="76"
|
||||
|
@ -70,7 +70,7 @@
|
|||
#! WRITE_DEFS="true"
|
||||
#! DEFLINE_TEMPLATE="postgres_type {FME_GEN_GEOMETRY} postgres_sql_where_clause "" postgres_sql_statement """
|
||||
#! DEFLINE_ATTRS="true"
|
||||
#! EXPOSABLE_ATTRS="fme_rotation float8 fme_type char(50) multi_reader_full_id int4 fme_geometry char(50) postgres_type char(50) fme_start_angle float8 fme_text_string char(50) multi_reader_type char(50) multi_reader_keyword char(50) multi_reader_id int4 fme_feature_type char(50) fme_text_size float8 fme_fill_color char(50) fme_basename char(50) fme_primary_axis float8 fme_color char(50) fme_secondary_axis float8 postgres_oid int4 fme_sweep_angle float8 fme_dataset char(50)"
|
||||
#! EXPOSABLE_ATTRS="fme_rotation float8 fme_type char(50) multi_reader_full_id int4 fme_geometry char(50) postgres_type char(50) fme_start_angle float8 fme_text_string char(50) multi_reader_type char(50) fme_feature_type char(50) multi_reader_keyword char(50) multi_reader_id int4 fme_text_size float8 fme_fill_color char(50) fme_basename char(50) fme_primary_axis float8 fme_color char(50) fme_secondary_axis float8 postgres_oid int4 fme_sweep_angle float8 fme_dataset char(50)"
|
||||
#! DEFLINE_PARMS=""GUI OPTIONAL NAMEDGROUP postgres_query_settings_group postgres_sql_where_clause%postgres_sql_statement Table" "" "GUI OPTIONAL TEXT_EDIT_SQL_CFG postgres_sql_where_clause MODE,WHERE;FORMAT,POSTGRES WHERE Clause" "" "GUI OPTIONAL TEXT_EDIT_SQL_CFG postgres_sql_statement MODE,SQL;FORMAT,POSTGRES SELECT Statement" "" "
|
||||
#! ATTR_INDEX_TYPES="BTree RTree Hash PrimaryKey"
|
||||
#! ATTR_NAME_INVALID_CHARS=""
|
||||
|
@ -140,7 +140,7 @@
|
|||
#! WRITE_DEFS="true"
|
||||
#! DEFLINE_TEMPLATE="postgis_sql_where_clause "" postgis_sql_statement """
|
||||
#! DEFLINE_ATTRS="true"
|
||||
#! EXPOSABLE_ATTRS="fme_rotation float8 postgis_type char(50) fme_type char(50) multi_reader_full_id int4 fme_geometry char(50) postgis_collection_id int4 fme_start_angle float8 fme_text_string char(50) multi_reader_type char(50) multi_reader_keyword char(50) multi_reader_id int4 fme_feature_type char(50) fme_text_size float8 fme_fill_color char(50) fme_basename char(50) fme_primary_axis float8 fme_color char(50) postgis_collection_part_id int4 fme_secondary_axis float8 postgres_oid int4 fme_sweep_angle float8 fme_dataset char(50)"
|
||||
#! EXPOSABLE_ATTRS="fme_rotation float8 postgis_type char(50) fme_type char(50) multi_reader_full_id int4 fme_geometry char(50) postgis_collection_id int4 fme_start_angle float8 fme_text_string char(50) multi_reader_type char(50) fme_feature_type char(50) multi_reader_keyword char(50) multi_reader_id int4 fme_text_size float8 fme_fill_color char(50) fme_basename char(50) fme_primary_axis float8 fme_color char(50) postgis_collection_part_id int4 fme_secondary_axis float8 postgres_oid int4 fme_sweep_angle float8 fme_dataset char(50)"
|
||||
#! DEFLINE_PARMS=""GUI OPTIONAL NAMEDGROUP postgis_query_settings_group postgis_sql_where_clause%postgis_sql_statement Table" "" "GUI OPTIONAL TEXT_EDIT_SQL_CFG postgis_sql_where_clause MODE,WHERE;FORMAT,POSTGIS WHERE Clause" "" "GUI OPTIONAL TEXT_EDIT_SQL_CFG postgis_sql_statement MODE,SQL;FORMAT,POSTGIS SELECT Statement" "" "
|
||||
#! ATTR_INDEX_TYPES="BTree RTree Hash PrimaryKey"
|
||||
#! ATTR_NAME_INVALID_CHARS=""
|
||||
|
@ -2029,7 +2029,7 @@
|
|||
#! />
|
||||
#! <GLOBAL_PARAMETER
|
||||
#! GUI_LINE="GUI OPTIONAL TEXT_EDIT_SQL_CFG postgres_sql_where_clause MODE,WHERE;FORMAT,POSTGRES;FORMAT,POSTGRES;DATASET,breizhpolenovo<lt>at<gt>redadeg;CONNECTION_PARAMS,FEATURES_PER_FETCH<comma>10000<comma>SCHEMAS_FOR_TABLE_LISTING<comma>public<comma>NAMED_CONNECTION<comma>breizhpolenovo<lt>at<gt>redadeg<comma>READ_TIME_WITH_TIMEZONE<comma>Yes<comma>_MERGE_SCHEMAS<comma>YES<comma>QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS<comma>Yes;START_TABLE,public.secteur secteur WHERE Clause:"
|
||||
#! DEFAULT_VALUE="id<space>=<space>30"
|
||||
#! DEFAULT_VALUE=""
|
||||
#! IS_STAND_ALONE="false"
|
||||
#! />
|
||||
#! <GLOBAL_PARAMETER
|
||||
|
@ -2179,7 +2179,7 @@
|
|||
#! BOUNDING_RECT="2088.1760299278385 -430.10899862608744 1379.4596708853696 444.59207478672715"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.72156862745098038,0.23529411764705882,0.40392156862745099"
|
||||
#! CONTENTS="26 82 40 103 22 "
|
||||
#! CONTENTS="103 22 82 40 26 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! <BOOKMARK
|
||||
|
@ -2192,7 +2192,7 @@
|
|||
#! BOUNDING_RECT="-1410.4716186105015 -417.22227182067513 3409.0204636066978 457.47880159213946"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.76470588235294112,0.035294117647058823,0.18431372549019609"
|
||||
#! CONTENTS="85 24 78 23 81 20 84 27 25 "
|
||||
#! CONTENTS="81 20 23 85 25 27 78 84 24 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! <BOOKMARK
|
||||
|
@ -2205,7 +2205,7 @@
|
|||
#! BOUNDING_RECT="2088.1760299278385 -1006.7889402613894 1379.4596708853696 444.59207478672715"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.72156862745098038,0.23529411764705882,0.40392156862745099"
|
||||
#! CONTENTS="92 41 104 34 33 "
|
||||
#! CONTENTS="41 104 33 34 92 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! <BOOKMARK
|
||||
|
@ -2218,7 +2218,7 @@
|
|||
#! BOUNDING_RECT="8859.1164483812754 -1663.1289303374299 3529.091141975252 2545.299264897626"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.61568627450980395,0.4392156862745098,0.34509803921568627"
|
||||
#! CONTENTS="3 98 36 101 59 44 100 8 47 43 135 99 106 113 2 "
|
||||
#! CONTENTS="135 106 47 3 36 101 59 8 99 43 98 113 2 44 100 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! <BOOKMARK
|
||||
|
@ -2231,7 +2231,7 @@
|
|||
#! BOUNDING_RECT="-1440.2298255088526 -939.56139802267512 3409.0204636066978 457.47880159213946"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.76470588235294112,0.035294117647058823,0.18431372549019609"
|
||||
#! CONTENTS="32 88 86 87 28 31 30 89 29 "
|
||||
#! CONTENTS="32 87 88 28 29 31 86 89 30 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! <BOOKMARK
|
||||
|
@ -2244,7 +2244,7 @@
|
|||
#! BOUNDING_RECT="6568.4685419022144 -1607.4510985075665 1318.7631876318756 1159.3865938659383"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.066666666666666666,0.63921568627450975,0.49411764705882355"
|
||||
#! CONTENTS="108 56 114 117 116 55 51 50 52 "
|
||||
#! CONTENTS="116 55 117 51 50 56 114 52 108 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! </BOOKMARKS>
|
||||
|
@ -3109,12 +3109,12 @@
|
|||
#! <XFORM_ATTR ATTR_NAME="km_redadeg" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="troncon_id" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="longueur" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords{}" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coordinates" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_vertex_count" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="x_coords_vertex" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="y_coords_vertex" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coordinates" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords{}" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords" IS_USER_CREATED="false" FEAT_INDEX="0" />
|
||||
#! <OUTPUT_FEAT NAME="DUPLICATE"/>
|
||||
#! <FEAT_COLLAPSED COLLAPSED="1"/>
|
||||
#! <XFORM_ATTR ATTR_NAME="position_vertex" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
|
@ -3125,12 +3125,12 @@
|
|||
#! <XFORM_ATTR ATTR_NAME="km_redadeg" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="troncon_id" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="longueur" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords{}" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coordinates" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_vertex_count" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="x_coords_vertex" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="y_coords_vertex" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coordinates" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords{}" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_ATTR ATTR_NAME="_coords" IS_USER_CREATED="false" FEAT_INDEX="1" />
|
||||
#! <XFORM_PARM PARM_NAME="INPUT_ORDERED_CHOICE" PARM_VALUE="No"/>
|
||||
#! <XFORM_PARM PARM_NAME="KEYATTR" PARM_VALUE="y_coords_vertex x_coords_vertex"/>
|
||||
#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/>
|
||||
|
@ -5950,7 +5950,7 @@
|
|||
#! BOUNDING_RECT="1809.25 -180.00200000000001 618.57799999999997 426.24900000000002"
|
||||
#! STICKY="true"
|
||||
#! COLOUR="0.81960784313725488,0.26666666666666666,0.81960784313725488"
|
||||
#! CONTENTS="15 12 "
|
||||
#! CONTENTS="12 15 "
|
||||
#! >
|
||||
#! </BOOKMARK>
|
||||
#! </BOOKMARKS>
|
||||
|
@ -6487,7 +6487,7 @@ DEFAULT_MACRO SourceDataset_POSTGIS breizhpolenovo<at>redadeg
|
|||
GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection:
|
||||
DEFAULT_MACRO SourceDataset_POSTGRES breizhpolenovo<at>redadeg
|
||||
GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES FMT:POSTGRES%FAMILY:PostgreSQL Connection:
|
||||
DEFAULT_MACRO postgres_sql_where_clause id<space>=<space>30
|
||||
DEFAULT_MACRO postgres_sql_where_clause
|
||||
GUI OPTIONAL TEXT_EDIT_SQL_CFG postgres_sql_where_clause MODE,WHERE;FORMAT,POSTGRES;FORMAT,POSTGRES;DATASET,breizhpolenovo<lt>at<gt>redadeg;CONNECTION_PARAMS,FEATURES_PER_FETCH<comma>10000<comma>SCHEMAS_FOR_TABLE_LISTING<comma>public<comma>NAMED_CONNECTION<comma>breizhpolenovo<lt>at<gt>redadeg<comma>READ_TIME_WITH_TIMEZONE<comma>Yes<comma>_MERGE_SCHEMAS<comma>YES<comma>QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS<comma>Yes;START_TABLE,public.secteur secteur WHERE Clause:
|
||||
DEFAULT_MACRO START 13
|
||||
GUI IGNORE OPTIONAL INT START Count Start:
|
||||
|
@ -6959,8 +6959,8 @@ FACTORY_DEF {*} ArcFactory FACTORY_NAME LineCombiner INPUT FEATURE_TYPE S
|
|||
DEFAULT_MACRO _WB_BYPASS_TERMINATION No
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME LineCombiner_<Rejected> INPUT FEATURE_TYPE LineCombiner_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LineCombiner<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>)
|
||||
# -------------------------------------------------------------------------
|
||||
INCLUDE [ set macroLine "MACRO AttributeKeeper_2_5b200fc2_562c_474a_91da_6bf03545435014_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ]
|
||||
FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeKeeper_2 INPUT FEATURE_TYPE LineCombiner_LINE OUTPUT { FEATURE_TYPE AttributeKeeper_2_OUTPUT @KeepAttributes(fme_encoded,objectif_km,km_redadeg,secteur_id,fme_pcre_match,"^fme_$(AttributeKeeper_2_5b200fc2_562c_474a_91da_6bf03545435014_LIST_EXP)") }
|
||||
INCLUDE [ set macroLine "MACRO AttributeKeeper_2_0a231c25_5f4a_43c4_a25a_0cc796eb52d61_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ]
|
||||
FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeKeeper_2 INPUT FEATURE_TYPE LineCombiner_LINE OUTPUT { FEATURE_TYPE AttributeKeeper_2_OUTPUT @KeepAttributes(fme_encoded,objectif_km,km_redadeg,secteur_id,fme_pcre_match,"^fme_$(AttributeKeeper_2_0a231c25_5f4a_43c4_a25a_0cc796eb52d61_LIST_EXP)") }
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeKeeper_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT OUTPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT_0_muAz4GqwTdk= OUTPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT_1_eKOY+pR0mH0=
|
||||
# -------------------------------------------------------------------------
|
||||
# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir
|
||||
|
@ -6994,8 +6994,8 @@ MACRO $(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE ToLength
|
|||
MACRO $(IterativeSnipper_WORKSPACE_NAME)_SnipLength @Value(km_redadeg)
|
||||
DEFAULT_MACRO IterativeSnipper_WORKSPACE_NAME ""
|
||||
INCLUDE [puts {MACRO WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME) $(WB_CURRENT_CONTEXT)}; puts {MACRO WB_CURRENT_CONTEXT $(IterativeSnipper_WORKSPACE_NAME)}]
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Input1581878255 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581878255 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Input1581894481 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581894481 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT"
|
||||
# -------------------------------------------------------------------------
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1")
|
||||
|
@ -7014,8 +7014,8 @@ FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Geom
|
|||
FACTORY_DEF $(INSTANCE_FILTERING) TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InstanceTest INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ TEST @Geometry(IS_GEOMETRY_INSTANCE) == 1 OUTPUT PASSED FEATURE_TYPE $(OUTPUT_INSTANCE_FTYPE) OUTPUT FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___
|
||||
FACTORY_DEF $(COLLECTION_HANDLING) TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_CollectionTest INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ TEST &fme_type == "fme_collection" OUTPUT FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ OUTPUT PASSED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___
|
||||
FACTORY_DEF $(COLLECTION_HANDLING) DeaggregateFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Deagg INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ HOMOGENIZE_COLLECTIONS YES RECURSIVE YES SET_FME_TYPE YES INSTANTIATE_GEOMETRY_INSTANCES_NEW <Unused> OUTPUT POINT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT LINE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT POLYGON FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT DONUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT AGGREGATE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterPrepper INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ OUTPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_7336df61_5fa6_4976_bac3_0851e131bae614_targetFeatureType @Lookup($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable,&fme_type)
|
||||
FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Router INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ TEST @Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_7336df61_5fa6_4976_bac3_0851e131bae614_targetFeatureType) != "not_selected" OUTPUT PASSED FEATURE_TYPE * @FeatureType(@Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_7336df61_5fa6_4976_bac3_0851e131bae614_targetFeatureType)) @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_7336df61_5fa6_4976_bac3_0851e131bae614_targetFeatureType) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_<UNFILTERED>" @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_7336df61_5fa6_4976_bac3_0851e131bae614_targetFeatureType)
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterPrepper INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ OUTPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_aebc6eb8_de87_4356_bc0e_ff055bb319ef1_targetFeatureType @Lookup($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable,&fme_type)
|
||||
FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Router INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ TEST @Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_aebc6eb8_de87_4356_bc0e_ff055bb319ef1_targetFeatureType) != "not_selected" OUTPUT PASSED FEATURE_TYPE * @FeatureType(@Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_aebc6eb8_de87_4356_bc0e_ff055bb319ef1_targetFeatureType)) @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_aebc6eb8_de87_4356_bc0e_ff055bb319ef1_targetFeatureType) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_<UNFILTERED>" @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_aebc6eb8_de87_4356_bc0e_ff055bb319ef1_targetFeatureType)
|
||||
# -------------------------------------------------------------------------
|
||||
FACTORY_DEF {*} AttrSetFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_<UNFILTERED>" MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "fme_rejection_code" "SET_TO" "INVALID_GEOMETRY_TYPE" } OUTPUT OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT"
|
||||
# -------------------------------------------------------------------------
|
||||
|
@ -7055,9 +7055,9 @@ FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Snippe
|
|||
# -------------------------------------------------------------------------
|
||||
INCLUDE [ set macroLine "MACRO $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ]
|
||||
FACTORY_DEF {*} TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" OUTPUT { FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" @RemoveAttributes(fme_encoded,Iterative_Snipper_length,Iterative_Snipper_maxLength) @RemoveAttributes(fme_pcre_match"$($(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_EXP)") }
|
||||
FACTORY_DEF * BranchingFactory TARGET_FACTORY "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581878255 Input Splitter" FACTORY_NAME "Loop to $(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581878255 Input Splitter" MAXIMUM_COUNT -1 INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Output1581878255 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Output"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_<Rejected>1581878255 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_<Rejected>"
|
||||
FACTORY_DEF * BranchingFactory TARGET_FACTORY "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581894481 Input Splitter" FACTORY_NAME "Loop to $(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581894481 Input Splitter" MAXIMUM_COUNT -1 INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Output1581894481 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Output"
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_<Rejected>1581894481 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_<Rejected>"
|
||||
INCLUDE [puts {MACRO WB_CURRENT_CONTEXT $(WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME))}]
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_Output OUTPUT FEATURE_TYPE IterativeSnipper_Output
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper <Rejected> Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_<Rejected> OUTPUT FEATURE_TYPE IterativeSnipper_<Rejected>
|
||||
|
@ -7099,7 +7099,7 @@ Tcl2 set {CoordinateConcatenator_elementDelim} [FME_DecodeText {<comma>}];
|
|||
Tcl2 proc CoordinateConcatenator_coord_list {DIM} { global {CoordinateConcatenator_coordDelim}; global {CoordinateConcatenator_elementDelim}; set numCoords [FME_Coordinates numCoords]; set output {}; set includeX [string first {X} {Y X} ]; set includeY [string first {Y} {Y X} ]; set includeZ [string first {Z} {Y X} ]; if { $includeX == -1 && $includeY == -1 && $includeZ == -1 } { FME_SetAttribute _coordinates $output; return; }; for {set i 0} {$i < $numCoords} {incr i} { if {$includeX != -1} { append output [FME_Coordinates getCoord x $i]; }; if {$includeY != -1} { if {$includeX != -1} { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord y $i]; } else { append output [FME_Coordinates getCoord y $i]; }; }; if { $DIM == 3 && $includeZ != -1 } { if { $includeX != -1 || $includeY != -1 } { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord z $i]; } else { append output [FME_Coordinates getCoord z $i]; }; }; if {$i < ($numCoords - 1)} { append output [set {CoordinateConcatenator_coordDelim}] }; }; FME_SetAttribute _coordinates $output; }
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME CoordinateConcatenator INPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT @Tcl2("CoordinateConcatenator_coord_list @Dimension()")
|
||||
# -------------------------------------------------------------------------
|
||||
Tcl2 set AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitDelim [FME_DecodeText {|}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitDelim]] } { set AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitWidths [split [regsub -all {s$} {|} {}] s]; proc AttributeSplitter_doSplit {} { global AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set attrNum 0; set listName [FME_DecodeText {_coords}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_doSplit {} { global AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitDelim; set delim [set AttributeSplitter_38e3600d_3724_4b89_9ec7_7939408b1df814_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } }
|
||||
Tcl2 set AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitDelim [FME_DecodeText {|}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitDelim]] } { set AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitWidths [split [regsub -all {s$} {|} {}] s]; proc AttributeSplitter_doSplit {} { global AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set attrNum 0; set listName [FME_DecodeText {_coords}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_doSplit {} { global AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitDelim; set delim [set AttributeSplitter_648e45da_6325_4e6d_a442_6ae1a9a6a3a31_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } }
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter INPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_OUTPUT @Tcl2(AttributeSplitter_doSplit)
|
||||
# -------------------------------------------------------------------------
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME ListElementCounter INPUT FEATURE_TYPE AttributeSplitter_OUTPUT OUTPUT FEATURE_TYPE ListElementCounter_OUTPUT "_vertex_count" @NumElements("_coords<opencurly><closecurly>",ENCODED)
|
||||
|
@ -7113,7 +7113,7 @@ FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_ListIndexer INPUT FEA
|
|||
DEFAULT_MACRO _WB_BYPASS_TERMINATION No
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_4_<Rejected> INPUT FEATURE_TYPE ListIndexer_4_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_4<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>)
|
||||
# -------------------------------------------------------------------------
|
||||
Tcl2 set AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitDelim [FME_DecodeText {<comma>}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitDelim]] } { set AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitWidths [split [regsub -all {s$} {<comma>} {}] s]; proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitDelim; set delim [set AttributeSplitter_3_16c82498_a279_4be9_b2e6_3a464d3277c714_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } }
|
||||
Tcl2 set AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitDelim [FME_DecodeText {<comma>}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitDelim]] } { set AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitWidths [split [regsub -all {s$} {<comma>} {}] s]; proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitDelim; set delim [set AttributeSplitter_3_c9da61c2_fb49_4851_8fc1_1909ca47b95f1_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } }
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_3 INPUT FEATURE_TYPE ListIndexer_4_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT @Tcl2(AttributeSplitter_3_doSplit)
|
||||
# -------------------------------------------------------------------------
|
||||
Tcl2 proc ListIndexer_5_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; }
|
||||
|
@ -7146,7 +7146,7 @@ FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_ListIndexer INPUT FEATU
|
|||
DEFAULT_MACRO _WB_BYPASS_TERMINATION No
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_<Rejected> INPUT FEATURE_TYPE ListIndexer_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>)
|
||||
# -------------------------------------------------------------------------
|
||||
Tcl2 set AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitDelim [FME_DecodeText {<comma>}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitDelim]] } { set AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitWidths [split [regsub -all {s$} {<comma>} {}] s]; proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitDelim; set delim [set AttributeSplitter_2_ad842b3a_1b53_4be0_8547_69c28bb4005714_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } }
|
||||
Tcl2 set AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitDelim [FME_DecodeText {<comma>}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitDelim]] } { set AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitWidths [split [regsub -all {s$} {<comma>} {}] s]; proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitDelim; set delim [set AttributeSplitter_2_c3106493_f3c3_44ee_80fc_1bb72a001d381_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } }
|
||||
FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_2 INPUT FEATURE_TYPE ListIndexer_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT @Tcl2(AttributeSplitter_2_doSplit)
|
||||
# -------------------------------------------------------------------------
|
||||
Tcl2 proc ListIndexer_2_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; }
|
||||
|
|
Loading…
Reference in a new issue