![]() With GIS workflows being mostly data-driven, scripts using the Python Global Mapper library often work with imported data files to process, modify, or extract new data. This allows sections of script to be re-used throughout a longer workflow. The Global Mapper Python library is object-oriented, meaning that defined objects containing specific parameters are passed to the function to complete a task. Comments are particularly important when sharing a script with other users. ![]() Even as an easily readable language, adding comments to any script helps to clarify the workflow and individual sections and lines. When creating a script in many text editors, IDEs, and Global Mapper Pro’s Script Editor, syntax highlighting will help to differentiate parts of the script, making it easier to read and understand. Wherever you choose to create your Python scripts, they can be saved with a *.py extension, marking them as an executable Python script, and opened again in any editor for future modification. The Python programming language can be written in any text editor, an integrated development environment (IDE), or Global Mapper Pro’s user interface Script Editor. Often users will shorten this name to gm ( import globalmapper as gm ) to make the name more concise when calling functions later in the script. Use the line import globalmapper to import the Global Mapper Pro library of Python functions. ![]() Like with any Python package or library, Global Mapper must be imported before any of the program-specific functionality can be used. To use an existing version of Python, add the path to the installed Global Mapper Pro program to the PythonPath environment variable. A basic installation of Python 3.9 can be added to a machine through the Extra Downloads option in the Global Mapper program installer, or an existing installation of Python can be used. To use the Global Mapper functions through Python, Global Mapper Pro needs to be installed and licensed, and Python 3.9 needs to be installed. Global Mapper Pro contains a library of Python functions that can be called and executed through the Python programming language. With many libraries available, they can be used in combination in a single Python script to accomplish a larger task or workflow. Adding to the basic installation of Python, packages and libraries (collections of packages) can be installed and used in scripts. With the base installation of Python containing a comprehensive standard library, users can hit the ground running and begin scripting using the built-in keywords, conditional statements, loops, and operators. Due to Python’s popularity as an open-source language, it has been the basis for much workflow automation throughout GIS and other industries. One of the most popular programming languages, Python is an interpreted language that is easy to learn, read, and write. To test out Global Mapper Pro, download a 14-day free trial today! What is Python? To learn more about how Global Mapper Pro can help you, check out the Blue Marble blog and past webinars posted on our YouTube channel. Included in Global Mapper Pro is the ability to use the Python programming language to automate workflows and combine the power of Global Mapper Pro with tools from third-party libraries. ![]() Built as an expansion to the base Global Mapper standard program, the Pro edition makes a suite of cutting-edge geospatial analysis tools accessible to novice and expert users. Global Mapper Pro, the latest development from Blue Marble Geographics, is a complete geospatial software program containing functionality from data creation to advanced point cloud editing and analysis.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |