Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Possibility to add / remove default transformations in options tab
- Loading branch information
Showing
3 changed files
with
218 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marco, I'm trying to add a Datum Transformation in the general options, but after clicking "ok" and reopening the dialog the line I added does not show. When adding a line it is not clear (at least on my Linux Desktop) that the line was added and ready to be filled.
Another suggestion would be to use the standard QGIS dialog to allow select the source/destination CRS.
Another thing is about the datum transformation parameters, how do they have to be written for ntv2 grids?
thanks in advance!
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The datum transformation itself has to be added to srs.db (see the entries for the Swiss and NZ grid shift as examples). I know, it would be cool to have a dialog to add it graphically, but maybe it will come in the future.
The option page is only for the default datum transformations (to avoid popping up the dialog every time). And the main purpose here is to delete entries easily (without editing the conf file in a text editor).
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok got it. Here is a first list of transformations from Datum 73, Datum Lisboa and ETRS89-PTTM06. They seems repeated but are not. There are the official NTV2 grids (http://www.igeo.pt/produtos/geodesia/Grelhas_NTv2.htm) and other grids that are widely used (http://www.fc.up.pt/pessoas/jagoncal/coordenadas/). I guess that the users will have to put manually the grids inside the /proj folder, right?
INSERT INTO tbl_datum_transform (
coord_op_code,
source_crs_code,
target_crs_code,
coord_op_method_code,
p1
)
VALUES (
100003,
27493,
3763,
9615,
'pt73_e89.gsb'
);
INSERT INTO tbl_datum_transform (
coord_op_code,
source_crs_code,
target_crs_code,
coord_op_method_code,
p1
)
VALUES (
100004,
20790,
3763,
9615,
'ptLX_e89.gsb'
);
INSERT INTO tbl_datum_transform (
coord_op_code,
source_crs_code,
target_crs_code,
coord_op_method_code,
p1
)
VALUES (
100005,
20791,
3763,
9615,
'ptLX_e89.gsb'
);
INSERT INTO tbl_datum_transform (
coord_op_code,
source_crs_code,
target_crs_code,
coord_op_method_code,
p1
)
VALUES (
100006,
27493,
3763,
9615,
'D73_ETRS89_geo.gsb'
);
INSERT INTO tbl_datum_transform (
coord_op_code,
source_crs_code,
target_crs_code,
coord_op_method_code,
p1
)
VALUES (
100007,
20790,
3763,
9615,
'DLX_ETRS89_geo.gsb'
);
INSERT INTO tbl_datum_transform (
coord_op_code,
source_crs_code,
target_crs_code,
coord_op_method_code,
p1
)
VALUES (
100008,
20791,
3763,
9615,
'DLX_ETRS89_geo.gsb'
);
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Giovanni, will apply those soon.
Yes, the user needs to put the files into the proj-dir manually. In case PROJ_LIB env var is set (usually the case on win), the datum transform dialog checks if the .gsb is really there (and grays out the entry if not)
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marco, thanks to you.
I have seen the datum transformation dialog pop out also when adding geometryless tables (CSV), maybe this is not wanted(?).
Cheers!
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Marco, should I make a pull request instead of a comment in this commit?
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL is applied to srs.db. Thanks, Giovanni!
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Marco! I will start test them asap.
Do you want me to file a ticket about the fact that the datum transformation dialog shows also when adding geometryless layers? Or may be it was already fixed? Cheers!
bc73b4e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please fill a ticket.