Download from WMS Sources Programatically
gidianton
Global Mapper User
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
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
-
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. -
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 -
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
Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 835 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 939 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 579 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 110 Global Mapper Forum Website

