[Gdal-dev] RE: Gdal_translate issues
Sampson, David
dsampson at NRCan.gc.ca
Wed Nov 29 08:03:50 EST 2006
Frank,
Thanks for the feedback.
I guess number one sums up my problem. I would expect the GCP's valid
for the original would be used and re-calculated for the -outsize image
result. However, with it not being the case I now have to figure out the
math to choose new theoretical points.
In my process the GCP's are a combination of identification of the first
image in an aerial flight line. The points to translate them to are
grabbed from a DB and then matched. I have generated code to produce a
batch file that gives a unique coomand line to manupulate each image. As
the scaling factor changes between photo types I was hoping all I had to
replace wast the -outsize % % values given by the user.
Re-computing pixel values will be an interesting endevour.
I will do a test case and see if that resolves my issue.
For number two. Just to clarify, are we both in agreance that in
gdal_translate you should be able to determine the GCP's based on the
origanl and IF the -outsize option is selected then GDAL_translate
calculates what the output GCP's should be? This would be perfect for
my application. Is there documentatio of how I should prioritize the
bug? Mainly what P value to use (eg p1 or p4)
About the math. Quick question. I would have to calculate new GCP's for
ALL FOUR point or just three, excluding the upper left?
I don't have a firm grasp of what happens to the pixels when -outsize is
used. It looks like that both pixel numbers and pixel resolution drops.
Cheers
-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com]
Sent: November 29, 2006 03:40
To: Sampson, David
Cc: gdal-dev
Subject: Re: Gdal_translate issues
Sampson, David wrote:
> Do you have any fresh ideas of how I can go about my gdal_translate
> block. To knock my three step process (as posted to the list) to a one
> step process.
Dave,
I've gone through some of your emails, but I got a bit mixed up about
what is the current issue. First a few clarifications on points that
seemed to be raised.
1) If you use -outsize to reduce the size of the image at the same
time
as you are attaching gcps, you will also need to adjust the
pixel/line
locations of the gcps to be in terms of the reduced image size, not
the original. I think this is the core of your problem.
2) On review, gdal_translate never adjusts the GCP pixel/line
locations,
though I think it should. So this should be considered a bug in
gdal_translate and I'd encourage you to file a bug on the issue,
especially if it is affecting your ability to function.
3) You asked if Vincent's bug about GCP projections could be affecting
you (http://bugzilla.remotesensing.org/show_bug.cgi?id=1354). I'm
not sure - it is possible. So as to feel like I've accomplished
something
I dug into this issue tonight and fixed it in CVS.
Could you summarize what is still going wrong, with an exact report of
the commands you are using, the gdalinfo reports before and after
transformation and what you think isn't as you would expect it to be?
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 | President OSGeo,
http://osgeo.org
More information about the Gdal-dev
mailing list