If you select a feature, GTech shows the selected feature in Feature Explorer. The right area of feature explorer shows attributes of the selected feature, the left area shows the identification of the selected feature. This will show something like ‘Feature name – Fid’ (G3E_FEATURENAME – G3E_FID), in the picture below you can read ‘Point – 61’.
If you’re not happy with this convention or need a quick way to distinguish features, you can create a custom label for this identification, a so called ‘Identifier View’ :
In the above picture, the red rectangle is showing a custom identifierview showing the material and the fid of the selected feature.
Lets assume your main non-graphic table looks like this :
CREATE TABLE B$POINT_RECORD ( G3E_ID NUMBER(10) NOT NULL, G3E_FNO NUMBER(5) NOT NULL, G3E_FID NUMBER(10) NOT NULL, G3E_CNO NUMBER(5) NOT NULL, G3E_CID NUMBER(10) NOT NULL, LTT_ID NUMBER DEFAULT 0 NOT NULL, LTT_STATUS VARCHAR2(6 BYTE), LTT_DATE DATE, LTT_TID NUMBER, A1 VARCHAR2(10 BYTE) )
Then these are the steps needed for creating a custom identifierview using the FID and [A1]-attribute value:
- Create a Label
- Create a labelrule
- Update G3E_COMPONENT to reference the label
- Create the actual view
- Update G3E_FEATURE to reference the identifierview
- Create a ‘Attribute-Only’-component
- Define attributes for the Identifier View
- Update the component view to have all the attributes used in the identifierview
1. Create a Label
Insert into G3E_LABEL( G3E_LFNO, G3E_USERNAME, G3E_CONTENT) values( 1, 'Feature Explorer demo','[G3E_FID]/[A1]');
2. Create a Labelrule
Insert into G3E_LABELRULE( G3E_LRROWNO, G3E_LRNO, G3E_RULE, G3E_FILTER, G3E_FILTERORDINAL, G3E_LFNO) values( 1, 1, 'R1', null, 99, 1);
3. Update G3E_COMPONENT to reference the label
update G3E_component set G3E_lrno=1 where G3E_cno in ( 5, 6);
Note:If you don’t update the components for the feature with the LRNO for the labelrule to be used, the label will not be used for Feature Explorer. It will only be used when hovering over the components who use the LRNO and will take the form of [G3E_COMPONENT.G3E_USERNAME][LABEL] where [LABEL] is the label referenced by G3E_LABELRULE.
4. Create the actual view
create or replace view V_POINT_FE as select A.G3E_FID, B.A1 from point a, point_record b WHERE A.G3E_FNO=3 and a.G3E_FID=b.G3E_FID;
5. Update G3E_FEATURE to reference the identifierview
update g3e_feature set g3e_identifierview = 'V_POINT_FE' where g3e_fno = 3;
6. Create a ‘Attribute-Only’-component
Insert into G3E_COMPONENT( G3E_CNO, G3E_USERNAME, G3E_NAME, G3E_TOOLTIP, G3E_TYPE, G3E_TABLE, G3E_DETAIL, G3E_DCNO, G3E_LRNO, G3E_LTT) values ( 7, 'Point Identifier', 'V_POINT_FE', 'Point Identifier', 2048, 'V_POINT_FE', 0, 1, 1, 0);
An Attribute-only-component is a special kind of component used to idenfiy components not part of features. Examples are job-attributes and identifierviews. You don’t need to create a row in G3E_FEATURECOMPONENT.
7. Define attributes for the Identifier View
Insert into G3E_ATTRIBUTE ( G3E_ANO, G3E_CNO, G3E_FIELD, G3E_USERNAME, G3E_REQUIRED, G3E_COPY, G3E_EXCLUDEFROMEDIT, G3E_DATATYPE, G3E_EXCLUDEFROMREPLACE, G3E_BREAKCOPY, G3E_COPYATTRIBUTE, G3E_WRAPTEXT, G3E_UNIQUE, G3E_FUNCTIONALVALIDATION, G3E_ROLE) values( 700, 7, 'G3E_FID', 'fid', 0, 0, 0, 4, 0, 0, 0, 1, 0, 1, 'EVERYONE'); Insert into G3E_ATTRIBUTE( G3E_ANO, G3E_CNO, G3E_FIELD, G3E_USERNAME, G3E_REQUIRED, G3E_COPY, G3E_EXCLUDEFROMEDIT, G3E_DATATYPE, G3E_EXCLUDEFROMREPLACE, G3E_BREAKCOPY, G3E_COPYATTRIBUTE, G3E_WRAPTEXT, G3E_UNIQUE, G3E_FUNCTIONALVALIDATION, G3E_ROLE) values( 701, 7, 'A1', 'A1', 0, 0, 0, 10, 0, 0, 0, 1, 0, 1, 'EVERYONE');
8. Update the component view to have all the attributes used in the identifierview
CREATE OR REPLACE VIEW V_POINT_FE ( G3E_ID, G3E_FNO, G3E_FID, G3E_CNO, G3E_CID, G3E_GEOMETRY, A1 ) AS SELECT A.G3E_ID, A.G3E_FNO, A.G3E_FID, A.G3E_CNO, A.G3E_CID, A.G3E_GEOMETRY, B.A1 FROM POINT A, POINT_RECORD B WHERE (B.G3E_FNO = 3) AND (A.G3E_FID = B.G3E_FID);
Notes:
- The feature used in this example has feature # 5 and consists of two components, components # 5 & 6
- If you search for G3E_IDENTIFIERVIEW in the help you’ll find some entries about it.
- Thanks to Christoper de Bruyn for support with this entry.