Skip to content

Commit

Permalink
1.1: default cs
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Feb 17, 2023
1 parent af12f00 commit a24ddb6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/qtproj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ void QtProj::slot_transfer()

qsSrc = ui.le_srcCS->text();
qsDst = ui.le_dstCS->text();

if (qsSrc.isEmpty())
{
qsSrc = QString(PROJSTRDEF);
ui.le_srcCS->clear();
ui.le_srcCS->insert(qsSrc);
}
if (qsDst.isEmpty())
{

qsDst = QString(PROJSTRDEF);
ui.le_dstCS->clear();
ui.le_dstCS->insert(qsDst);
}
// e.g.
// QString qsSrc = "+proj=longlat +datum=WGS84 +no_defs";
// QString qsDst = "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs +towgs84=0,0,0,0,0,0,0";
Expand Down
2 changes: 2 additions & 0 deletions src/qtproj.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <QMainWindow>
#include "ui_qtproj.h"

#define PROJSTRDEF "+proj=longlat +datum=WGS84 +no_defs"

class QtProj : public QMainWindow
{
Q_OBJECT
Expand Down

0 comments on commit a24ddb6

Please sign in to comment.