Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: use meter instead of metre (#2442) #2444

Merged
merged 1 commit into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions GdaConst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ const wxString GdaConst::gda_lbl_n1sigma = "[-1Std, Mean)";
const wxString GdaConst::gda_lbl_1sigma = "(Mean, 1Std]";
const wxString GdaConst::gda_lbl_1sigma_2sigma = "(1Std, 2Std]";
const wxString GdaConst::gda_lbl_2sigma = "> 2Std";
const wxString GdaConst::gda_projection_UNIT = "UNIT";
const wxString GdaConst::gda_projection_metre = "metre";
const wxString GdaConst::gda_projection_meter = "meter";

const wxPen* GdaConst::default_myshape_pen=0;
const wxBrush* GdaConst::default_myshape_brush=0;
Expand Down
5 changes: 5 additions & 0 deletions GdaConst.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ class GdaConst {
static const wxString gda_lbl_1sigma_2sigma;
static const wxString gda_lbl_2sigma;

// Projection
static const wxString gda_projection_UNIT;
static const wxString gda_projection_metre;
static const wxString gda_projection_meter;

// Languages
static const wxString gda_lang_english;
static const wxString gda_lang_chinese;
Expand Down
5 changes: 4 additions & 1 deletion Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,10 @@ bool Project::CommonProjectInit()
// convert projection to WGS84 by default if there is projection
sourceSR = GetSpatialReference();
if (sourceSR ) {
project_unit = sourceSR->GetAttrValue("UNIT");
project_unit = sourceSR->GetAttrValue(GdaConst::gda_projection_UNIT);
if (project_unit.CmpNoCase(GdaConst::gda_projection_metre) == 0) {
project_unit = GdaConst::gda_projection_meter;
}
}
// configurations for save gda project file
LayerConfiguration* layer_conf = project_conf->GetLayerConfiguration();
Expand Down