Global Mapper v26.0

Combining Names from Columns?

Roger Edrinn
Roger Edrinn Global Mapper UserTrusted User
edited January 2008 in Vector Data
My road shapefiles consist of the not just the road name, but a prefix, suffix and type. So combining all four would give me the road's proper name. Since were talking thousands to tens of thousands of roads, I'm hoping Global Mapper can help to combine these text strings into a proper name? Perhaps Excel or some other tool?

Any ideas?

Thanks

Comments

  • global_mapper
    global_mapper Administrator
    edited January 2008
    There is an item on the todo list for Global Mapper to allow creating feature labels from multiple attribute values combined. In the meantime, something like Excel would probably make it possible to edit the DBF file for your Shapefile and create a new column with the combined results of some other columns.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    There is an item on the todo list . . .
    I heard that the todo list is quite long. ;)

    Thanks
  • global_mapper
    global_mapper Administrator
    edited January 2008
    That it is! However, this is a long-standing item, so I might try to get it done this week before the v9.02 release as several people have been wanting it. I'll reply back to this thread if I do.
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    That it is! However, this is a long-standing item, so I might try to get it done this week before the v9.02 release as several people have been wanting it. I'll reply back to this thread if I do.
    I can smell the turkey now!!! :)

    However, my pal Google showed me this: How To Combine Text in Cells

    Thanks
  • global_mapper
    global_mapper Administrator
    edited January 2008
    That's a pretty handy solution for those familiar with Excel. I'll still likely add it to Global Mapper though as it will be handy there and a lot simpler for the less technically inclined folk, plus it won't be limited to formats with Excel-editable data, like DBF files for Shapefiles.
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    My Excel formula:
    =IF(ISBLANK(I2), J2 & " " & K2 & " " & L2, I2 & " " & J2 & " " & K2 & " " & L2)

    The isblank checks the prefix for a null value so the name is not preceeded by a space. I know enough about shapefiles to know they have no structure. So row sorting is not an option, had to maintain the exact row order.

    Again with much help from my friend Google. I haven't done an IF THEN in twenty years . . . much fun. :)
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    Doing a straight save in Excel to DBF lost 90% of the data. Their was a warning about DBF IV which I ignored. I also saved the spreadsheet to .xls, so I have the data. BTW their are 65,636 rows of data.

    Are you aware of any special Excel save?

    Thanks
  • STH
    STH Global Mapper User Trusted User
    edited January 2008
    It might be too many rows of data. At least you will loose 100 of them because 65,536 is the maximum allowed rows in Excel (Google Answers: microsoft excel)

    Perhaps you can change it to another format than DBF IV? ASCII Text for instance?
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    STH wrote: »
    It might be too many rows of data. At least you will loose 100 of them because 65,536 is the maximum allowed rows in Excel (Google Answers: microsoft excel)
    Based on your post I rechecked the number of rows. 65,536!!!

    Which says I've already lost data importing into Excel. Time for plan B.

    The shapefile export dialog has a export via feature type switch. Time to experiment.

    Thanks
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    So doing a little more research, I went back to my original workspace from which I exported the shapefile. According to the metadata, it has a line count of 682,788 . . . a bunch. Now I know where my 90% missing is at, in the bit bucket.

    My conclusion is that this is outside the bounds of Excel. :(

    Mike,

    When did you say you'd be publishing 9.02?
  • global_mapper
    global_mapper Administrator
    edited January 2008
    GM 9.02 may be released as early as this week. I'm hoping to be able to add support for the multi-attribute labels prior to that.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    I'm hoping to be able to add support for the multi-attribute labels prior to that.
    Does this still look probable? Writing a generalized solution to this is non-trivial, so don't mean to pressure you.

    It's just that I spent all day Sunday mastering ISTool to package my executable and now this road label issue has moved to the critical path for my finished product.

    Thanks
  • global_mapper
    global_mapper Administrator
    edited January 2008
    Yes, this is still probable. I hope to begin working on it today, and have it working in 1-2 days, unless something more important comes up.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    Mike
    Yes, this is still probable. I hope to begin working on it today, and have it working in 1-2 days, unless something more important comes up.
    Still a go? If not, better to go with what I have.

    Thanks
  • global_mapper
    global_mapper Administrator
    edited January 2008
    I'm working on it right now, should have something tomorrow.
  • global_mapper
    global_mapper Administrator
    edited January 2008
    Roger,

    I have completed adding support for using multiple attribute values as a display label. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    Roger,

    I have completed adding support for using multiple attribute values as a display label. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.xx installation folder to give it a try.

    Mike,

    Awesome, simply awesome!!! I'll report back soon as to my experiences.

    Thanks
    Roger
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    Mike,

    Afraid I'm going to need some instructions. I may be trapped in the Excel metaphor.

    I opened the Vector Search dialog, selected some lines, right clicked . . . nothing jumped out at me. Only the Combine Selected Line Features, it seemed to want to merge vectors, not labels.

    FWIW, I have 9.01 Jan 29 23:59 I'll bet you were brain dead.

    BTW, would the One-click tool be in this build? Didn't work.

    Thanks
  • global_mapper
    global_mapper Administrator
    edited January 2008
    Roger,

    The change was not in the Vector Search dialog, it was on the Options dialog in the Overlay Control Center where you set up the attributes to use for labeling features in a layer. Where previously you could select just one attribute to use for labels for the features in a layer, you can now choose to use multiple attributes as the display label.

    The one click change should be in this build to. What functionality are you trying where you have to click twice to get from something like the Control Center having focus to the active tool doing its normal behavior?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger Edrinn
    Roger Edrinn Global Mapper User Trusted User
    edited January 2008
    Mike,

    Sweet, nice implementation, will be a great front end process.

    Took 1-2 min for 600K lines. Global Mapper Rocks!!!

    I'll get back to you on the One-Click in the other thread.

    Thanks