Is it possible to load defined shapes as layers?

kbelliskbellis Global Mapper UserPosts: 514Trusted 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_bobbmg_bob Global Mapper Programmer Posts: 1,834
    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


    Pigeon_Srisys
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,834
    Answer ✓
    kbellis said:
    Is DEFINE_TEXT_FILE now able to handle variables as it should with v20 (b090518)?
    Yes.

    Cheers,
    Bob

Answers

  • kbelliskbellis Global Mapper User Posts: 514Trusted User
    Or is another approach to be considered?
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 1,834
    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
  • kbelliskbellis Global Mapper User Posts: 514Trusted 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_bobbmg_bob Global Mapper Programmer Posts: 1,834
    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
  • kbelliskbellis Global Mapper User Posts: 514Trusted 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.

  • kbelliskbellis Global Mapper User Posts: 514Trusted User
    Here's a peek:

  • MykleMykle Global Mapper User Posts: 428Trusted User
    Very nicely done Kelly !

  • kbelliskbellis Global Mapper User Posts: 514Trusted User
    Thanks Mykle.
  • kbelliskbellis Global Mapper User Posts: 514Trusted 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)?
  • kbelliskbellis Global Mapper User Posts: 514Trusted User
    Woohoo! Will test after meetings today in Bangor. Thanks so much for this Bob!
  • kbelliskbellis Global Mapper User Posts: 514Trusted 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?


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


Sign In or Register to comment.