SEF Feature Examples

SEF Workset Info Feature

FACTORY_DEF * CreationFactory \
	CREATE_AT_END \
	NUMBER_TO_CREATE 1 \
	OUTPUT FEATURE_TYPE sef_header_feature \
		sef_feature sef_workset_info \
		sef_workset_type READ_ONLY \
		sef_segment{0} segment1

The output feature is:

workset_info
{
	name="sef_header";
	type=READ_ONLY;	/* If changed to ALTERNATE_SCHEMA, add a schema tag */
	segment="segment1";
}

A reference feature with a complex string, a text and a symbol component. Note that all the graphical components are turned into graphical feature references.

# curve subtype for complex string
FACTORY_DEF * CreationFactory \
	2D_GEOMETRY 1 1 2 2 3 3 4 4 \
	CREATE_AT_END \
	NUMBER_TO_CREATE 1 \
	OUTPUT FEATURE_TYPE aggregate4 \
			sef_type sef_curve \
			sef_out_of_scope  begin 


# 2 point line subtype for complex string
FACTORY_DEF * CreationFactory \
	2D_GEOMETRY 1 1 2 2 \
	CREATE_AT_END \
	NUMBER_TO_CREATE 1 \
	OUTPUT FEATURE_TYPE aggregate4 \
			sef_type sef_line \                         
			sef_out_of_scope begin       

# Aggregate the curve and the 2 point line together into
# a complex line. The shared attributes of the above
# component (“streetName” for example) should be added
# here.
FACTORY_DEF * AggregateFactory \
	INPUT FEATURE_TYPE aggregate4 \
	LIST_NAME sef_component{} \
	OUTPUT AGGREGATE FEATURE_TYPE aggregate4 \
			sef_type sef_line \
			sef_lbl	 pier \
			sef_element_type 12 \
			sef_out_of_scope begin \
			sef_dgn dgnfile	 \
			sef_map  mapid \
			sef_transaction{0} ADD \
			sef_transaction{1} OUTSTANDING \
			sef_rbprmry gid \
			sef_rbscndry  ufid \
			sef_segment segment	\
			sef_tsetid id \
			sef_mrflag mrflag \
			sef_dgntype 1 \
			streetName "Royal Ave"

# Text.                    
FACTORY_DEF * CreationFactory	\
2D_GEOMETRY 1 1 \
	CREATE_AT_END \
	NUMBER_TO_CREATE 1 \
	OUTPUT FEATURE_TYPE aggregate4 \
		sef_lbl road \
		sef_type sef_text \
		sef_ch 11 \
		sef_font 12 \
		sef_height 13 \
		sef_justification 14 \
		sef_width 15 \
		sef_rot	16 \
		sef_insert_pt_x 17 \
		sef_insert_pt_y 18 \
		sef_level 19 \
		sef_color 20 \
		sef_style 21 \
		sef_weight 22 \
		sef_out_of_scope begin  

#symbol.                    
FACTORY_DEF * CreationFactory 	\
	2D_GEOMETRY 1 1	\
	CREATE_AT_END \
	NUMBER_TO_CREATE 1 \
	OUTPUT FEATURE_TYPE aggregate4 \
		sef_type sef_symbol \
		sef_lbl symbol 	\
		sef_character 255 \
		sef_font 127 \
		sef_height 10 \
		sef_justification 14 \
		sef_width 15 \
		sef_rot 16 \
		sef_insert_pt_x	2 \
		sef_insert_pt_y	2 \
		sef_level 60 \
		sef_color 16 \
		sef_style 17 \
		sef_weight 18 \
		sef_dgn	dgn \
		sef_out_of_scope end \
		sef_rbscndry id \
		sef_rbprmry id 

# This makes the reference feature.
FACTORY_DEF * AggregateFactory \
	INPUT FEATURE_TYPE aggregate4 \
	LIST_NAME sef_component{} \
	OUTPUT AGGREGATE FEATURE_TYPE aggregate4 \
		sef_feature sef_ref_feat \
		sef_st{0} state1 \
		sef_st{1} state2 \
		sef_ref_key refid \
		sef_reload NO_RELOAD \
		sef_wid  wid \
		sef_schema_no  num 

The resulting reference feature is:

ref_feat
{
	lbl="aggregate4";
	st="state1";
	st="state2";
	ref_key="refid";
	reload="NO_RELOAD";	/* DO NOT MODIFY */
	wid="wid";	/* DO NOT MODIFY */
	schema_no="num";	/* DO NOT MODIFY */\
	gr_feat_ref
	{
		dgn="dgnfile";
		map="mapid";
		transaction="ADD";	/* DO NOT MODIFY */
		transaction="OUTSTANDING";	/* DO NOT MODIFY */
		rbprmry="gid";
		rbscndry="ufid";
		segment="segment";	/* DO NOT MODIFY */
		tsetid="id";
		mrflag="mrflag";
		dgntype="1";
		cmp { lbl="pier"; typ=cplx_str;
			out_of_scope=begin;
			att
			{
				streetName="Royal Ave";
				elm_cnt=2;
			}	/* att section */
			subtype=crv;
			{
				geo
				{
					num_pnts=4;
					pnts=1,1 : 
						2,2 : 
						3,3 : 
						4,4;
				}	/* geo section */
			}	/* subtype section */
			subtype=line;
			{
				geo
				{
					fst_pnt=1,1;
					snd_pnt=2,2;
				}	/* geo section */
			}	/* subtype section */
		}	/* cmp section */
	}	/* gr_feat_ref*/
	gr_feat_ref
	{
		cmp { lbl="road"; typ=txt;
			out_of_scope=begin;
			att
			{
				weight=22;
				level=19;
				text_justification=14;
				text_width=15;
				text_font=12;
				text_ch="11";
				text_height=13;
				color=20;
				style=21;
			}	/* att section */
			geo
			{
				rot=16;
				org=1,1;
				trn_org=17,18;
			}	/* geo section */
		}	/* cmp section */
	}	/* gr_feat_ref*/
	gr_feat_ref
	{
		dgn="dgn";
		rbprmry="id";
		rbscndry="id";
		cmp { lbl="symbol"; typ=sym;
			out_of_scope=end;
			att
			{
				weight=18;
				level=60;
				symbol_character=255;
				symbol_justification=14;
				symbol_width=15;
				symbol_font=127;
				symbol_height=10;
				color=16;
				style=17;
			}	/* att section */
			geo
			{
				rot=16;
				org=1,1;
				trn_org=2,2;
			}	/* geo section */
		}	/* cmp section */
	}	/* gr_feat_ref*/
}	/* ref_feat */

A reference feature with a nongraphic component, a graphical reference feature with a complex string and a line, and a graphical reference feature which is a line.

# A nongraphic component.
FACTORY_DEF * CreationFactory 						
CREATE_AT_END 						
        	NUMBER_TO_CREATE 1 \
        	OUTPUT FEATURE_TYPE ngComponent	\
        		sef_type sef_nongraphic \
        		sef_lbl grmap				\
        		streetName 102   
       
 # A curve subtype for the complex string.

 FACTORY_DEF * CreationFactory \
        2D_GEOMETRY 1 1 2 2 3 3 4 4  \
        CREATE_AT_END \
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE crvSubType \
        	sef_type    sef_curve                           
       
 # A line subtype for the complex string.
 FACTORY_DEF * CreationFactory	\
        2D_GEOMETRY 1 1 2 2 \
        CREATE_AT_END  \
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE lineSubType  \
        	sef_type    sef_line         
       
# Aggregate the curve and the line together to form a complex # string that will become a component of the first
# graphical reference feature.
FACTORY_DEF * AggregateFactory \
        INPUT FEATURE_TYPE crvSubType 	\
        INPUT FEATURE_TYPE lineSubType	 \
       LIST_NAME sef_component{} \
        OUTPUT AGGREGATE FEATURE_TYPE grCmplLineComponent \
        	sef_type  sef_line \
        	sef_lbl  street \
        	sef_element_type 12 \
        	streetName 90                              
       
 # A line which will become part of the first graphical 
 # reference component.
FACTORY_DEF * CreationFactory \
2D_GEOMETRY 1 1 2 2  \
        CREATE_AT_END  \
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE grLineComponent \
        	sef_type  sef_line \
        	sef_lbl  bridge \
        	streetName  91 
      
 # Aggregate the complex string and the above line together 
 # to form the first graphical reference feature.
 FACTORY_DEF * AggregateFactory \
        INPUT FEATURE_TYPE grCmplLineComponent	\
        INPUT FEATURE_TYPE grLineComponent \
        LIST_NAME sef_component{} \
        OUTPUT AGGREGATE FEATURE_TYPE grRef \
        	sef_out_of_scope begin	\
        	sef_dgn dgnfile \
        	sef_map mapid 	\
        	sef_transaction{0} ADD 	\
        	sef_transaction{1} OUTSTANDING 	\
       	sef_rbprmry gid	\
        	sef_rbscndry ufid 	\
       	sef_segment segment	\
        	sef_tsetid id 	\
        	sef_mrflag mrflag 	\
        	sef_dgntype 1 	\
        	sef_out_of_scope begin                       
        
# A graphical reference with a line only.
FACTORY_DEF * CreationFactory \
        2D_GEOMETRY 1 1 2 2 \
        CREATE_AT_END \
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE grRef \
        	sef_type sef_line \
        	sef_out_of_scope end \
        	sef_lbl crossStreet \
        	streetName 92                              
         
# Aggregate the nongraphic component, and the two 
# graphical references together to form the reference feature.
FACTORY_DEF * AggregateFactory \
        INPUT FEATURE_TYPE ngComponent \
        INPUT FEATURE_TYPE grRef  \
        LIST_NAME sef_component{} \
        OUTPUT AGGREGATE FEATURE_TYPE refFeat \
        	sef_feature sef_ref_feat \
        	sef_st{0} state1 \
        	sef_st{1} state2 \
        	sef_out_of_scope yes \
        	sef_ref_key refid \
        	sef_reload NO_RELOAD \
        	sef_wid  wid \
        	sef_schema_no	num 

The output feature is:

ref_feat
        {
        	lbl="refFeat";
        	st="state1";
        	st="state2";
        	out_of_scope;
        	ref_key="refid";
        	reload="NO_RELOAD";	/* DO NOT MODIFY */
        	wid="wid";	/* DO NOT MODIFY */
        	schema_no="num";	/* DO NOT MODIFY */
        	cmp { lbl="grmap"; typ=n_g;
        		att
        		{
        			streetName="102";
        		}	/* att section */
        	}	/* cmp section */       
        	gr_feat_ref        
        	{        
        		dgn="dgnfile";
        		map="mapid";        
        		transaction="ADD";	/* DO NOT MODIFY */       
        		transaction="OUTSTANDING";	/* DO NOT MODIFY */       
        		rbprmry="gid";       
        		rbscndry="ufid";        
        		segment="segment";	/* DO NOT MODIFY */        
        		tsetid="id";
        		mrflag="mrflag";        
        		dgntype="1";
        		cmp { lbl="street"; typ=cplx_str;
        			att
        			{
        				streetName="90";
        				elm_cnt=2;
        			}	/* att section */
        			subtype=crv;
        			{
        				geo
        				{
        					num_pnts=4;
        					pnts=1,1 : 
        						2,2 : 
        						3,3 : 
        						4,4;
        				}	/* geo section */
        			}	/* subtype section */
        			subtype=line;
        			{
        				geo
        				{
        					fst_pnt=1,1;
        					snd_pnt=2,2;
        				}	/* geo section */
        			}	/* subtype section */
        		}	/* cmp section */
        		cmp { lbl="bridge"; typ=line;
        			att
        			{
        				streetName="91";
        			}	/* att section */
        			geo
        			{
        				fst_pnt=1,1;
        				snd_pnt=2,2;
        			}	/* geo section */
        		}	/* cmp section */
        	}	/* gr_feat_ref*/
        	gr_feat_ref
        	{
        		cmp { lbl="crossStreet"; typ=line;
        			out_of_scope=end;
        			att
        			{
        				streetName="92";
        			}	/* att section */
        			geo
        			{
        				fst_pnt=1,1;
        				snd_pnt=2,2;
        			}	/* geo section */
        		}	/* cmp section */
        	}	/* gr_feat_ref*/
        }	/* ref_feat */
        

A regular feature with a complex string, a complex shape and a nongraphic component.

# A curve for the complex string.
        FACTORY_DEF * CreationFactory \
        	2D_GEOMETRY 1 1 2 2 \
        	CREATE_AT_END \
        	NUMBER_TO_CREATE 1 \
        	OUTPUT FEATURE_TYPE aggregate1 \
        		sef_type sef_curve  \
       
 # A line for the complex line. Since the element type
 # is not specified, the SEF writer automatically check
# and determine that this is a two point line.
 FACTORY_DEF * CreationFactory  \
        2D_GEOMETRY 3 3 4 5 \
        CREATE_AT_END \
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE aggregate1	\
        	sef_type sef_line            
       
# Aggregate the curve and the two point line together
# into a complex string.
FACTORY_DEF * AggregateFactory	\
        INPUT FEATURE_TYPE aggregate1 \
        LIST_NAME sef_component{} \
        OUTPUT AGGREGATE FEATURE_TYPE aggregate1 \
        	sef_type sef_line \
        	sef_lbl	road \
        	sef_element_type 12 \
        	streetName Broadway 
        
# Simple shape forced into a complex shape. 
 FACTORY_DEF * CreationFactory \
        2D_GEOMETRY 1 1 10 1 5 10 1 1 	\
        CREATE_AT_END 	\
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE aggregate1 \
        	sef_type sef_shape  \
        	sef_element_type 14 \
        	sef_lbl polygon \
        	streetName Lake     
       
 # A nongraphic component.
 FACTORY_DEF * CreationFactory	\
        CREATE_AT_END 	\
        NUMBER_TO_CREATE 1 \
        OUTPUT FEATURE_TYPE aggregate1 \
        	sef_type  sef_nongraphic \
        	sef_lbl	 landmark  \
        	streetName "kingsway" 
       
 # This makes the feature.
 FACTORY_DEF * AggregateFactory \
        INPUT FEATURE_TYPE aggregate1	\
        LIST_NAME sef_component{} \
        OUTPUT AGGREGATE FEATURE_TYPE aggregate1 \
        	sef_feature sef_feat 	\
        	sef_st{0}  state1 \
        	sef_st{1} state2 \
        	sef_dgn  dgnfile \
        	sef_map mapid 	\
        	sef_reload NO_RELOAD \
        	sef_wid  wid \
        	sef_schema_no 	num \
        	sef_transaction{0} EDIT \
        	sef_transaction{1} PLR \
        	sef_rbprmry gid \
        	sef_rbscndry ufid \
        	sef_segment segment \
        	sef_tsetid id \
        	sef_mrflag  mrflag \
        	sef_dgntype 1 

The output feature is:

feat
{
        lbl="aggregate1";
        st="state1";
        st="state2";
        dgn="dgnfile";
        map="mapid";
        reload="NO_RELOAD";	/* DO NOT MODIFY */
        wid="wid";	/* DO NOT MODIFY */
        schema_no="num";	/* DO NOT MODIFY */
        transaction="EDIT";	/* DO NOT MODIFY */
        transaction="PLR";	/* DO NOT MODIFY */
        rbprmry="gid";	/* DO NOT MODIFY */
        rbscndry="ufid";	/* DO NOT MODIFY */
        segment="segment";	/* DO NOT MODIFY */
        tsetid="id";	/* DO NOT MODIFY */
        mrflag="mrflag";	/* DO NOT MODIFY */
        dgntype="1";	/* DO NOT MODIFY */
        cmp { lbl="road"; typ=cplx_str;
        	att
        	{
        		streetName="Broadway";
        		elm_cnt=2;
        	}	/* att section */
        	subtype=crv;
        	{
        		geo
        		{
        			num_pnts=2;
        			pnts=1,1 : 
        				2,2;
        		}	/* geo section */
        	}	/* subtype section */
        	subtype=line;
        	{
        		geo
        		{
        			fst_pnt=3,3;
        			snd_pnt=4,5;
        		}	/* geo section */
        	}	/* subtype section */
        }	/* cmp section */
        cmp { lbl="polygon"; typ=cplx_shp;
        	att
        	{
        		streetName="Lake";
        		elm_cnt=1;
        	}	/* att section */
        	subtype=str;
        	{
        		geo
        		{
        			num_pnts=4;
        			pnts=1,1 : 
        				10,1 : 
        				5,10 : 
        				1,1;
        		}	/* geo section */
        	}	/* subtype section */
        }	/* cmp section */
        cmp { lbl="landmark"; typ=n_g;
        	att
        	{
        		streetName="kingsway";
        	}	/* att section */
        }	/* cmp section */
       }	/* feat */