几何表示法

正如前面提到的,SEF特性可以有非常复杂的几何类型。在每个特性中都有许多组件。为了处理每个组件内部的几何图形,SEF编写器要求所有与坐标相关的几何属性都存储在SEF特性的FME几何图形中。如果有多个图形组件,那么SEF作者希望所有的SEF特性都是聚合的。根据经验,如果一个特性有多个图形组件,则必须将该特性聚合在一起。

例如,如果我们要构造一条具有用户定义属性的两点线,因为该特性包含一个几何组件,我们可以做以下任何一种:

控件构造这两个组件sef_component {}表结构。通过这种方式,用户可以精确地控制属性属于哪个组件部分。

FACTORY_DEF * CreationFactoy \ 2D_GEOMETRY 1 1 2 2 \ CREATE_AT_END \ NUMBER_TO_CREATE 1 \ OUTPUT FEATURE_TYPE feat \ sef_component{0}。Sef_type sef_line \ sef_component{0}。streetName "Dow St" \ sef_component{0}。sef_lbl lineComponent \ sef_component{1}。Sef_type sef_nongraphic \ sef_component{1}。streetNumber 6 \ sef_component{1}。sef_lbl ngComponent

输出文件的结果特性是:

壮举{lbl =“壮举”;圣= " ";cmp {lbl = " lineComponent”;typ =线;att {streetName=“道街”;} /* att section */ geo {fst_pnt=1,1;snd_pnt = 2, 2;} /* geo section */} /* cmp section */ cmp {lbl="ngComponent";typ = n_g;丙氨酸{streetNumber =“6”; }/* att section */ } /* cmp section */ } /* feat */

只指定图形组件(两点线)。所有其他用户定义的属性将自动归入图形组件部分之前的组件部分。

FACTORY_DEF * CreationFactory \ 2D_GEOMETRY 1 1 2 2 \ CREATE_AT_END \ NUMBER_TO_CREATE 1 \ OUTPUT FEATURE_TYPE feat \ sef_type sef_line \ sef_lbl lineComponent \ streetName“道街”\ streetNumber 6

输出文件的结果特性是:

壮举{lbl =“壮举”;圣= " ";cmp {lbl = " ngComponent”;typ = n_g;丙氨酸{streetNumber =“6”;streetName = "陶氏圣”;} /* att section */} /* cmp section */ cmp {lbl="ngComponent";typ =线;geo {fst_pnt = 1, 1;snd_pnt = 2, 2; }/* geo section */ } /* cmp section */ } /* feat */

如果我们要构造一个具有多个几何成分的特征(例如,一条曲线和一条复杂的线),我们就必须使用AggregateFactory将不同的几何图形聚合在一起:

#一条曲线。FACTORY_DEF * CreationFactory \ 2D_GEOMETRY 1 1 2 2 3 3 4 4 1 \ CREATE_AT_END \ NUMBER_TO_CREATE 1 \ OUTPUT FEATURE_TYPE aggregate3 \ sef_type sef_curve \ roadname 1st #一个两个点的线强迫成一个复杂的#字符串。FACTORY_DEF * CreationFactory \ 2D_GEOMETRY 1 12 2 \ CREATE_AT_END \ NUMBER_TO_CREATE 1 \ OUTPUT FEATURE_TYPE aggregate3 \ sef_type sef_line \ sef_element_type 12 \ signnumber 4 #聚合工厂将曲线#和复杂字符串聚合在一起。FACTORY_DEF * AggregateFactory \ INPUT FEATURE_TYPE aggregate3 \ LIST_NAME sef_component{} \ OUTPUT AGGREGATE FEATURE_TYPE aggregate3

输出文件的结果特性是:

壮举{lbl = " aggregate3”;圣= " ";cmp {lbl = " ";typ = crv;丙氨酸{roadname =“1”;} /* att section */ geo {num_pnts=4;Pnts =1,1: 2,2: 3,3: 4,4;} /* geo section */} /* CMP section */ CMP {lbl="";typ = cplx_str;丙氨酸{signnumber =“4”; elm_cnt=1; } /* att section */ subtype=str; { geo { num_pnts=2; pnts=1,1 : 2,2; } /* geo section */ } /* subtype section */ } /* cmp section */ } /* feat */