Skip to content

Commit

Permalink
Merge pull request #2240 from lixun910/v1.18
Browse files Browse the repository at this point in the history
V1.16.0.12
  • Loading branch information
lixun910 committed Oct 16, 2020
2 parents 7d6578c + 1a3569b commit cbc940c
Show file tree
Hide file tree
Showing 56 changed files with 5,611 additions and 5,527 deletions.
4 changes: 2 additions & 2 deletions BuildTools/windows/GeoDa.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>C:\Intel\OpenCL\sdk\include;C:\OSGeo4W\include;temp\boost_1_57_0;temp\wxWidgets-3.1.0\include;temp\wxWidgets-3.1.0\lib\vc_dll\mswud;temp\json_spirit_v4.08;temp\eigen3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>C:\Intel\OpenCL\sdk\include;C:\OSGeo4W\include;temp\boost_1_57_0;temp\wxWidgets-3.1.0\include;temp\wxWidgets-3.1.0\lib\vc_dll\mswud;temp\json_spirit_v4.08;temp\eigen3;temp\spectra\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_WINDOWS;__WXMSW__;__WXDEBUG__;WXUSINGDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
Expand Down Expand Up @@ -243,7 +243,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>C:\Intel\OpenCL\sdk\include;C:\OSGeo4W\include;temp\boost_1_57_0;temp\wxWidgets-3.1.0\include;temp\wxWidgets-3.1.0\lib\vc_dll\mswu;temp\json_spirit_v4.08;temp\eigen3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>C:\Intel\OpenCL\sdk\include;C:\OSGeo4W\include;temp\boost_1_57_0;temp\wxWidgets-3.1.0\include;temp\wxWidgets-3.1.0\lib\vc_dll\mswu;temp\json_spirit_v4.08;temp\eigen3;temp\spectra\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;__WXMSW__;__NO_VC_CRTDBG__;WXUSINGDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
Expand Down
2 changes: 1 addition & 1 deletion BuildTools/windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ if %GDA_BUILD% == BUILD_32 (
%MSBUILD_EXE% GeoDa.vs2017.sln /t:GeoDa /property:Configuration="Debug2017" /p:Platform="x64"
) else (
%MSBUILD_EXE% GeoDa.vs2010.sln /t:GeoDa /property:Configuration="Release" /p:Platform="x64"
%MSBUILD_EXE% GeoDa.vs2010.sln /t:GeoDa /property:Configuration="Debug" /p:Platform="x64"
REM %MSBUILD_EXE% GeoDa.vs2010.sln /t:GeoDa /property:Configuration="Debug" /p:Platform="x64"
)
)
set CHK_LIB=%BUILD_HOME%\Release\GeoDa.lib
Expand Down
2 changes: 1 addition & 1 deletion DataViewer/DataViewerDeleteColDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void DataViewerDeleteColDlg::OnDelete( wxCommandEvent& ev )
int idx = selections[i];
wxString nm = name_to_nm[m_field->GetString(idx)];
int col = table_int->FindColId(nm);
wxLogMessage(nm);
wxLogMessage("%s", nm);

try{
table_int->DeleteCol(col);
Expand Down
2 changes: 1 addition & 1 deletion DataViewer/DataViewerEditFieldPropertiesDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ void DataViewerEditFieldPropertiesDlg::OnCellChanging( wxGridEvent& ev )
wxString msg;
msg << "changing row " << row << ", col " << col << " from ";
msg << cur_str << " to " << new_str;
wxLogMessage(msg);
wxLogMessage("%s", msg);

GdaConst::FieldType type = GdaConst::unknown_type;
wxString type_str = field_grid->GetCellValue(row, COL_T);
Expand Down
1 change: 0 additions & 1 deletion DialogTools/AZPDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ void AZPDlg::OnClickClose(wxCommandEvent& event )

event.Skip();
EndDialog(wxID_CANCEL);
Destroy();
}

void AZPDlg::OnClose(wxCloseEvent& ev)
Expand Down
5 changes: 3 additions & 2 deletions DialogTools/AbstractClusterDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ void AbstractClusterDlg::AddSimpleInputCtrls(wxPanel *panel, wxBoxSizer* vbox,
}

void AbstractClusterDlg::AddInputCtrls(wxPanel *panel, wxBoxSizer* vbox,
bool show_auto_button, bool show_spatial_weights,
bool show_auto_button, bool integer_only,
bool show_spatial_weights,
bool single_variable, bool add_centroids)
{
wxString ttl = single_variable ? _("Select a Variable") : _("Select Variables");
Expand All @@ -260,7 +261,7 @@ void AbstractClusterDlg::AddInputCtrls(wxPanel *panel, wxBoxSizer* vbox,

combo_var = new wxListBox(panel, wxID_ANY, wxDefaultPosition,
wxSize(250,250), 0, NULL, style);
InitVariableCombobox(combo_var, add_centroids);
InitVariableCombobox(combo_var, integer_only, add_centroids);

m_use_centroids = new wxCheckBox(panel, wxID_ANY, _("Use geometric centroids"));
auto_btn = new wxButton(panel, wxID_OK, _("Auto Weighting"));
Expand Down
1 change: 1 addition & 0 deletions DialogTools/AbstractClusterDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class AbstractClusterDlg : public wxDialog, public FramesManagerObserver,
// -- functions
virtual void AddInputCtrls(wxPanel *panel, wxBoxSizer* vbox,
bool show_auto_button = false,
bool integer_only = false,
bool show_spatial_weights = true,
bool single_variable = false,
bool add_centroids = true);
Expand Down
2 changes: 1 addition & 1 deletion DialogTools/AddIdVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void AddIdVariable::OnOkClick( wxCommandEvent& event )
return;
}

wxLogMessage(wxString::Format("Try to insert unique id (integer, %s) column in table.", new_id_var_name));
wxLogMessage("%s", wxString::Format("Try to insert unique id (integer, %s) column in table.", new_id_var_name));

int col_insert_pos = 0;
int add_pos = table_int->InsertCol(GdaConst::long64_type,new_id_var_name, col_insert_pos);
Expand Down
6 changes: 3 additions & 3 deletions DialogTools/CatClassifDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,8 @@ CatClassifState* CatClassifPanel::PromptNew(const CatClassifDef& ccd,
}

wxLogMessage("In CatClassifPanel::PromptNew");
wxLogMessage(_("suggested title:") + suggested_title);
wxLogMessage(_("field name:") + field_name);
wxLogMessage("%s", _("suggested title:") + suggested_title);
wxLogMessage("%s", _("field name:") + field_name);

if (success || (prompt_title_dlg == false && !new_title.IsEmpty()) ) {
cc_data = ccd;
Expand Down Expand Up @@ -1205,7 +1205,7 @@ void CatClassifPanel::OnAssocVarChoice(wxCommandEvent& ev)

wxString cur_fc_str = assoc_var_choice->GetStringSelection();

wxLogMessage(cur_fc_str);
wxLogMessage("%s", cur_fc_str);

bool is_tm_var = table_int->IsColTimeVariant(cur_fc_str);
if (is_tm_var)
Expand Down
6 changes: 3 additions & 3 deletions DialogTools/ConnectDatasourceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ void ConnectDatasourceDlg::OnOkClick( wxCommandEvent& event )
GdaFrame* gda_frame = GdaFrame::GetGdaFrame();
if (gda_frame) {
gda_frame->OpenProject(ds_file_path.GetFullPath());
wxLogMessage(_("Open project file:") + ds_file_path.GetFullPath());
wxLogMessage("%s", _("Open project file:") + ds_file_path.GetFullPath());
try {
Project* project = gda_frame->GetProject();
wxString layer_name;
Expand Down Expand Up @@ -847,8 +847,8 @@ void ConnectDatasourceDlg::OnOkClick( wxCommandEvent& event )
if (layer_name.IsEmpty())
layer_name = layername;

wxLogMessage(_("Open Datasource:") + datasource->ToString());
wxLogMessage(_("Open Layer:") + layername);
wxLogMessage("%s", _("Open Datasource:") + datasource->ToString());
wxLogMessage("%s", _("Open Layer:") + layername);

SaveRecentDataSource(datasource, layer_name);

Expand Down
8 changes: 4 additions & 4 deletions DialogTools/CreateGridDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void CreateGridDlg::OnCEdit1Updated( wxCommandEvent& event )
wxLogMessage("In CreateGridDlg::OnCEdit1Updated()");
if (!isCreated) return;
wxString input = m_lower_x->GetValue();
wxLogMessage(input);
wxLogMessage("%s", input);
input.ToDouble(&m_xBot);
EnableItems();

Expand All @@ -481,7 +481,7 @@ void CreateGridDlg::OnCEdit2Updated( wxCommandEvent& event )
wxLogMessage("In CreateGridDlg::OnCEdit2Updated()");
if (!isCreated) return;
wxString input = m_lower_y->GetValue();
wxLogMessage(input);
wxLogMessage("%s", input);
input.ToDouble(&m_yBot);
EnableItems();
}
Expand All @@ -491,7 +491,7 @@ void CreateGridDlg::OnCEdit3Updated( wxCommandEvent& event )
wxLogMessage("In CreateGridDlg::OnCEdit3Updated()");
if (!isCreated) return;
wxString input = m_upper_x->GetValue();
wxLogMessage(input);
wxLogMessage("%s", input);
input.ToDouble(&m_xTop);
EnableItems();
}
Expand All @@ -501,7 +501,7 @@ void CreateGridDlg::OnCEdit4Updated( wxCommandEvent& event )
wxLogMessage("In CreateGridDlg::OnCEdit4Updated()");
if (!isCreated) return;
wxString input = m_upper_y->GetValue();
wxLogMessage(input);
wxLogMessage("%s", input);
input.ToDouble(&m_yTop);
EnableItems();
}
30 changes: 1 addition & 29 deletions DialogTools/CreatingWeightDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,6 @@ void CreatingWeightDlg::OnCThresholdTextEdit( wxCommandEvent& event )
wxString val = m_threshold->GetValue();
val.Trim(false);
val.Trim(true);

wxLogMessage(val);

int dist_var_type = m_nb_distance_variables->GetSelection();
if (dist_var_type == 0) {
Expand Down Expand Up @@ -612,8 +610,6 @@ void CreatingWeightDlg::OnCBandwidthThresholdTextEdit( wxCommandEvent& event )
wxString val = m_manu_bandwidth->GetValue();
val.Trim(false);
val.Trim(true);

wxLogMessage(val);

int dist_var_type = m_nb_distance_variables->GetSelection();
if (dist_var_type == 0) {
Expand Down Expand Up @@ -661,18 +657,12 @@ void CreatingWeightDlg::OnCThresholdSliderUpdated( wxCommandEvent& event )
if (m_threshold_val > 0) {
FindWindow(XRCID("wxID_OK"))->Enable(true);
}
wxString str_val;
str_val << m_threshold_val;
wxLogMessage(str_val);
} else {
m_threshold_val_multivars = (m_sliderdistance->GetValue() * (m_thres_max_multivars-m_thres_min_multivars)/100.0) + m_thres_min_multivars;
m_threshold->ChangeValue( wxString::Format("%f", (double) m_threshold_val_multivars));
if (m_threshold_val_multivars > 0) {
FindWindow(XRCID("wxID_OK"))->Enable(true);
}
wxString str_val;
str_val << m_threshold_val_multivars;
wxLogMessage(str_val);
}
}

Expand All @@ -689,18 +679,12 @@ void CreatingWeightDlg::OnCBandwidthThresholdSliderUpdated( wxCommandEvent& even
if (m_bandwidth_thres_val > 0) {
m_btn_ok->Enable(true);
}
wxString str_val;
str_val << m_bandwidth_thres_val;
wxLogMessage(str_val);
} else {
m_bandwidth_thres_val_multivars = (m_bandwidth_slider->GetValue() * (m_thres_max_multivars-m_thres_min_multivars)/100.0) + m_thres_min_multivars;
m_manu_bandwidth->ChangeValue( wxString::Format("%f", (double) m_bandwidth_thres_val_multivars));
if (m_bandwidth_thres_val_multivars > 0) {
m_btn_ok->Enable(true);
}
wxString str_val;
str_val << m_bandwidth_thres_val_multivars;
wxLogMessage(str_val);
}
}

Expand Down Expand Up @@ -1043,10 +1027,6 @@ void CreatingWeightDlg::OnXSelected(wxCommandEvent& event )
UpdateTmSelEnableState();
UpdateThresholdValues();
UpdateCreateButtonState();

wxString msg;
msg << _("selected:") << m_X->GetSelection();
wxLogMessage(msg);
}

void CreatingWeightDlg::OnYSelected(wxCommandEvent& event )
Expand All @@ -1066,10 +1046,6 @@ void CreatingWeightDlg::OnYSelected(wxCommandEvent& event )
UpdateTmSelEnableState();
UpdateThresholdValues();
UpdateCreateButtonState();

wxString msg;
msg << "selected:" << m_Y->GetSelection();
wxLogMessage(msg);
}

void CreatingWeightDlg::OnXTmSelected(wxCommandEvent& event )
Expand Down Expand Up @@ -1159,10 +1135,6 @@ void CreatingWeightDlg::OnIdVariableSelected( wxCommandEvent& event )
UpdateThresholdValuesMultiVars();
}
UpdateCreateButtonState();

wxString msg;
msg << _("selected:") << m_id_field->GetSelection();
wxLogMessage(msg);
}

double CreatingWeightDlg::GetBandwidth()
Expand Down Expand Up @@ -1457,7 +1429,7 @@ void CreatingWeightDlg::CreateWeights()
project->SetWorkingDir(new_dir);
}
wxLogMessage("CreateWeights()");
wxLogMessage(outputfile);
wxLogMessage("%s", outputfile);

// 1/2 case social weights:
if (m_nb_weights_type->GetSelection() == 1 &&
Expand Down
2 changes: 1 addition & 1 deletion DialogTools/ExportCsvDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void ExportCsvDlg::OnOkClick( wxCommandEvent& event )
}
}

wxLogMessage(_("csv file:") + new_csv);
wxLogMessage("%s", _("csv file:") + new_csv);
#ifdef __WIN32__
std::ofstream out_file(new_csv.wc_str(),std::ios::out | std::ios::binary);
#else
Expand Down
2 changes: 1 addition & 1 deletion DialogTools/ExportDataDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ void ExportDataDlg::OnOkClick( wxCommandEvent& event )
datasource_name = ds_name;
GdaConst::DataSourceType ds_type = datasource->GetType();

wxLogMessage(_("ds:") + ds_name);
wxLogMessage("%s", _("ds:") + ds_name);
if (ds_name.length() <= 0 ) {
wxMessageDialog dlg(this, _("Please specify a valid data source name."),
_("Warning"), wxOK | wxICON_WARNING);
Expand Down
14 changes: 7 additions & 7 deletions DialogTools/FieldNameCorrectionDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ wxString ScrolledWidgetsPane::TruncateFieldName(const wxString& old_name,
int max_len)
{
wxLogMessage("ScrolledWidgetsPane::TruncateFieldName");
wxLogMessage(old_name);
wxLogMessage("%s", old_name);
if (GdaConst::datasrc_field_lens.find(ds_type) ==
GdaConst::datasrc_field_lens.end())
{
Expand All @@ -446,14 +446,14 @@ wxString ScrolledWidgetsPane::TruncateFieldName(const wxString& old_name,
new_name << old_name.substr(0, front_chars) << separator
<< old_name.substr(str_len - back_chars);

wxLogMessage(new_name);
wxLogMessage("%s", new_name);
return new_name;
}

wxString ScrolledWidgetsPane::RemoveIllegalChars(const wxString& old_name)
{
wxLogMessage("ScrolledWidgetsPane::RemoveIllegalChars");
wxLogMessage(old_name);
wxLogMessage("%s", old_name);
if (GdaConst::datasrc_field_illegal_regex.find(ds_type) ==
GdaConst::datasrc_field_illegal_regex.end())
{
Expand All @@ -469,15 +469,15 @@ wxString ScrolledWidgetsPane::RemoveIllegalChars(const wxString& old_name)

if (new_name.size()==0) new_name = "NONAME";

wxLogMessage(new_name);
wxLogMessage("%s", new_name);
return new_name;
}


wxString ScrolledWidgetsPane::RenameDupFieldName(const wxString& old_name)
{
wxLogMessage("ScrolledWidgetsPane::RenameDupFieldName");
wxLogMessage(old_name);
wxLogMessage("%s", old_name);

wxString new_name(old_name);

Expand Down Expand Up @@ -509,14 +509,14 @@ wxString ScrolledWidgetsPane::RenameDupFieldName(const wxString& old_name)
new_name = first_part + "_" + last_part;
}
}
wxLogMessage(new_name);
wxLogMessage("%s", new_name);
return new_name;
}

bool ScrolledWidgetsPane::IsFieldNameValid(const wxString& col_name)
{
wxLogMessage("ScrolledWidgetsPane::IsFieldNameValid");
//wxLogMessage(col_name);
//wxLogMessage("%s", col_name);

if ( GdaConst::datasrc_field_lens.find(ds_type) ==
GdaConst::datasrc_field_lens.end() )
Expand Down
Loading

0 comments on commit cbc940c

Please sign in to comment.