Trouble with Dynamic Feature Scoring (DFS)

Hello all,

I try to use DFS in a really simple structured project with only a few features. Here's an example: a linear element (line, line string) on Level 2 which is blue (color 3) should be designated as "my.feature". I tried the following syntax in my dfs.xml file:

<FeatureScoringRules minScore="3">

<Feature useCriteria="" name="my.feature">
<Rule type="CExpr" score="1">XFMCompareElementLevelName("Level 2")</Rule>
<Rule type="CExpr" score="1">XFMCompareElementColor(3)</Rule>
<Rule type="Element" score="1" ElementType="3-4" checkZeroLengthLineElementType="false"/>
</Feature>

</FeatureScoringRules>

MS_GEOXFM_NO_LEVELFEATURES and MS_GEOXFM_NO_CELLNAMEFEATURES are turned off, because I'd like to control what happens in my dfs file. I don't like any features to be assigned by just by level or just by cellname.

In addition, I renamed the file FEATURESCORING.XML which is automatically created by the GSA system during the export process. My goal is to make it inactive this way, so I renamed it to .xml_. What I don't really understand is: if there are two dfs control files and both are recognized by the system, there is a chance that they have contradictory contents. Which one is evaluated by Bentley Map in that case?


Now, when I open a dgn file using my above dfs I expected the existing elements that reach the minScore of 3 as well as new elements to turn into native "my.feature". Instead, I find two things: first, none of my existing blue line strings on Level 2 turn into features. Second, if I digitize new lines on Level 2 in blue, they become "Inferred feature: my.feature". But, the system doesn't care what element type they are!! That is, a blue circle or a blue text on Level 2 also becomes "my.feature", which makes no sense. The syntax I used is exactly like it is explained in the "Bentley Map-DFS Notes.docx" document.

It seems to me that the dfs is working in principle, being the problem that the rule type "Element" is always considered true. If I set the minScore to 4, then no new elements become features any more.

Any ideas? Thanks in advance, Uwe

  • Uwe,

    In your "Element" rule, would you try changing the "ElementType" attribute name to "elementType".

    Regards,
    Chris


    This is a test

  • Chris,

    thank you very much for your answer. Changing to "elementType" brought a little improvement : new elements that are not of the designated types (3,4) are not featurized any more. When I go back to "E" as a test, they are featurized. But my old existing elements still don't turn into features, and I have no "Native features" but only "Inferred features".

    What can be wrong?

    In addition, I tried to append features to line strings that are not defined as linear features but as area features. I know that this makes no sense, but I wanted to see what happens. It worked! So I am sure that something is wrong here.

    Any more ideas?

    Regards, Uwe

    Versions in use:     MicroStation 08.11.09.357         Bentley Map 08.11.09.107

  •  
    Featues recognized via DFS are inferred features if  they are not tagged as a native feature and thus are ‘inferred’ by their level and geometry type. To test this, place a simple line (place line tool) on one of the levels where a typical linear feature would be stored. This will then be a ‘inferred’ feature, because you did not place a GIS feature, you placed a line, but youplaced it ont eh level and with the geometry of the linear feature.
     
     
    Jerry Walter
    Geospatial Advisor
    Mapping - US and Canada
    +1 937 205 3674 (office)
    +1 937 205 3674 (mobile)
    Skype : jerry.walter.troy
     
     

     

  • Uwe,

    Would you provide a simple example dgn with the old existing elements that are not identified as features?

    Would you also provide an example (dgn & DFS scoring rules) of "In addition, I tried to append features to line strings that are not defined as linear features but as area features." ?

    Regards,
    Chris


    This is a test

  • Jerry and Chris,

    thank you very much for your answers. Jerry, let me please tell something about the workflow in which I try to use DFS. That might help to see what I'm trying to achive. We don't place native features the usual way via methods from the command manager. When our dgn files come from basic data collection workstations, they have no feature tags and no level names. There's just linestrings, texts and some cells on levels 1, 2 and 3. This situation can't be changed due to the software equipment on these PCs.

    Now, we have to turn those "naked" elements into correct features to perform analysis, overlay and conversion into other formats. In GeoGraphics, this worked perfect using the "Feature Attach Best" functionality. My intention was to imitate the FAttachBest procedure using DFS with scoring rules. Is this possible? If not, what is the best way to native feature-tag existing elements in a file without level name definitions?

    Another important question is: is there a way in Bentley Map to get new elements feature-tagged when those elements are created by the system using a command like "fence create areas"? In GeoGraphics, I had to set an "Active Feature" prior to the element generation. How does this work in Bentley Map? I didn't find something like "Active Feature ="

    Chris, please see the example dgn file in the attachment. The blue linear elements on level 2 are the ones I tried to feature-tag as an example. The content of the according XML can be found in my first post.


    Thanks a lot in advance, Uwe

    simple_file.dgn

    Versions in use:     MicroStation 08.11.09.357         Bentley Map 08.11.09.107