Global Mapper Pro

Rectify PNG -> Export Geotif

Breeckx
Breeckx Global Mapper User
edited October 2011 in GM Script Language
Hello,

I tried to rectify several png files and export the image as geoptiff.

I tried the script below. But it does not work correctly. Can someone tell me whats wrong with the GCP?
-> WARNING: Unknown command <GCP="OBENLI,0,0,9.030889,41.65175"> ignored.

GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL

IMPORT FILENAME="C:\path\mapimage.png" \
TYPE=PNG

LOAD_PROJECTION FILENAME="C:\path\Frankerich.prj"

GCP="OBENLI,0,0,9.030889,41.65175"
GCP="OBENRE,1592,0,9.197,41.65175"
GCP="UNTENRE,1592,753,9.197,41.597694"

EXPORT_RASTER FILENAME="C:\path\scripttest.tif" \
TYPE=GEOTIFF PALETTE=OPTIMIZED

Comments

  • global_mapper
    global_mapper Administrator
    edited October 2011
    Your GCP's should be parameters of the IMPORT command. As you have them now they are separate commands which is not valid. To see how to do it in a script do the rectifcation of the PNG in the user interface and save a workspace file (.gmw). Then look at that in a text editor. That will be a script showing you the proper format.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.