Search and Replace

Roger EdrinnRoger Edrinn Global Mapper UserPosts: 721Trusted User
edited May 2009 in Suggestion Box
While their are extensive search parameters in the search dialog, replace seems to be a manual operations. Correct?

I'd like to be able to search for a text string and replace it with another text string. Much like Search and Replace in a text editor.

This would be a nice compliment to nested searches in v10.

Thanks

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2008
    Roger,

    I will add this to the todo list.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited March 2009
    What is the status of Search & Replace?

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    Roger,

    I haven't looked at that yet. Can you explain exactly what you would like this to do? Perhaps a search for an entire string or would just partial matches work? I'm thinking of making this a separate menu item under the Search menu. I may be able to look at this in the next few days before I head out for vacation.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited March 2009
    Looking at the attachment, you'll see that all the Feature Names are in caps. But they display, in a Garmin GPS, with only the first letter in a word capitalized. So in order to "trick" capitalization, you need to insert spaces.

    By example: HUGO SWA will display as Hugo Swa. However HUGO S W A will display as Hugo S W A.

    To accomplish this with the current tools, each unique name must be manually selected and edited. I'd like a global S&R so that I could find all cases of SWA and replace only the SWA portion with S W A and not affect the feature name itself.

    Given your past demonstrations of super human coding, should take no more than 2 hours. ;)

    Thanks

    While you're at it, I'd like Pre-pend A-pend abilities too. Such that I could take any text string and either pre-pend or a-pend a text sting to an existing text string. I'm pretty sure this is allowed in the layer manager > options, but not in search.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    Roger,

    I think I can make that happen. I'll try and get a simple Search and Replace added in the next couple of days. You should be able to use the Search-and-Replace to do a pre-pend and append too just by including the original search string with the pre-pend or append text before or after it in the replace string.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Roger EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited March 2009
    You should be able to use the Search-and-Replace to do a pre-pend and append too just by including the original search string with the pre-pend or append text before or after it in the replace string.
    I disagree, but not strongly . . . yet.

    Using my example above, I'd like to pre-pend a string to Hugo and all other feature names. My wee brain says S&R will not do this. I'll await your superior gray matter.

    Thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    Ah yes, that would be a bit harder. It could be done if the search and replace strings supported wildcards though. For example you could search on '*' and replace with 'Prefix *' to add 'Prefix ' to the front of all names. This will be a bit harder for me but should still be possible.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2009
    Roger,

    I have completed adding a 'Search and Replace' option to the Search menu. In addition to normal search-and-replace, if you use a single '*' character in the replace string you can use that to keep the original text and prepend and/or append data, like using 'Prefix*Suffix'. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the change for you to try. Simply download that file and extract the contents into your existing v10.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 EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2009
    Finally got a chance to try this, super slick!!! That which would have taken hours is done in the blink of an eye.

    I do have an improvement suggestion:

    Instead of having three cascading dialogs, I suggest:
    One dialog with the Class Search and Replace fields in a stack.
    Two don't close the dialog.
    Three don't clear the fields.

    I found myself doing repetitive S&R with very similar strings.

    All and all a wonderful tool.

    Many thanks.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2009
    Roger,

    Thanks for the suggestion, I agree it is better as one dialog. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip with the change for you to try. Simply download that file and extract the contents into your existing v10.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 EdrinnRoger Edrinn Global Mapper User Posts: 721Trusted User
    edited May 2009
    I may be able to look at this in the next few days before I head out for vacation.
    Did this ever happen?

    IIRC, vacation for you consist of fast flowing water with you hanging on for dear-life on an fragile inflatable raft. Sounds like the prefect brain flush alternative to coding.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited May 2009
    Yeah I've had a few short vacations since then. I even went rafting on one last week, but just class II-III in North Carolina as it was with family. The real rafting season is just about finally here so it is time to hit the big stuff!
Sign In or Register to comment.