Global Mapper Pro

Is it possible to load defined shapes as layers?

kbellis
kbellis Global Mapper UserTrusted User
1) I'm uncertain if defining a shape through a call of attributes is legal;
2) regardless, is it possible to load defined shapes as layers?

Going about this following my nose, I got this:



Best Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    Accepted Answer
    bmg_bob said:
    Your method of entering the coordinates for DEFINE_SHAPE will not work because the command can not accept variable names for coordinate values (bug #24919 has been opened to address this).

    Bug 24919 has been implemented in the latest Global Mapper 19 daily build, and will be in the next Global Mapper 20 beta release (it was not in the initial download.)  Both the DEFINE_SHAPE and DEFINE_TEXT_FILE commands will now properly process variable references.

    Cheers,
    Bob


  • bmg_bob
    bmg_bob Global Mapper Programmer
    Accepted Answer
    kbellis said:
    Is DEFINE_TEXT_FILE now able to handle variables as it should with v20 (b090518)?
    Yes.

    Cheers,
    Bob

Answers

  • kbellis
    kbellis Global Mapper User Trusted User
    Or is another approach to be considered?
  • bmg_bob
    bmg_bob Global Mapper Programmer
    Hello,

    Your method of entering the coordinates for DEFINE_SHAPE will not work because the command can not accept variable names for coordinate values (bug #24919 has been opened to address this).

    These defined shapes can not be loaded as layers, however, and the Global Mapper scripting language does not have a command for creating a layer and features from coordinate input.

    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    Thank you for your reply, Bob.

    What is that command you referred to?

    I also had started to wonder if defining a text file from variables, exporting it, and then importing it was an approach to consider; however, am unsure if that's the best/ simplest way. I'm looking to learn as much as you're willing to teach :)
  • bmg_bob
    bmg_bob Global Mapper Programmer
    kbellis said:
    I also had started to wonder if defining a text file from variables, exporting it, and then importing it was an approach to consider; however, am unsure if that's the best/ simplest way.
    Actually, using the DEFINE_TEXT_FILE command would be the only way to create layers. At the moment, however, that command does not handle variables as it should, so that will need to be fixed before your plan will work.

    Cheers,
    Bob
  • kbellis
    kbellis Global Mapper User Trusted User
    Well, thanks anyway. I appreciate your reply.

    I've already done all of this in a spreadsheet, but was hoping to get a more elegant solution scripted. Maybe some other time.

  • kbellis
    kbellis Global Mapper User Trusted User
    Here's a peek:

  • Mykle
    Mykle Global Mapper User Trusted User
    Very nicely done Kelly !

  • kbellis
    kbellis Global Mapper User Trusted User
    Thanks Mykle.
  • kbellis
    kbellis Global Mapper User Trusted User
    bmg_bob said:
    Actually, using the DEFINE_TEXT_FILE command would be the only way to create layers. At the moment, however, that command does not handle variables as it should, so that will need to be fixed before your plan will work.

    Cheers,
    Bob
    Is DEFINE_TEXT_FILE now able to handle variables as it should with v20 (b090518)?
  • kbellis
    kbellis Global Mapper User Trusted User
    Woohoo! Will test after meetings today in Bangor. Thanks so much for this Bob!
  • kbellis
    kbellis Global Mapper User Trusted User
    Still testing v20 (b090518) (472); not sure if this issue is related:
    The DEFINE_TEXT_FILE command acted like it was working; however, the IMPORT_ASCII command acted like there wasn't anything to import. The log indicates that GMT1F6A.txt was (somehow) identified to load; however, no such file is located in the defined folder.

    What exactly is going on here and have I screwed up something?


  • kbellis
    kbellis Global Mapper User Trusted User
    Ooops - I see something got clipped in the above screen capture - sorry about that.


Sign In or Register to comment.