Global Mapper v25.0

What is the proper form for writing EXPORT_LAYER= when there are multiple layers?

kbellis
kbellis Global Mapper UserTrusted User

For example, I've tried both of these methods, but neither worked.

EXPORT_LAYER="ARCH D Sheet Outline,Val Sheet Outlines"

EXPORT_LAYER="ARCH D Sheet Outline","Val Sheet Outlines"

Tagged:

Answers

  • kbellis
    kbellis Global Mapper User Trusted User

    Hello... Bob Cave, are you still here?

  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User

    Hi kbellis,

    Have you tried multiple EXPORT_LAYER parameters? E.g.:

    EXPORT_LAYER="ARCH D Sheet Outline" EXPORT_LAYER="Val Sheet Outlines"

    You didn't mention which EXPORT_xxx command you were using, but as far as I can tell, this is supported by EXPORT_VECTOR , EXPORT_RASTER, EXPORT_ELEVATION, EXPORT_PACKAGE, and others. Per the documentation for EXPORT_VECTOR (https://www.bluemarblegeo.com/knowledgebase/global-mapper-24/cmd/EXPORT_VECTOR.htm):

    • EXPORT_LAYER - filename or description of layer(s) to export. By default all compatible and exportable layers are exported. You can include multiple EXPORT_LAYER parameters if you have multiple masks to search. Wildcards (* and ?) are supported. Hidden layers are not considered.

    Hope that this helps.

    Best regards,

    ~Jeff

  • kbellis
    kbellis Global Mapper User Trusted User

    Thank you Jeff for your reply. And thank you for including the current wording found in the script reference material for EXPORT_LAYER

    Yes, I understand the command prefix EXPORT is applicable for more than just exporting layers, but that wasn't the question.

    Correct me if I misunderstand, but a single command with multiple parameters is what the sentence "You can include multiple EXPORT_LAYER parameters if you have multiple masks to search." means to me every time I have read it. What you showed in your "Have you tried?" question above is not illustrative of that one command with many parameters sentence. Nor is that example illustrative of "multiple masks". As best as I can tell, the term MASKS in Global Mapper is used in context of FILE_NAMES and there are no example scripts given where masks are employed with EXPORT_LAYER, and was why I started this thread. While there are many places in the scripting reference where these two sentences appear "You can include multiple XXXX_XXXX parameters if you have multiple masks to search. Wildcards (* and ?) are supported." but the Sample Scripts given at the very end of the Global Mapper Scripting Reference only show examples like FILENAME_MASKS="*.LAS"

    In answer your question "Have you tried multiple EXPORT_LAYER parameters? E.g.: EXPORT_LAYER="ARCH D Sheet Outline" EXPORT_LAYER="Val Sheet Outlines"" - Yes, and it didn't go well, and I ended up only using the single command single parameter structure.

    I started to attach the script I ended up using, but was surprised to see it was no longer permitted and I saw no way to format the text in this forum powered by Vanilla. Pasting in the script as simple text also created a problem due to is length. Finally, the zipped file is attached in case you want to examine it, though it has previously been emailed to GeoHelp.

    You're also welcome to check out the exported PDFs which have been assembled using Affinity Publisher and is available here:

    https://forum.affinity.serif.com/index.php?/topic/168442-preliminary-progress-proof-sullivan-val-sheets-on-2020-orthos-20221004pdf/



  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User

    "Yes, I understand the command prefix EXPORT is applicable for more than just exporting layers, but that wasn't the question."

    Your question was "What is the proper form for writing EXPORT_LAYER= when there are multiple layers?" That's pretty general. My point here was that the EXPORT_LAYER parameter is used in many EXPORT_xxx commands, and appears to work in the same way for all;. i.e., multiple EXPORT_LAYER parameters are allowed in a single EXPORT_xxx command, and that's the correct form for expressing that you want select multiple layers for an export operation, which I think answers your question, but in a more general form. Remember that this is a public forum, and that general answers may help other Global Mapper users with similar questions / issues.

    "Correct me if I misunderstand, but a single command with multiple parameters is what the sentence "You can include multiple EXPORT_LAYER parameters if you have multiple masks to search." means to me every time I have read it. What you showed in your "Have you tried?" question above is not illustrative of that one command with many parameters sentence. Nor is that example illustrative of "multiple masks"."

    Well, I certainly did mean a single EXPORT_ command with multiple EXPORT_LAYER parameters. My example just showed the EXPORT_LAYER parameters using the layer names that you provided, and which would export those two layers to a single output file, and which you would specify in the whole EXPORT_xxx command (you didn't specify which format you were exporting to or any other parameters you might need in the export). Even so, my example actually is an illustration of multiple masks since each EXPORT_LAYER parameter is by definition a mask, whether it contains wildcards or not. I do think that the documentation's phrasing -- "if you have multiple masks to search" -- is a little unclear there. An EXPORT_LAYER parameter is just a way of specifying one or more layers for the collection of loaded layers that are to be exported to the single export file that's specified by the FILENAME parameter, and you can have multiple EXPORT_LAYER parameters in an EXPORT_ command.

    Anyway, judging from the example script file that you provided, it looks like multiple EXPORT_LAYER parameters don't really help your case. Your sample appears to be generating a single export PDF for each of a number of single layers from your loaded layers, and multiple EXPORT_LAYER parameters don't really help that. It may be that some form of layer loop (LAYER_LOOP_START ... LAYER_LOOP_END) might be useful, but it's hard for me to tell, and that would be a research project for another day

    In short; you're trying to get an EXPORT_ command to export to multiple target files. The only way to do that currently, as far as I know, is by using the SPLIT_BY_ATTR parameter, in which case it will a single target file for each unique attribute in the input. That doesn't appear to to be the case with your example, either.

    In general, though, each EXPORT_ command exports some number of layers to its single target, in a some specified format. The command will consider all loaded layers as its input; some input layers may be filtered out automatically, say, due to incompatibility with the chosen export format, and the user can filter the loaded layers explicitly, by using things like EXPORT_LAYER masks, or SHAPE_TYPE parameters. Beyond that, the user can filter features from the included layers by using bounding box parameters or polygon cropping parameters.

    Again, I hope that this helps. Best regards,

    ~Jeff

  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    Answer ✓

    Correction from my above reply:

    I said:

    "Anyway, judging from the example script file that you provided, it looks like multiple EXPORT_LAYER parameters don't really help your case. Your sample appears to be generating a single export PDF for each of a number of single layers from your loaded layers, and multiple EXPORT_LAYER parameters don't really help that. It may be that some form of layer loop (LAYER_LOOP_START ... LAYER_LOOP_END) might be useful, but it's hard for me to tell, and that would be a research project for another day."

    I looked a little more closely at your sample script, and now I see that it looks like you are generating multiple export files (PDFs) from single layers, using a LAYER_BOUNDS parameter to specify a layer that supplies the bounds of the region to be exported. So a bit different from what I initially thought, but as far as I can tell, there's no way to make a single EXPORT_ command automatically generate multiple export files from a collection of separate layers that specify the bounds to be used. Such a mechanism would probably require a new system akin to the SPLIT_BY_ATTR parameter, with a mechanism that varies the output filenames in some related way.

    So a bit different than I originally thought, but still not possible in today's Global Mapper.

    ~Jeff