Global Mapper Pro

ATTR_REPLACE_STR script command ignoring spaces in "new" text

falqn
falqn Global Mapper UserTrusted User
edited November 2014 in Bug Report
Hi,
When using command ex.
ATTR_REPLACE_STR="<Feature Name>=Rue =R. "
GM is ignoring space sign when space is the last sign in "new" text and the effect is:
'Rue de Gaulle" is replaced to 'R.de Gaulle" - there is no space between 'R.' and 'de Gaulle' but I need that space.

Second thing, when using COPY_TO_NEW_LAYER=YES, copied/parent features looks like shifted a little bit in some zoom levels.

Best regards
Wojtek

Comments

  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited November 2014
    Hi Wojtek,

    Can you attach a zip file containing the script and data file that I can use to reproduce the ATTR_REPLACE_STR issue?

    I will try copying some features to investigate the shifting behavior. Is this related to a specific feature type (lines, areas, points), or does it happen for all features?

    What version of Global Mapper are you using?

    Cheers,

    Bob
  • falqn
    falqn Global Mapper User Trusted User
    edited November 2014
    Hi,
    I'm attaching the workspace file and script. You can see the "missing space" problem and "shifted features" problem. Shifted (in some zoom levels) are lines and areas, I did not try point features. When I was preparing the file for you first I tried to make GMP file and in GMP file (after running the script) the "shifted features" problem is not present.
    In v15.2 "shifted features" problem is not present too (in GMW and GMP file).
    I'm using v16.0.4 (b103014).
    Regards
    Wojtek
  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited November 2014
    Hi Wojtek,

    I have fixed this problem and placed new builds with the latest changes at the links below:

    32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
    64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip

    Simply download the .zip file for the build that you are using and extract over your existing installation files (do not uninstall Global Mapper). The likely locations to extract to are as follows:

    32-bit: C:\Program Files (x86)\GlobalMapper16
    64-bit: C:\Program Files\GlobalMapper16_64bit

    Cheers,

    Bob
  • falqn
    falqn Global Mapper User Trusted User
    edited November 2014
    Hi Bob,
    The problems are still present, mayby I make a mistake in attached script so you can not see the bug clearly. I have attached new files. There are two problems:
    1. When using command ATTR_REPLACE_STR="<Feature Name>=Rue =R. "
    GM is ignoring space sign when space is the last sign in "new" text and the effect is:
    'Rue de Gaulle" is replaced to 'R.de Gaulle" - there is no space between 'R.' and 'de Gaulle' but I need that space.

    2.
    When using COPY_TO_NEW_LAYER, copied/parent features looks like shifted a little bit in some zoom levels and their parameters (ex lenght) are not the same exactly.

    I have attached the printscreen where you can see two layers - one of them is "new" layer created by script with "missing space" problem and also you can see that features (old and new one) are not in the same place = shifted.

    GM v16.05. b110514 64bit
    Regards
    Wojtek
  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited November 2014
    Hi Wojtek,

    Oops...I left out an important piece of information. The fix I made was to allow an escape character ("\b") that will be replaced by a blank when the ATTR_REPLACE_STR parameter is processed in Global Mapper. This will allow you to use a trailing blank on your replacement string. (You don't have to use this escape character for a blank before the equal sign. That blank will not be stripped out by Global Mapper; only trailing blanks get removed.)

    Example:
    [COLOR=#000000]ATTR_REPLACE_STR="<Feature Name>=Rue =R.\b"[/COLOR]
    

    Note that this only works with the ATTR_REPLACE_STR command.

    I am still looking at the shifted feature issue.

    Cheers,

    Bob

  • falqn
    falqn Global Mapper User Trusted User
    edited November 2014
    Hi Bob,
    '\b' is working, thanks! And what about "shifted features" problem? Did you see the attached printscreen?
    Regards
    Wojtek
  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User
    edited November 2014
    Wojtek,

    I took a look at the shift problem and found the issue with our projection speed-up mesh with this spread out reprojected data. Basically the projection approximation to allow for quick viewing wasn't switching to full projection when zoomed in like it should so you could see the residual errors due to the approximation when you zoomed in far enough. Now the switch is proper and drawing and selection should work correctly. The actual coordinates were correct, it was only the display when reprojecting on the fly that had an offset.

    I have placed new builds with the latest changes at the links below:

    32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
    64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip

    Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:

    32-bit: C:\Program Files (x86)\GlobalMapper16
    64-bit: C:\Program Files\GlobalMapper16_64bit

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Sign In or Register to comment.