Vedran Bucko - Projects

Maker


GlobalMapper - Crop Files to Area

Download Here
This Global Mapper script crops loaded layers that are within an area. This script is very useful if you have a lot of layers to load but only need ones that fall within an area.

To use the script follow these steps:
 - Load the area (this could be any layer as it uses the maximum and minimum extends of the layer) into Global Mapper. 
 - Run the script.
 - If it asks you to save the workspace you can chose to save it or cancel not to.
 - A prompt will appear asking you to enter the file type. This is the extension not including the full stop, e.g. asc, tiff, png etc.
 - Finally you will be prompted to select the directory where the files you want to load are located (NOTE: the script will recursively loop through recursively the directory)

The script will start loading each file with the specified extension into Global Mapper and test to see if any part of the layer is within the area. If it is the layer is left, if it is not the layer is unloaded and it moves onto the next file.

Things to keep in mind.
 - This only works on rectangular areas.
 - If you do NOT want the script to load files in sub folders you need to change the variable RECURSE_DIR on line 23 to equal NO.

GlobalMapper - Clamp Terrain Sea Level to 0

Download Here
This script loops through the layers loaded into Global Mapper, checks if the minimum elevation is below 0m, clamps it to 0m if it is and sets everything below it to 0m.

I use Ordinance Terrain 5 terrain data and the sea level for each tile is based on the medium average. This is rather an annoying "feature" because adjacent tiles do not have to same sea level so it leaves a gap. Plus the sea level should really be at 0m.

This loops through all the layers open in the document so they need to be terrain files such as .ASC, XYZ, Heightmaps etc.

Batch - Directory to Text File

Download Here
This simple batch file creates a text file called \"DirectoryList.txt\" that contains a list of the directory contents the batch file is located in.

To use this batch file, place the batch file in the directory you want to get a list of its contents and run the file. This will create DirectoryList.txt with a list of all the files in the directory. The text file will include folders but will not include the contents of sub folders.

Here are a few ways to modify the batch file:
dir          > DirectoryList.txt - default batch file contents with information about the files, total files, drive details etc
dir /b       > DirectoryList.txt - only get file names
dir /s       > DirectoryList.txt - list sub folder contents
dir *.jpg    > DirectoryList.txt - file type filter

These can all be combined to suit your needs, e.g:
dir /s/b *.jpg > DirectoryList.txt

Batch - Motherboard Model

Download Here
This is a simple batch file that gets your motherboard model.

To use just run the batch file and command prompt will open and display the motherboard manufacturer and model number.

Batch - Test 7zip Integrity

Download Here
If like me you use 7z a lot to compress/archive your files and want to make sure that the compressed files have successfully been processed without errors then this batch file comes in really handy, it runs the 7z integrity test on the 7z files.

To use this script add the batch file to the directory where your 7z files are and run it. It will loop through all the 7z files and run the 7z\'s integrity test. All the output and status is displayed in command prompt.

Things to note:
You obviously need 7z installed (Get 7z here)