Using Batch Convert/Reproject to Change Sample Spacing Results in Incorrect Spacing
mprenter
Global Mapper UserTrusted User
Hi, I've got a bunch of 0.5 foot images that I need to convert to 1 foot. If I load one of the images and export it out, changing the spacing from 0.5 to 1.0, it works fine. However, if I use the Batch Convert/Reproject function to batch convert thousands of images this way, many of the output images have an extra row of white pixels at the right or bottom and the world files seem to show rounding errors.
Here is a 1.0 foot world file saved manually out of Global Mapper:
1.00000000000000000
0.00000000000000000
0.00000000000000000
-1.00000000000000000
2298268.50000000000000000
14714227.50000000000000000
And here is the same 1.0 foot world file using Batch Convert/Reproject:
0.99990874247121919
0.00000000000000000
0.00000000000000000
-0.99990874247125383
2298268.49995437120000000
14714227.50004562900000000
I take it this same rounding error is causing the extra line of white (background) pixels at the right and bottom edge.
Mark
Here is a 1.0 foot world file saved manually out of Global Mapper:
1.00000000000000000
0.00000000000000000
0.00000000000000000
-1.00000000000000000
2298268.50000000000000000
14714227.50000000000000000
And here is the same 1.0 foot world file using Batch Convert/Reproject:
0.99990874247121919
0.00000000000000000
0.00000000000000000
-0.99990874247125383
2298268.49995437120000000
14714227.50004562900000000
I take it this same rounding error is causing the extra line of white (background) pixels at the right and bottom edge.
Mark
Comments
-
Mark,
When you are changing the resolution during batch conversion, exactly which option are you choosing to change the sample spacing?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hi, I hit the "Setup Sample Spacing" button and select "Specify Sample Spacing as Absolute Spacing Values" and type in "1.0" for the X and Y Spacing.
Mark -
Mark,
Are any of the source images perhaps in slightly different projections or something? Can you provide one of the sample images that creates the different size on export? In the Advanced section of the General tab of the Options dialog do you have the option checked to maintain the export bounds over the spacing?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mark,
Are any of the source images perhaps in slightly different projections or something? Can you provide one of the sample images that creates the different size on export? In the Advanced section of the General tab of the Options dialog do you have the option checked to maintain the export bounds over the spacing?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hello, I do not have the "Maintain Export Bounds Instead of Sample Spacing" checked.
The images do not have a projection set up. When the first image loads, I define the projection and check the option to use the same projection for the remaining images.
Yes, I can provide an image. I'll see if I can figure out how to "Direct Message" you our FTP info.
Thanks,
Mark -
Mark,
I took a look and found the issue (the "Maintain Export Bounds Instead of Sample Spacing" was being treated the opposite of how it should when manually providing a spacing) and fixed it. I have placed a new build at http://www.globalmapper.com/global_mapper12.zip with the change for you to try. Simply download that file and extract the contents into your existing v12.xx installation folder to give it a try. If you are using the 64-bit v12 version there is a new build at http://www.globalmapper.com/global_mapper12_64bit.zip .
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Did this affect scripted and normal GUI operations, as well as batch mode, if sample spacing was manually specified?
-
No, the bug only affected batch conversion where you over-rode the default spacing.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks, seems to work fine now.
Mark
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website