Odd Raster Export Results in a Script

gomckenz
gomckenz Global Mapper User
edited June 2008 in Technical Support
I have a series of XYZ files that I want to import as ascii and export as PNG. The script seems to work fine except for one small detail.

The exported PNG files show my data split into sections. For example, the very first file processed is a long narrow strip of data. It has data on the west side and the east side of the image with a big gap in the middle. It looks like the image is wrapped around the edges. Other images that should be square are broken into smaller pieces with these same kind of gaps.

I can process each file individually and everything is just fine. I'm wondering what I might have wrong. I've tried the export with and without the spatial_res.

GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD ALL
IMPORT_ASCII FILENAME="D:\E09.xyz" TYPE="ELEVATION" COORD_DELIM="AUTO" COORD_ORDER="X_FIRST" PROJ_EPSG_CODE="26910" SPATIAL_RES=1.0,1.0
EXPORT_RASTER FILENAME="D:\E09.PNG" TYPE="PNG" FORCE_SQUARE_PIXELS ="YES" GEN_WORLD_FILE=YES PALETTE="GRAYSCALE" BG_TRANSPARENT
IMPORT_ASCII FILENAME="D:\G09.xyz" TYPE="ELEVATION" COORD_DELIM="AUTO" COORD_ORDER="X_FIRST" PROJ_EPSG_CODE="26910" SPATIAL_RES=1.0,1.0
EXPORT_RASTER FILENAME="D:\G09.PNG" TYPE="PNG" FORCE_SQUARE_PIXELS ="YES" GEN_WORLD_FILE=YES PALETTE="GRAYSCALE" BG_TRANSPARENT

Comments

  • global_mapper
    global_mapper Administrator
    edited June 2008
    You need to add an UNLOAD_ALL command after your EXPORT_RASTER commands. As you have it now you are accumulating XYZ files as you keep importing them without unloading them when you are done exporting them.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • gomckenz
    gomckenz Global Mapper User
    edited June 2008
    Took a second look and as it turned out I had used unload_all but had typed it wrong, omitting the _ for file one and two. Bad search and replace in the text editor.

    Thanks for the help