Georeferencing question

Gambin Dejan Dejan.Gambin at PULA.HR
Thu Jan 5 00:05:00 PST 2006


Thanks Frank,

I have tried using four corner points, just for testing (I know I have
to find more gcp-s):

gdal_translate -gcp 0 0 5409006.4226 4970689.5864 -gcp 0 5931
5409006.4226 4970064.7150 -gcp 7590 0 5409806.0064 4970689.5864 -gcp
7590 5931 5409806.0064 4970064.7150 025-k.jpg 025-k-translated.tif

gdalinfo on 025-k-translated says:


Then I tried:

gdalwarp -tps -co "TFW=YES" 025-k-translated.tif 025-k-warped.tif

but I get 

"Creating output file that is 1417111232P x 0L.
ERROR 1: Attempt to create 1417111232x0x3 TIFF file, but width, height
and bands must be positive.

Obviously I am doing something wrong, I am not very familiar with the
transformation algorithms (although I would very like to know where can
I read something about this), I can only run gdawarp with "order 1".

I would appreciate if you can tell me what is wrong and do you maybe
have suggestions/advices on how to proprely choose gcps. transformation
algorithms, resampling methods, etc. Maybe I can read it somewhere so I
can really learn :-))

thanks

dejan

> -----Original Message-----
> From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On 
> Behalf Of Frank Warmerdam
> Sent: Wednesday, January 04, 2006 5:22 PM
> To: Gambin Dejan
> Cc: MAPSERVER-USERS at lists.umn.edu
> Subject: Re: [UMN_MAPSERVER-USERS] Georeferencing question
> 
> 
> On 1/4/06, Gambin Dejan <Dejan.Gambin at pula.hr> wrote:
> > Hello,
> >
> > I know it probably belong to gdal list but I'll give it a try here..
> >
> > I am trying to georeference my scanned paper maps. I have 
> tried using 
> > QGIS Georeferencer plugin, it works ok for linear 
> transformation but 
> > the resulting georeferenced raster map does not fit vrey well, 
> > probably because of deformations etc. I have tried using Helmert 
> > transformation but unfortunatelly QGIS crashes (running on Windows).
> >
> > So I tried using gdal_translate and gdalwarp. I took the corner 
> > coordinates (only UpperLeft and BottomRight for testing) and run 
> > "gdal_translate -gcp 0 0 5409006.4226 4970689.5864 -gcp 7590 5931 
> > 5409806.0064 4970064.7150 025-k.jpg 025-k-translated.jpg -of JPEG". 
> > But setting output format to JPEG results in unchanged output image.
> >
> > I suppose it is normal and gdal_translate cannot create gc 
> points in 
> > this way? Do I have to use default TIFF output format?
> 
> Gambin,
> 
> Only a few formats support GCPs.  You would need to write 
> output to a format like TIFF or VRT.
> 
> > What to do next with gdalwarp? What type of transform and 
> resampling 
> > to use?
> 
> If you succeed in attaching a fair number of GCPs (at least 
> more than the 3 defining an affine transform) then you could 
> try the -tps switch to use thin plate splines instead of 
> simple polynomials. It may give better results.
> 
> Best regards,
> --
> ---------------------------------------+----------------------
> ----------
> ---------------------------------------+------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial 
> Programmer for Rent
> 



More information about the MapServer-users mailing list