Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to form a mosaic from two overlapping images of an old tithe map. I've used the georeferencer plugin using one of the images as canvas to generate a modified version of the other. I then used Raster>Miscellaneous>Merge. This generates the following commandline:

gdal_merge.py "/home/ian/Maps/Stubbin/1801 map Stubbin prt 1.JPG" "/home/ian/Maps/Stubbin/1801 map Stubbin prt 2_modified.jpg"

This gives an error:

ERROR 1: Attempt to create 2768x-1659 dataset is illegal,sizes must be larger than zero.

This seems to be related to the fact that image metadata for the original images shows the layer extents as 0.0, -1651.0 : 2339.0, 0.0 and other digital camera images also have -ve extents.

How do I work round this?

Platform is QGIS 1.8.0 on Debian Squeeze 64-bit.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

To give your images positive coordinates, try georeferencing one image first with approximate real-world coordinates (make a points layer with known coordinates and then overlay the image); then, georeference the second with the edges of the first.

Assuming that the tithe map comes from the same map (approximately the same projection / scale?), you would want to make sure that the first image is not distorted - use a linear transformation with only two points on the first image.

share|improve this answer
    
Thanks, Simbamangu, –  Ian Goddard Oct 2 '12 at 13:44
    
Thanks, @Simbamangu, I'm getting there. I built a points file to set three of the corners to what they should be, eg. top left, which was 0,0 becomes 0, 1651 & bottom left which was 0,-1651 becomes 0,0 & applied that as a linear transform. I then georeferenced the other image as before. This looked OK when displayed as layers with a spline transform but has a wedge-shaped gap when I generate the merge. So I'll go back & try your suggestion of georeferencing for the edges only. –  Ian Goddard Oct 2 '12 at 13:54
    
I tried another merge on the pair of images which gave be the black wedge above & this time ticked the No data box & the generated image is now OK. How do I update the title to say solved? –  Ian Goddard Oct 2 '12 at 14:06
    
Hi @IanGoddard welcome to GIS.se, and glad that worked! Interesting to know that the nodata box helps with the black margins. There's a little 'check box' near the upper left of my solution here which you can tick - see this link for an explanation of how this (and other) sites work. –  Simbamangu Oct 2 '12 at 14:35
    
Thanks @Simbamangu. It didn't, in the end, get me to where I wanted. When I then try to overlay onto a scanned OS map however many or few GCPs I provide it puts it down about half a mile S of where it should be. I think I'm going to have several problems with this project & ISTM that this particular one was somewhere in the middle. I'll start a new question at the beginning & see how much else falls into place –  Ian Goddard Oct 3 '12 at 16:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.