Combining Names from Columns?
Roger Edrinn
Global Mapper UserTrusted User
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
Any ideas?
Thanks
Comments
-
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 -
global_mapper wrote: »There is an item on the todo list . . .
Thanks -
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.
-
global_mapper wrote: »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.
However, my pal Google showed me this: How To Combine Text in Cells
Thanks -
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.
-
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. -
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 -
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? -
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)
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 -
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? -
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 -
global_mapper wrote: »I'm hoping to be able to add support for the multi-attribute labels prior to that.
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 -
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 -
Mikeglobal_mapper wrote: »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 -
I'm working on it right now, should have something tomorrow.
-
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 -
global_mapper wrote: »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 -
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 -
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 -
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
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 636 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 826 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 913 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website