Global Mapper v26.0

URGENT: Resampling method wrong

STH
STH Global Mapper UserTrusted User
edited January 2010 in Bug Report
When importing some GeoTIFF-files and selecting a coordinate system (for instance SWEREF99 TM) - then going to Tools - configure - Projection and selecting a custom made system. I now want to export this to the new system.

File - Export - Raster will now give me the correct output-files however with "jigsaw-pattern" on straight lines (see attached image). It seems the resampling method used is nearest neighbour - however bicubic or another should be selected to avoid this jigsaw-pattern.

To avoid this I also tried to select SWEREF99 TM to begin with (also in the tools - configure - projection) and then Batch Convert/Reproject I get rid of the jigsaw-pattern - but the finished file will be located wrong for this specific coordinate system. Using Batch Convert/Reproject to another coordinate system (not UK72 custom made but SWEREF1800) it will not give the displacement.

So 1 crucial fix is needed:
- Make it possible to choose resampling method (nearest neighbour which is default now, bicubic and others that are available) - either through GlobalMapper or registry edit.

1 small fix have to be made:
- Why does not Batch Convert/Reproject to UK72 custom prj- file work?(attached below)


PROJCS["Transverse_Mercator",GEOGCS["Geographic Coordinate System",DATUM["UK72",SPHEROID["GRS 1980",6378137.000,298.257222101]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["scale_factor",1.00006900],PARAMETER["central_meridian",18.03473900000047],PARAMETER["latitude_of_origin",0],PARAMETER["false_easting",128594.600],PARAMETER["false_northing",-6525959.45],UNIT["Meter",1]]

Comments

  • global_mapper
    global_mapper Administrator
    edited January 2009
    You just need to enable interpolation for your layer prior to export. To do this simply select the layer in the Control Center, press Options, then check the Anti-Alias option.

    This is automatically done during batch conversion if you are reprojecting or resampling your data, but a manual selection is required in the user interface.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • STH
    STH Global Mapper User Trusted User
    edited January 2009
    Quick reply and good support as always! It works as wanted. Just too bad we discovered it after delivery of the data :(.

    Regarding the second issue it works with the first method now so you dont have to fix that issue.
  • illu
    illu Global Mapper User
    edited May 2009
    I just used the demo version to see if we should buy the program.
    What I cannot figure out, is how to zoom out a lot and still have good image quality. Or what I really want to do is to convert an image which is in 0.25 meter per pixel to one of 8 meter per pixel.
    It seems to use the nearest neighbor pixel here. (turning on the interpolation doesn't help... nor is this expected to help, as I'm zooming out and there is nothing to interpolate). I expected to somehow average the 32*32 pixels that make up a single 8 meter pixel.

    How can I do this???
  • global_mapper
    global_mapper Administrator
    edited May 2009
    Currently bilinear interpolation is the best resampling method available in Global Mapper, but it won't help much when zooming out by a factor of 32. We do plan on adding better resampling methods in a future release, but for now your best option would be to enable interpolation and do the export multiple times, decreasing the resolution by say a factor of 2-4 each time until you get to the desired resolution (i.e. export at 0.50, then 1.0, then 2.0, then 4.0, then 8.0 meters per pixel).

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • illu
    illu Global Mapper User
    edited May 2009
    Not sure if that is the right solution as the actual image is made out of parts with different resolution. That would become a complicated process of zooming out and adding the right data at the right time. Not very handy.

    Note that the effect of zooming out with the current method is an extremely noisy picture, which is unfortunate, because zooming out normally gives an opportunity for making a picture better, and surely less noisy.

    - frans
  • tjhb
    tjhb Global Mapper User Trusted User
    edited August 2009
    Currently bilinear interpolation is the best resampling method available in Global Mapper, but it won't help much when zooming out by a factor of 32. We do plan on adding better resampling methods in a future release, but for now your best option would be to enable interpolation and do the export multiple times, decreasing the resolution by say a factor of 2-4 each time until you get to the desired resolution (i.e. export at 0.50, then 1.0, then 2.0, then 4.0, then 8.0 meters per pixel).

    Mike,

    This is the most significant limitation we face using Global Mapper, and we face it every day.

    GM does a good job of resampling up; but resampling down is a noticeable weak point. We gathered that bilinear resampling was being used; it's good to know that for sure.

    When we want to resample one of our topographic textures (the finest being at 10m per pixel) for output at a custom scale and resolution—this might be anything from 20 to several hundred metres per pixel)—our typical workflow is as follows.

    Export from GM at native resolution -> image A
    Export from GM at target resolution, note pixel dimensions, discard image, but keep worldfile
    Import image A to Photoshop, and resample to the same pixel dimensions noted in step 2, using bicubic (sharper)
    Marry worldfile from step 2 to the resulting image

    There's a lot of wasted processing in this workflow, and perhaps we're not being as clever as we should be. For example, it might be possible to get the target pixel dimensions out of GM along with the corresponding worldfile, without actually doing the resampling. If so, we haven't figured that out.

    (The same thing applies for resampling a DEM, but it tends to be less crucial. Sometimes we use Surfer, which does a noticeably better job than GM; but Surfer is easily overwhelmed by quantity of data.)

    The difference between the result out of GM (even with anti-aliasing on) and the result out of Photoshop is very great. I've been meaning to send you some illustrative samples for a while, but it sounds as though you're aware of the limitation. (I'll try to get around to sending an example anyway.)

    We noticed improvement from GM 9 to GM 10, and GM 11 is as good if not slightly better again, but there's still a large qualitative difference between GM and Photoshop.

    It would be very helpful (to us, every day) if some version of bicubic resampling (we find Photoshop's bicubic (smoother) method really is "best for reduction" as Photoshop claims) could be added to Global Mapper, if this could perhaps be bumped up the agenda.

    Tim Baigent
  • global_mapper
    global_mapper Administrator
    edited August 2009
    Tim,

    Thank you for your comments. I've placed better sub-sampling support on our "big board" for high-priority todo items. Hopefully it can be added for the v11.01 release so you can use Global Mapper for your entire workflow.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • tjhb
    tjhb Global Mapper User Trusted User
    edited August 2009
    That would be really very welcome Mike. Thanks for giving it your attention.
  • billjoe
    billjoe Global Mapper User
    edited November 2009
    Mike,

    thank you for all the new features in v11.01! But the most important feature for us is not included :( bicubic resampling... may be in version v11.02? Every day we have to do the same workflow with export to Photoshop for resampling and then import back in GM...
  • global_mapper
    global_mapper Administrator
    edited November 2009
    That is on our high-priority todo list, so hopefully it will be in v11.02. Based on the poll over on the Suggestions thread that is lower priority than several other items though.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • tjhb
    tjhb Global Mapper User Trusted User
    edited November 2009
    There's a voting phenomenon that arises in local council elections, where everyone can vote for as many candidates as they like, with all votes carrying equal weight.

    Everyone votes for their first preference first, the person they most care about and would most like to represent them. They then vote for someone (or more than one other person) whom they neither care about nor strongly object to.

    Now imagine that, while people differ quite a bit in their first choice of politician, they tend to differ less in the people they would put second (or third). If this is so, then since all votes carry equal weight, the person most widely considered to be second rate or third rate (but not completely awful) will win the election. Not the person whom the largest group of people would put first.

    I don't know, of course, but I suspect this might have happened in the features poll.
  • global_mapper
    global_mapper Administrator
    edited November 2009
    That is possible. It is currently the #5 top vote getter and one of the higher ones is done, so likely it will be done for v11.02 and the 3 remaining above that will almost certainly be in v11.02 and 2 of them (PSD/PSB support and coloring areas based on attributes won't be very difficult).

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • tjhb
    tjhb Global Mapper User Trusted User
    edited November 2009
    I just realized that my post was possibly offensive, suggesting that what was included in 11.01 was second rate.

    I'm sorry Mike, I didn't mean it that way at all. (Though I do think that way about local council politicians.)

    I only meant that, by analogy, it's possible that the apparent ranking of future features is a skewed towards what would be nice to have "as well", rather than what is most desired by the most people.

    Either way, bicubic resampling would not have been near the top of the list. I'm really pleased to hear the plans for 11.02. All three of the features you mention (two of them sounding quite firm) would make a big difference to us. Thanks very much.
  • global_mapper
    global_mapper Administrator
    edited November 2009
    No offense taken. There has been a suggestion to allow voting multiple times on that poll to reflect just what you talked about, but I'm not sure that the polls support doing that.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • STH
    STH Global Mapper User Trusted User
    edited January 2010
    I remember I had this issue some time ago, and now I bumped into it again, trying to make multiple outputs (0,25 0,50 1 2 4 8 16m resolution) from a set with 0.10m resolution images. atleast the 0,1m to 1m is getting very jiggy.

    It would be nice with a warning message when doing a downsamling that explains that when downsampling too much (for instance merging more than 3 pixels? dont know the correct threshold here, for instance from 0,1m to 0,3m = OK and no warning, but 0,1m to 0,4m and the warning is displayed).

    I`ll cast my extra vote for including more methods for resampling. Copy-pasted from possiblites with another software:
    Available methods are:
      nearest neighbour resampling (default, fastest algorithm, worst interpolation quality).
      bilinear resampling.
      cubic resampling.
      cubic spline resampling.
      Lanczos windowed sinc resampling

    As a side note I would also mention that customers using different layers are not usually too good at selecting the correct set to use. For instance when they zoom in more than 1:1 on the 1m layer then they should switch to the 0,5m layer instead of working on the 1m layer. Instead the continue to use the 1m layer and ofcourse then they see the "jiggyness".
  • global_mapper
    global_mapper Administrator
    edited January 2010
    I think that including additional methods of sub-sampling (starting with bicubic) will address the issue automatically for the most part, avoiding the need for some kind of warning dialog. Typically users that are familiar enough with sampling to actually change their export sample spacing from the default are savvy enough to realize that this will obviously cause some degradation without having to be warned about it.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com