Global Mapper v25.0

Is there a Field Calculator in GM?

vax
vax Global Mapper UserTrusted User
edited March 2014 in Technical Support
Similar to the QGIS small tool than can do a lot of tweaks with attributes?

E.g. I have some points with 'name' and 'ele'(vation) attributes. I have the name stuff like Somepeakname-1444 where the numbers represent the elevation. I would like to leave the string part into the 'name' attribute and the elevation part to be copied to the 'elevation' attribute. A field calculator capable of some programming-language-like operations on the attributes would do the job.

Regards,
vax

Comments

  • global_mapper
    global_mapper Administrator
    edited March 2014
    vax,

    There is the CALC ATTR option on the right-click menu for a layer in the Control Center (and in a script). However it is for creating a new attribute either by combining two attributes or an attribute and a value using some kind of operation, including mathematical. What it doesn't have it one for splitting an attribute into separate pieces based on some kind of logic.

    Would maybe adding some kind of option to create new attribute values by splitting on some string (like '-' in this case) work? Then you could say assign NEW_ATTR by splitting and you would get NEW_ATTR1=Somepeakname and NEW_ATTR2=1444. Then you could rename those attributes later.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • JamesRutter
    JamesRutter Global Mapper User Trusted User
    edited March 2014
    Mike, it would be exceedingly useful if GM implemented something along the lines of what Manifold implemented. Manifold seems to be 'dead' software as no one has heard of any updates literally for years, however their tabular calculators are superb. Quite often I use Manifold just to manipulate fields in tables....often nothing to do with GI at all. They use 'token separators' (which the user can define) to enable users to do all sorts of table manipulation. For example on string fields you can prepend or append the first token from another column, or you can delete the first or end token, or you can change all to upper / lower case, or you can say delete the first n characters for example. If you're working on a column containing integer or float values you get a different set of mathematical operators to play with. Screenshot below shows the dialogue where you can define your tokens and a snippet of some of the functions in the field calculator.

    Cheers
    James
    Token.jpg
  • vax
    vax Global Mapper User Trusted User
    edited March 2014
    Mike,

    I had a look at the CALC ATTR layer option and it seems to be close to the tool I need. Anyway it seems to be a little bit rudimentary one - that can make some simple operations, but nothing more.

    Thinking further - if you try to extend the CALC ATTR each time a bit, this will probably produce a monster-tool after several GM versions. Maybe the better decision is just to go into the GIS approach - to represent all layer's objects and their attributes in a simple table/grid view.

    That's almost done in the "Search" tool, anyway it doesn't have a true table view (columns behave strange all the time you change something in). It is just the 'Field Calculator' option missing to such a table view, that you can manipulate all the fields 'programmatically'. Please have a look at the similar QGIS option just for reference as I find it extremely powerful for field manipulation.

    Greetings,
    vax
  • JamesRutter
    JamesRutter Global Mapper User Trusted User
    edited March 2014
    For my 2 pence worth I think of Global Mapper as a very comprehensive 'tool box' which gets things done quickly and I'd like to see the tabular / attributes side of things developed first rather than things like print templates and finished map production. GM fits into my workflow as a data preparation tool (whether for imagery or vector) which produces 'stuff' that I need for cartographic output so I think enhancements to table manipulation would 'fit' better with the ethos of the GM product as I would think many users view it as a 'tool kit to get things done' rather than a jack of all trades which does full blown cartographic map output too.

    Cheers

    James
  • Jasmine_BMG
    Jasmine_BMG BMG Staff
    edited March 2014
    Hi James,

    There is a pending enhancement request for adding tabular attribute management to Global Mapper. If you want to contact Blue Marble directly at geohelp@bluemarblegeo.com, I can add your contact information to the request.

    This is also something that definitely would be in release notes.

    Regards,

    Jasmine
  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    Hi James and vax,

    I stumbled across this thread while web searching for something else (isn't that always the way?). You may already know this, but just in case, we've improved the Attribute Calculation Setup dialog and the associated CALC_ATTR script command to allow for all sorts of attribute creation options, including text manipulation and a pretty full formula calculator. See the Formula Calculator documentation for more info.

    Cheers,

    ~Jeff