Global Mapper v25.0

'Search Vector Data', text sort versus numerical sort

Jake
Jake Global Mapper UserTrusted User
edited December 2014 in Bug Report
GM V16.0.4 (b102814) (64 bit) Windows 7.

It seems to be a bug but the auto-generated fields 'BEARING' and 'LENGTH' are not sorted numerically. They are sorted textually. So you get something that looks like this.

Sorting Numerical Values

Comments

  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited December 2014
    Hi,

    Please provide a more detailed description of your workflow, and attach a zip archive containing a workspace and data we can use to reproduce the problem. Thanks.

    Cheers,

    Bob
  • Jake
    Jake Global Mapper User Trusted User
    edited December 2014
    1. I have 3 lines. A is 1 meters long B is 2 meters long and C is 10 metres long. When I open the table and sort on LENGTH they appear as,

    NAME LENGTH
    A 1
    C 10
    B 2

    not

    A 1
    B 2
    C 10

    Or you can open ANY table and sort by the field LENGTH. It will be obvious in how the numbers appear. I will create a sample and attach if I get time.
  • Jake
    Jake Global Mapper User Trusted User
    edited December 2014
    1. Open attachment.
    2. Menu -> Search | Search by Attr
    3. Sort table by LENGTH

    You do not get a numerical sort. You get a text sort. Read the link provided in Post #1 for an explanation of the difference text and numerical sorts.
  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited December 2014
    Hi Jake,

    Under the Search Criteria, there is a drop-down list that allows you to select whether the search criteria should be treated as textual or numeric values. If you select Number, then click the header for the LENGTH attribute, it will sort numerically (and if you select Text, the LENGTH attribute will be sorted as text values).

    Cheers,

    Bob
  • Jake
    Jake Global Mapper User Trusted User
    edited December 2014
    Ah! got it. So it does not sort based on how the data is stored. It also appears that once you set NUMBER or TEXT in the search criteria it treats the entire table the same not just the one field you have identified in the filter. For example searching '*' on 'Feature Name' with sort set to NUMBER effects the LENGTH sort order.