Global Mapper Pro

Download from WMS Sources Programatically

gidianton
gidianton Global Mapper User
edited October 2014 in Downloading Imagery
Hello,

I would like to access a WMS source that I can save the image from my bbox in high definition. I have used the Global Mapper options to do this through the GUI through File|Export but for my purposes I am needing to write a python script to access the WMS directly and download using owslib. The problem is that when I go into the list of maps, it doesn't show me the source URL's it is pulling from. How can I see the source servers where Global Mapper is pulling from instead of just the Server Titles.

Thanks
Gid

Comments

  • DMcKittrick
    DMcKittrick Global Mapper Trainer Trusted User
    edited September 2014
    In the 'Select Online Data Source to Download' dialog box, right-click on the selected server name to access the source web page where you should be able to find the server URL.

    By the way, you indicate that your intention is to generate a Python script to save a local file from a WMS. You can easily do this using a Global Mapper script using the following commands:

    GLOBAL_MAPPER_SCRIPT VERSION=1.00
    UNLOAD_ALL
    IMPORT_WMS SOURCE_DESC=I]Type the name of the service in Global Mapper's 'Select Online Data Source to Download' dialog box[/I

    You can also define the extent of the imagery to be exported by adding the POLYGON_CROP_FILE parameter to the EXPORT_RASTER command.

    For more information on scripting in Global Mapper, refer to the online Scripting Reference or watch the Introduction to Scripting Webinar.
  • gidianton
    gidianton Global Mapper User
    edited October 2014
    Hey,

    Thanks for that suggestions - I was not aware one could script Global Mapper directly to do this. I am still having troubles with viewing the URL. I right-click on the server name as suggested but it gives me the option to Edit/Source Name Group... and when I select this it gives an error that 'You cannot edit a built-in-source'. Did I misunderstand?

    Thanks again for the suggestion about Global Mapper
  • DMcKittrick
    DMcKittrick Global Mapper Trainer Trusted User
    edited October 2014
    It would appear that you are using an older version of the software. The link to the source page for the WMS server was added during one of the latter releases of version 15. There is another way you can see the URL. Simply load the required service and save a Workspace file. Open this .gmw file in Notepad and you will see the URL listed in the fifth line.

    I hope this helps.

    - David McKittrick
    Senior Applications Specialist
    Blue Marble Geographics
Sign In or Register to comment.