[Qgis-developer] Select datum transform in QGIS

Bernhard Ströbl bernhard.stroebl at jena.de
Thu Nov 7 08:04:29 PST 2013


my 2cts from a user's perspective:

- annoying dialog:
How about an option "Store my choice and do not ask me again"
This choice will go in a user setting where all choices for all datum 
shifts (encountered by this user) are user-accessible and can be deleted 
or changed.
This probably extends the whole thing a lot but as a user I might always 
want to use the same paramter set and therefore need an option to save 
my choice.
the dialog should be enabled by default to make users aware of what they 
are doing

Bernhard

Am 07.11.2013 16:39, schrieb Marco Hugentobler:
> Dear qgis devs
>
> In QGIS, there is currently no possibility to choose the type of datum
> transform used in otf-reprojecting. Additionally, some national mapping
> agencies provide datum shift grids and they cannot be used conveniently
> in QGIS ( a user needs to make user defined crs and store the +nadgrids=
> parameter there).
> Some proprietary systems pop up a dialog box in case there are several
> datum transformations available and let the user choose an appropriate
> one. Therefore, I've been in charge of implementing a similar solution
> for QGIS, and the code is ready for first testing / feedback now:
>
> https://github.com/mhugent/Quantum-GIS/commits/datum_transform
>
> Here a short summary of the changes:
>
> - There is a new table in srs.db created from the gdal file
> 'datum_shift.csv'. It contains 3/7 parameter towgs84 parameters.
> Additionally, there is also the possibility to extend srs.db with ntv2
> (grid shift) transformations (with the .gbs filename as first parameter).
> - Once otf-reprojection is enabled and QGIS detects more than one
> possible datum transformation between the two CRS, the user is asked in
> a dialog which one to use. This is stored into the project file, so only
> needs to be entered if adding the layer or changing the layer / map CRS.
> The user is also asked if saving a layer in a different CRS and the
> datum transform is of course also picked up by QGIS server.
>
> possible problems from user perspective:
>
> - The dialogs asking for datum transform could be annoying. Does it need
> an option to suppress it (and should it be enabled / disabled by default)?
> - The synchronisation of srs.db with datum_shift.csv makes the install
> time longer (maybe it can be solved more efficiently?)
>
> technical details for devs:
>
> - QgsCoordinateTransform currently contains srcCRS, destCRS. It is
> extended to hold optionally source datum transform / dest datum
> transform (int is coord_op_code in srs.db). In
> QgsCoordinateTransform::initialise, the datum transform strings are
> modified to match the choosen datum transforms.
> - QgsCRSCache is extended to search by datum transform too (to avoid
> expensive lookups in the sqlite db every time)
> - QgsMapRenderer stores the information about layer / datum
> transformation and reads / writes to project filename
> - To receive the current QgsCoordinateTransformation for a layer, tools
> may query QgsMapRenderer::tr (or QgsMapRenderer::mapToLayerCoordinates
> etc.). Creating a new QgsCoordinateTransform from layerCRS and mapCRS is
> not correct in all cases any more.
>
>
> What are your opinions / suggestions?
>
> Regards,
> Marco
>



__________ Information from ESET Mail Security, version of virus signature database 9018 (20131107) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the Qgis-developer mailing list