Bug report #247

custom projection definition

Added by jachym-cepicky-centrum-cz - about 18 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:Tim Sutton
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10306

Description

Hallo,

maybe i do something wrong, but:

I would like to define my custom projection "Krovak S-JTSK" with
following parameters:

Name: sjtsk
Parameters: +proj=krovak +ellps=bessel +no_defs +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56

It is not possible to add custom projection to QGIS. When I click on the
"Save" button, nothing is saved.

when I try to add just something common:
Name: myproj
Parameters: +proj=latlong +ellps=WGS84

It can not be saved either.

In sqlite:
sqlite> select * from vw_srs;
sqlite>

In the command line, only two lines appear:

QgsCustomProjectionDialog::getProjFromParameters()
QgsCustomProjectionDialog::getEllipseFromParameters()

And, I would say, the test does also not work, how expected:

I would say, that North and East are changed
and
when I try

Parameters: +proj=latlong +ellps=WGS84
North: 12
East: 24
the result is
0.2084
0.4189

is it wrong, that I'm expecting "12 14" ?

echo "12 24" |cs2cs +proj=latlong +to +proj=latlong +ellps=WGS84
12dE 24dN 0.000

??

short summary:
1) It is not possible to save custom projection
2) the "test" of custom projection does not work properly

qgis_unstable 0.8 fresh svn, build with dpkg-buildpackage on ubuntu 6.06

Thanks

Jachym

P.S. Problem confirmed on debian testing

History

#1 Updated by Gavin Macaulay - about 18 years ago

To make a new custom projection you first need to click on the 'new' button in the dialog box, then enter your projection parameters and name, then click on 'save'.

However, this is a bit counter-intuitive, especially when doing the first custom projection, so I've made a change so that if there are no custom projections the dialog automatically does a 'new' button click for you. This is available in SVN 7343b610 (SVN r5779).

#2 Updated by vslavik-fastmail-fm - about 18 years ago

I'm able to add the krovak projection as above now that I know how the 'new' button behaves, but the projection still does not show up in Settings -> Project Properties -> Projection -> User Defined Coordinate Systems. Other projections, e.g. the latlong one from above, do show up correctly.

I finally tracked this down to missing dvorak entery in the tbl_projection table. Adding the entry to ~/.qgis/qgis.db like this:

INSERT INTO "tbl_projection" VALUES('krovak', 'S-JTSK / Krovak', _, _);

fixed the problem, but I have no idea whether the line is correct or not (I'm new to GIS and hit the problem when following instructions on setting QGIS up for Czech users).

#3 Updated by Gavin Macaulay - about 18 years ago

The reversed north/east problem appears to be fixed in svn c9b3a3a6 (SVN r5936). That just leaves the missing entry in the tbl_projection table mentioned above.

#4 Updated by Gavin Macaulay - about 18 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Fixed in SVN 333f9793 (SVN r5944) - the krovak projection was missing from the qgis.db database (but was in the srs.db database)

#5 Updated by Anonymous about 15 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF