POLYGON_CROP_USE_EACH clips overlaps (for image output)

tjhbtjhb Global Mapper UserPosts: 454Trusted User
edited March 2011 in Bug Report

We have been testing the new POLYGON_CROP_FOLDER_ATTR export parameter and are so far very pleased with how it works. No known issues. More feedback on it shortly.

But in testing it, we came across an unrelated issue with POLYGON_CROP_USE_EACH. (It arises whether POLYGON_CROP_FOLDER_ATTR or only POLYGON_CROP_NAME_ATTR is used).

In the present case we're rendering a vector dataset into GeoTIFF tiles. The tiles are intentionally overlapped, to allow making a seamless dataset in subsequent steps (mainly in Photoshop, before coming back to GM).

If this is done in two scripts then everything works as expected. (1) Load vector data, export to cropped vector tiles, (2) load each vector tile, assign a custom style, and export to GeoTIFF. The vector data is output with overlaps between tiles, and the rasterization shows overlaps as expected.

But if it is done in one script then we see an issue. Load vector data, assign a custom style, export to cropped GeoTIFF tiles. The resulting raster tiles still technically overlap by the specified amount (several kilometres), but the overlapped areas are blank (i.e. have the background colour, black).

It's as if in the second case (but not in the first), each polygon tile is first being cropped from all its neighbours, before the export is made. Or (more likely?) as if areas specified in POLYGON_CROP_FILE are also being rendered, with a black fill style, over top of the loaded data. (As far as I'm aware, they shouldn't be rendered at all, only used for cropping.)

Is this expected behaviour, and can it be avoided?

While I'm at it, would it be possible to explicitly define the projection of the file used for cropping (specified in POLYGON_CROP_FILE), rather than relying on the file's own metadata (e.g. a PRJ) or user input?

I'll attach the two scripts we're using for (A) and (B) above. (For (A) it is just the script for step (1).)

Tim Baigent


  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited March 2011

    I believe that I have a fix for your direct export to raster problem where the overlap areas were rendering as well. 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 .

    For the polygon crop files I would suggest creating a PRJ file with the projection for the files, then that should get picked up automatically without any prompting needed.

    Let me know if I can be of further assistance.


    Global Mapper Support
  • tjhbtjhb Global Mapper User Posts: 454Trusted User
    edited March 2011
    Thanks very much Mike, we'll test that right away—while you have some Sunday evening dinner! I wish I could offer you a nice glass of wine to go with it.
  • tjhbtjhb Global Mapper User Posts: 454Trusted User
    edited March 2011
    Fabulous, works perfectly. (And more quickly I think? That might make sense.)

Sign In or Register to comment.