Global Mapper v25.0

Three point rectification problem

Bill Carson
Bill Carson Global Mapper User
I have a Tiff image for which I have three GCP's available which are all on the same latitude. When I perform a rectification the result is incorrect in that the latitudes are altered from what I input. I have tried rectification using manual input and by specifying GCP's from a reference image. When I use the reference image method the Tiff doesn't show up on screen, but it is shown in the control panel. Here is the GCP file from the manual entry method:

167.40404363,139.35499719,-121.0000000000,47.0000000000,"Point 1",1418.68
2397.49210467,2963.71180859,-120.0000000000,47.0000000000,"Point 2",1405.76
1274.85308683,1558.03606170,-120.5000000000,47.0000000000,"Point 3",0.00

The projection is set at geographic lat/lon when I rectify. If I try to re-rectify through the control dialog then the Tiff shows up in the reference pane in the right orientation.

Could this problem be due to the collinear nature of the GCP's I am using?

Here is the metadata for the image:

FILENAME=C:\GIS\Geology\Geophysics\Magnetics\WPPSS\Block_A_1.tif
DESCRIPTION=Block_A_1.tif
UPPER LEFT X=-121.0755809239
UPPER LEFT Y=47.7034346507
LOWER RIGHT X=-119.9242864171
LOWER RIGHT Y=46.1196145998
WEST LONGITUDE=121° 04' 32.0913" W
NORTH LATITUDE=47° 42' 12.3647" N
EAST LONGITUDE=119° 55' 27.4311" W
SOUTH LATITUDE=46° 07' 10.6126" N
PROJ_DESC=Geographic (Latitude/Longitude) / WGS84 / arc degrees
PROJ_DATUM=WGS84
PROJ_UNITS=arc degrees
EPSG_CODE=4326
COVERED AREA=3806230 acres
NUM COLUMNS=2550
NUM ROWS=3508
NUM_BANDS=1
PIXEL WIDTH=0.0004515 arc degrees
PIXEL HEIGHT=0.0004515 arc degrees
BIT_DEPTH=8
DPI=300
PHOTOMETRIC=Palette-Color
BIT_DEPTH=8
ROWS_PER_STRIP=3
COMPRESSION=None
ORIENTATION=row 0 top, col 0 lhs
MODEL_TYPE=Undefined Model (Not a GeoTIFF File)
RASTER_TYPE=Pixel is Area

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2009
    Yes, the co-linearity of the points would be a problem. You need to make sure that your control point coordinates are not co-linear in the projection that you are using to rectify. Your file is obviously not natively in the Geographic (lat/lon) "projection" as if it was the same latitude values would be at the same Y pixel location (assuming no rotation). Just try changing your rectification projection to one more appropriate for the data, like maybe a UTM projection for the coverage area that you have. Global Mapper will automatically reproject the lat/lon coordinates to UTM for you and then you can hopefully get a good rectification.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    The image I scanned was very rotated, with north about 52 degrees west of true north and I only have the three collinear GCP's available. The image says the projection is UTM but the GCP's given on the map are in Lat/Lon. So, I assume when entering these GCP's I should use the default geographic projection?

    I did two different methods, one of which semi-worked. I rotated the image in a graphics program so that north on the map was now at the top. I then rectified it in GM using the default geographic projection and it appeared close, but not exact, when I overlayed it on a reference map of a 250K USGS quad (UTM, NAD27 projection).

    I then rectified the original unrotated image in GM using a UTM projection and the lat/lon GCP's. GM warned I had entered non-UTM coordinates and I allowed it to do the conversion for me. Then I viewed the result in GM and it looked correct (i.e. - north was up). But, then I unloaded it and loaded my reference 250K quad, followed by a load of the image and the image displays very squashed around the GCP's.

    So, I appear to be getting close but still no cigar.
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    I redid the rectification of the unrotated image using UTM because I realized had left the projection datum as WGS84 when it should have been NAD27. It is no longer extremely squashed as it was, but it is still wrong. I suspect this is because of the collinear GCP's.
  • global_mapper
    global_mapper Administrator
    edited December 2009
    Are the locations of the 3 GCPs correct after rectification? Having 3 co-linear points (or even near co-linear points when in another projection) might not give you a very good representation of the coordinate mapping to get good coordinates far from the control points. Do you have any other reference maps that you could use to add additional control points, like perhaps your 250k quad?

    If you still have trouble and want to provide the map to support@globalmapper.com I can take a look.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    Yes, the locations of the three GCP's are correct, so it would appear none of the algorithms can cope with collinear GCP's which intuitively makes sense to me since the GCP's are all along one latitude and the rectification is squashed relative to latitude (i.e. it is shortened north south). It has no way of knowing what the pixelation is in the north-south direction.

    I made a scan of another block of data which had three points that were not collinear and it appears to display OK, but when I try to add another raster image of a geotiff USGS quad, the quad will not display. If I display the geotiff quad first then try to add the rectified raster then the raster won't display.

    I have run out of time today to work on it, but I plan on doing more tests tomorrow and if I don't figure it out I will send you a raster to play with.
  • global_mapper
    global_mapper Administrator
    edited December 2009
    Typically is maps will not display together when they should it means that the projection of one of the files was incorrectly specified, causing the data to be placed incorrectly on the earth. If you can provide any of the files I can provide further guidance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    After playing with this a little more, here is another piece of the puzzle. I am now working with a scanned Tiff image with 3 non-linear GCP's that are at points of lat/lon shown on the original which is said to be in UTM NAD27. So, I rectify the image by first setting the projection to UTM zone 10 NAD27 (I use the NAD27 selection off the drop down, but should I be using NAD27 conus?). Then I pick the three GCP's and give them lat/lon coordinates, which when I save them GM prompts to convert, which I allow. After I am done entering all three, the table of GCP's looks good as far as the lat/lons are concerned (I can't tell whether the UTM coordinates are right of course unless I did the calculations myself). Then I save the GCP and display the raster on a 250K USGS quad raster and everything looks good.

    But, here is where I am having problems. I then close the rectified raster image and reopen it, and say yes I want to rectify it. The rectifier dialog opens up and I notice that the lat/lon values as displayed in the table are huge numbers in the thousands. So, I just leave things as they are and leave the dialog to allow a display, but it doesn't show up on the screen. The layer shows up in the control panel, but not on screen.

    One thing I am wondering about is that the scanned image is right at the border of UTM zones 10 and 11. Most of it is in zone 10, with a very little fringe over into zone 11. Could this be causing a problem?

    Here is the GCP file it saves:

    805.37459515,3299.56466954,728076.595,5209314.449,"Point 1",0.00
    2390.32655034,1204.39944201,725938.430,5264873.951,"Point 2",0.00
    957.85054789,132.84449908,688284.298,5263540.456,"Point 3",0.00
  • global_mapper
    global_mapper Administrator
    edited December 2009
    Are you saving your rectified image to anything after rectifying, like a workspace file? If you just close the image and re-open it the control points won't be there as they aren't saved in the image. Any control points would be saved in something like a workspace file, or if you export the rectified image to a new file then the rectification will be applied on export and the new image will no longer need rectification.

    So in short after rectifying satisfactorily you should save a workspace file or export the result to a new file, then load that in the future rather than directly loading the original un-rectified image again.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    No, I have not been saving to a workspace file and I use dlgv32 so I can't save the image after rectification. But, the dialog for rectification allows me to save a control point file (.gcp) in the Options menu, or I can save a GCP or world file in the File menu. When I load the rectified image for the second time, I am assuming it is taking the control points from the GCP file I save when I first rectified it? When I open the rectified image the second time, the control points are displayed as they should be, but the lat/lon are not correct. Maybe this is because the GCP file doesn't save the projection information and thus GM would not know how to interpret the projected x and y values stored in it. I haven't been using the option to "Remember Last Projection", but I don't know where it saves it.
  • global_mapper
    global_mapper Administrator
    edited December 2009
    The GCP file only saves the coordinates, not the projection, so you would need to select the appropriate UTM projection when loading the second time with the saved GCP list.

    Also, regarding your earlier NAD27 vs. NAD27 (CONUS) inquiry, The NAD27 selection automatically uses the appropriate NAD27 specialty based on your location, since it is typically best to just select that.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    I went ahead and did the rectification again and selected the option to "Remember Last Projection" and now it displays the correct lat/lon and will display correctly after I close it and reopen it. I still don't know where it saves the projection, so it may be lost after I close each session?
  • global_mapper
    global_mapper Administrator
    edited December 2009
    The projection is saved in the Windows registry, so it should be remembered between runs.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    I see that it is saving the projection for the rectification dialog only. I suggest it would be helpful to include the projection information in the .gcp file, unless there is a reason not to. That way when I open a rectified raster it is one less thing to have to remember. I would also suggest that if a .gcp is detected for a raster that the user be given the option to either use it or re-rectify it. As it is now, you have to go through the rectification dialog to open a file that has already been rectified, again unless I am missing something.

    Thanks for your help.
  • global_mapper
    global_mapper Administrator
    edited December 2009
    The .gcp format is a pretty commonly used format that can be used in different applications. Throwing a projection in there would make it incompatible with other software.

    You can of course save a projection file when you select a projection and make it the same name as the file being rectified. Of course the recommended course of action is just to save a workspace file or export to a new image.

    If a .gcp file is automatically used you can always just select the control points and remove them to start over.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Bill Carson
    Bill Carson Global Mapper User
    edited December 2009
    Yes, I see that saving a projection file would be the next best thing.

    I think you may have misunderstand the second part of my suggestion. What I was trying to say was that when I open a file I have already rectified, but have not saved as a new image, I am always given the choice to rectify it or use fake coordinates. What I was hoping was that the .gcp file could store the projection and upon opening a raster GM would find a .gcp file with the same name and give an option to just open the file using the saved projection. But since this is not to be it is a moot point, unless there is a way to do it by having GM recognize a projection file and use it to plot the image without going through the rectify dialog? But, I think you have intended for GM to rectify a raster once and be done with it.

    I assume only certain raster formats such as geotiff or geopdf would store the projection should I export to a new image.

    Merry Christmas
  • global_mapper
    global_mapper Administrator
    edited December 2009
    Global Mapper does support using some external files to provide coordinate and/or projection information when loading a file that does not have that information embedded. This includes things like world files, Ozi .map files, TTQV .cal files, and several others, as well as projections from .prj files. What is not automatically done is pulling in position information from GCP files and a projection from a PRJ file without prompting the user to verify the rectification. This is because the GCP is considered a rectification in process under the assumption that the user would have saved the results of their rectification when they were done to a workspace or a new file.

    Nearly all of the raster export options either support embedded position and projection information or have the option to export world files and PRJ files, providing an automatic position option for them.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com