[Qgis-developer] request for review: Add possibility to ignore geotransform/gcps in QgsRasterLayer

Peter Ersts ersts at amnh.org
Thu May 13 09:31:05 EDT 2010


On 05/07/2010 11:05 AM, Manuel Massing wrote:
> Hi Pete,
>    
>> At first read through I am not sure this is the right approach. If I am
>> imagining the problem correctly, you basically need to convert from map
>> coordinates back to pixel coordinates. I think it would be better to add
>> that functionality rather than forcing the layer to ignore it's
>> geotransform.
>>      
> The problem is that a lot of code in the georeferencer expects coordinates to
> be expressed in pixel coordinates. This includes GCP point rendering (as
> canvas items), coordinate picking (e.g., when adding a GCP), visualisation of
> residuals, and also the geotransform classes. Adding transforms in all these
> cases would IMO add an undue amount of complexity to what essentially is a
> corner case for georeferencing.
>
> So, I do agree that its not really pleasing (more in an aesthetic sense :-))
> to support such a limited use-case in a core class - that being said, it
> doesn't really add complexity to the QgsRasterLayer logic, so I thought it was
> a good compromise.
>    

Hi Manuel.

There are already several methods for transforming map to device 
coordinates (e.g., QgsMapToPixel) so working with the canvas is already 
taken care of. Only a similar function would be needed in the raster class.

It seems that there was an original design flaw in the georeferencer ( 
maybe that was because there was missing functionality in the raster 
class ) if it is only expecting pixel coordinates. I can also imaging 
that it could take a considerable amount of work to update the 
georeferencer to use the coordinate transforms, but that can not be a 
reason to add a potentially ugly shortcut. But this is just my opinion 
:) and I don't want to slow progress! As I have mostly absent from 
development in the last couple of years I would be good for a couple of 
other devs to provide their opinion.

take care!

-pete

-- 
====================================
Peter J. Ersts, Software Developer
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Web: http://biodiversityinformatics.amnh.org
Web: http://cbc.amnh.org

Open Source,
...evolving through community cooperation to change the world bit by bit

Quantum GIS Raster Development Team.



More information about the Qgis-developer mailing list