[Qgis-developer] QgsMapSettings map units

Martin Dobias wonder.sk at gmail.com
Thu Feb 27 01:12:22 PST 2014

Hi Larry

On Thu, Feb 27, 2014 at 9:54 AM, Larry Shaffer <larrys at dakotacarto.com> wrote:
> Hi Martin,
> Do you think setting the destination CRS for QgsMapSettings should
> automatically update its map units?
> i.e.,
> void QgsMapSettings::setDestinationCrs( const QgsCoordinateReferenceSystem&
> crs )
> {
>   mDestCRS = crs;
>   setMapUnits( crs.mapUnits() )
> }
> Or, are the two considered mutually exclusive?

Good question :-)

The logic says that CRS selection should automatically imply what map
units will be used. Right now there is also the possibility that
on-the-fly projections are not turned on and the map units have to be
set manually by the user. Then there are measure settings related to
that in some ways and it is all a bit messy (I think we need to do
some updates to the project properties dialog and better understand
what are the reasonable combinations). In QgsMapRenderer the map units
and destination CRS were kept separately (maybe for historical
reasons?) so I kept it like that also in QgsMapSettings.


More information about the Qgis-developer mailing list