Importing ground control points from file with a bottom left source

herbamaticherbamatic Global Mapper UserPosts: 16
Hi,
I have a bunch of scanned topo maps (mostly jpeg, some tiff) that come with coordinate files. I believe these have the image control points specified in pixel x and y from the bottom left of the image but it looks like GM uses the top left. Is there some way to deal with these?
I think the files were exported from Netcad, and I have a few hundred of them...
Thanks

Comments

  • STHSTH Global Mapper User Posts: 434Trusted User
    edited August 2015
    Several suggestions:

    1. Load them with your current coordinate files. Then shift the images the amount of pixels required (look at this post: http://forum.globalmapperforum.com/discussion/comment/7451/#Comment_7451) and then save them or just save them and generate only new header files.
    2. Create a script that subtracts the value for each of the coordinate- files. I would guess the first option is easiest for you?
  • herbamaticherbamatic Global Mapper User Posts: 16
    edited January 2009
    maybe I am missing something, but wouldn't a simple x-y shift not work because the coordinates are essentially rotated by 90?
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2009
    If the coordinates are just placed at the wrong corner that shouldn't flip the image, unless your Y pixel size was also negated.

    Exactly what method is being used to position the files? For example do you have world files or some other kind of header file that the position information is coming from?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • herbamaticherbamatic Global Mapper User Posts: 16
    edited January 2009
    the position information comes from a header text file that contains pixel x and y with the related ground points in xy like this: (and i simplified this)

    RasterPY1 0
    RasterPX1 0
    MapPY1 458250
    MapPX1 4596183
    RasterPY2 1638
    RasterPX2 0
    MapPY2 500006
    MapPX2 4596183
    RasterPY3 1638
    RasterPX3 2184
    MapPY3 500006
    MapPX3 4651858
    RasterPY4 0
    RasterPX4 2184
    MapPY4 458250
    MapPX4 4651858

    as its coming from Turkey, the x and y are "inverted" that is X is northing and Y is easting.
    the pixels in the raster are referenced from the bottom left of the image, and from what I see of exporting gcp text files, the pixel source in global mapper is the top left and increases x to the right and y down.
    thanks
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2009
    You just need to generate a GCP file and invert the sense of the Y pixel coordinates by using the following formula:

    new_y_pixel = image_height - orig_y_pixel;

    The 'image_height' values appears to be 1638 in your sample, assuming that your control points are at the corners.

    Each line of the GCP file should look as follows:

    <x_pixel>,<y_pixel>,<x_ground>,<y_ground>

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • revvanrevvan Global Mapper User Posts: 2
    edited May 2009
  • revvanrevvan Global Mapper User Posts: 2
    edited May 2009
Sign In or Register to comment.