How to calculate an averaged value for all attributes?

kbelliskbellis Global Mapper UserPosts: 514Trusted User
Using the Search Vector Data query tool, statistical data is just a click or two away, but is it possible to script the calculations to wring out; for example, the mean?

I'm guessing that an additive operator could loop through all features for the attribute; e.g., GROUND_SAMPLE_DISTANCE, and arrive at the sum, but I'm not sure how to come up with divisor, or if this type of attribute looping is even allowed; e.g.,

The following is certainly wrong, but kind of sketches out the general idea:
DEFINE_VAR NAME="GSD_AVG" FORMULA="ATTR_LOOP( + '%GROUND_SAMPLE_DISTANCE%') \ 'ATTR_COUNT' "









Best Answer

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,834
    Answer ✓
    Hello,

    At the moment, there is no way to iterate through the features and get an attribute value from each one in a script. We have discussed adding some statistical functions, such as mean, mode, median, standard deviation, etc. to the Attribute Calculator, but we have not moved past the discussion stage.

    Cheers,
    Bob

Answers

Sign In or Register to comment.