Skip to content

Commit

Permalink
Merge pull request #445 from lixun910/master
Browse files Browse the repository at this point in the history
GeoDa 1.8.7.11
  • Loading branch information
lixun910 committed Jun 10, 2016
2 parents e68923e + ca4ba2d commit 6b628aa
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 33 deletions.
2 changes: 1 addition & 1 deletion BuildTools/macosx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ if ! [ -f "$PREFIX/lib/$LIB_CHECKER" ] ; then
cd $LIB_NAME
if [[ $NODEBUG -eq 1 ]] ; then
# no debug
./configure CC="$GDA_CC" CXX="$GDA_CXX" CFLAGS="$GDA_CFLAGS" CXXFLAGS="$GDA_CXXFLAGS" LDFLAGS="$GDA_LDFLAGS" --with-jpeg=internal --prefix=$PREFIX --with-freexl=$PREFIX --with-libiconv-prefix="-L/usr/lib" --with-sqlite3=$PREFIX --with-spatialite=$PREFIX --with-static-proj4=$PREFIX --with-curl=$PREFIX/bin/curl-config --with-geos=$PREFIX/bin/geos-config --with-libkml=$PREFIX --with-xerces=$PREFIX --with-xerces-inc="$PREFIX/include" --with-xerces-lib="-L$PREFIX/lib -lxerces-c -framework CoreServices" --with-pg=$PREFIX/bin/pg_config --enable-debug
./configure CC="$GDA_CC" CXX="$GDA_CXX" CFLAGS="$GDA_CFLAGS" CXXFLAGS="$GDA_CXXFLAGS" LDFLAGS="$GDA_LDFLAGS" --with-jpeg=internal --prefix=$PREFIX --with-freexl=$PREFIX --with-libiconv-prefix="-L/usr/lib" --with-sqlite3=$PREFIX --with-spatialite=$PREFIX --with-static-proj4=$PREFIX --with-curl=$PREFIX/bin/curl-config --with-geos=$PREFIX/bin/geos-config --with-libkml=$PREFIX --with-xerces=$PREFIX --with-xerces-inc="$PREFIX/include" --with-xerces-lib="-L$PREFIX/lib -lxerces-c -framework CoreServices" --with-pg=$PREFIX/bin/pg_config
else
# with debug
./configure CC="$GDA_CC" CXX="$GDA_CXX" CFLAGS="$GDA_CFLAGS" CXXFLAGS="$GDA_CXXFLAGS" LDFLAGS="$GDA_LDFLAGS" --with-jpeg=internal --prefix=$PREFIX --with-freexl=$PREFIX --with-libiconv-prefix="-L/usr/lib" --with-sqlite3=$PREFIX --with-spatialite=$PREFIX --with-static-proj4=$PREFIX --with-curl=$PREFIX/bin/curl-config --with-geos=$PREFIX/bin/geos-config --with-libkml=$PREFIX --with-xerces=$PREFIX --with-xerces-inc="$PREFIX/include" --with-xerces-lib="-L$PREFIX/lib -lxerces-c -framework CoreServices" --with-pg=$PREFIX/bin/pg_config --enable-debug
Expand Down
9 changes: 6 additions & 3 deletions Explore/CorrelParamsDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ void CorrelParamsFrame::OnHelpBtn(wxCommandEvent& ev)

void CorrelParamsFrame::OnApplyBtn(wxCommandEvent& ev)
{
int vc_sel = var_choice->GetSelection();
if (vc_sel < 0)
return;

LOG_MSG("In CorrelParamsFrame::OnApplyBtn");
{
long new_bins = bins_spn_ctrl->GetValue();
Expand Down Expand Up @@ -295,7 +299,6 @@ void CorrelParamsFrame::OnApplyBtn(wxCommandEvent& ev)
bool valid_variable = true;
{
// update var_man with new selection
int vc_sel = var_choice->GetSelection();
wxString var_nm = var_choice->GetString(vc_sel);
TableInterface* table_int = project->GetTableInt();
int col_id = table_int->FindColId(var_nm);
Expand Down Expand Up @@ -357,7 +360,7 @@ void CorrelParamsFrame::OnAllPairsRadioSelected(wxCommandEvent& ev)
max_iter_txt->Enable(false);
max_iter_tctrl->Enable(false);

OnApplyBtn(ev);
//OnApplyBtn(ev);
ev.Skip();
}

Expand All @@ -372,7 +375,7 @@ void CorrelParamsFrame::OnRandSampRadioSelected(wxCommandEvent& ev)
max_iter_txt->Enable(true);
max_iter_tctrl->Enable(true);

OnApplyBtn(ev);
//OnApplyBtn(ev);
ev.Skip();
}

Expand Down
29 changes: 22 additions & 7 deletions Explore/LineChartView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ has_excluded(1)

wxStaticText* lbl_variable =new wxStaticText(lpanel, wxID_ANY, "Variable:");
choice_variable = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition,
wxSize(220, -1));
wxSize(230, -1));
wxStaticText* lbl_groups =new wxStaticText(lpanel, wxID_ANY, "Groups:");
choice_groups = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition,
wxSize(220, -1));
wxSize(230, -1));
variable_sizer->Add(lbl_variable, 1, wxEXPAND);
variable_sizer->Add(choice_variable, 1, wxEXPAND);
variable_sizer->Add(lbl_groups, 1, wxEXPAND);
Expand All @@ -142,13 +142,13 @@ has_excluded(1)

wxStaticText* lbl_group1 =new wxStaticText(lpanel, wxID_ANY, "Group 1:");
choice_group1 = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition,
wxSize(80, -1));
wxSize(90, -1));
wxStaticText* lbl_time1 =new wxStaticText(lpanel, wxID_ANY, "Period 1:");
choice_time1 = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition,
wxSize(80, -1));
wxStaticText* lbl_group2 =new wxStaticText(lpanel, wxID_ANY, "Group 2:");
choice_group2 = new wxChoice(lpanel, wxID_ANY, wxDefaultPosition,
wxSize(80, -1));
wxSize(90, -1));
wxStaticText* lbl_time2 =new wxStaticText(lpanel, wxID_ANY, "Period 2:");
choice_time2 = new wxChoice(lpanel,wxID_ANY, wxDefaultPosition,
wxSize(80, -1));
Expand Down Expand Up @@ -445,6 +445,9 @@ void LineChartFrame::OnApplyButton(wxCommandEvent &event)
void LineChartFrame::OnVariableChoice(wxCommandEvent& event)
{
int variable_selection = choice_variable->GetSelection();
if (variable_selection < 0 )
return;

wxString col_name = variable_names[variable_selection];

TableInterface* table_int = project->GetTableInt();
Expand Down Expand Up @@ -560,6 +563,9 @@ void LineChartFrame::OnTime2Choice(wxCommandEvent& event)
void LineChartFrame::OnGroupsChoice(wxCommandEvent& event)
{
int variable_selection = choice_variable->GetSelection();
if (variable_selection < 0)
return;

wxString col_name = variable_names[variable_selection];

TableInterface* table_int = project->GetTableInt();
Expand All @@ -580,6 +586,9 @@ void LineChartFrame::OnGroupsChoice(wxCommandEvent& event)
void LineChartFrame::OnGroup1Choice(wxCommandEvent& event)
{
int variable_selection = choice_variable->GetSelection();
if (variable_selection < 0)
return;

wxString col_name = variable_names[variable_selection];

TableInterface* table_int = project->GetTableInt();
Expand All @@ -598,7 +607,7 @@ void LineChartFrame::OnGroup1Choice(wxCommandEvent& event)
if (time1_selection -1 >=0)
choice_time1->SetSelection(time1_selection-1);
else if (time1_selection + 1 < choice_time1->GetCount()) {
choice_time1->SetSelection(time1_selection+1);
choice_time2->SetSelection(time1_selection+1);
} else {
choice_time1->SetSelection(-1);
}
Expand All @@ -616,6 +625,9 @@ void LineChartFrame::OnGroup1Choice(wxCommandEvent& event)
void LineChartFrame::OnGroup2Choice(wxCommandEvent& event)
{
int variable_selection = choice_variable->GetSelection();
if (variable_selection < 0)
return;

wxString col_name = variable_names[variable_selection];

TableInterface* table_int = project->GetTableInt();
Expand All @@ -632,7 +644,7 @@ void LineChartFrame::OnGroup2Choice(wxCommandEvent& event)
} else {
if (time2_selection == time1_selection) {
if (time2_selection -1 >=0)
choice_time2->SetSelection(time2_selection-1);
choice_time1->SetSelection(time2_selection-1);
else if (time2_selection + 1 < choice_time2->GetCount()) {
choice_time2->SetSelection(time2_selection+1);
} else {
Expand Down Expand Up @@ -822,6 +834,10 @@ void LineChartFrame::OnAdjustYAxisPrecision(wxCommandEvent& event)
void LineChartFrame::SaveDataAndResults(bool save_weights, bool save_did,
double* m_yhat1, double* m_resid1)
{
int variable_selection = choice_variable->GetSelection();
if (variable_selection < 0 )
return;

int nTests = var_man.GetVarsCount();
nTests = 1; // only handle one variable at a time

Expand Down Expand Up @@ -859,7 +875,6 @@ void LineChartFrame::SaveDataAndResults(bool save_weights, bool save_did,

int n= 0;

int variable_selection = choice_variable->GetSelection();
wxString col_name = variable_names[variable_selection];

TableInterface* table_int = project->GetTableInt();
Expand Down
40 changes: 19 additions & 21 deletions GeoDamake.opt
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,33 @@ GeoDa_ROOT = $(GEODA_HOME)/../..

TARGET = GeoDa

CC = /usr/bin/gcc
CXX = /usr/bin/g++
LD = /usr/bin/g++
CC = gcc
CXX = g++ -Os -arch x86_64
LD = g++ -arch x86_64
RM = /bin/rm -f

WXLIBS = $(shell $(GEODA_HOME)/libraries/bin/wx-config --libs xrc,stc,richtext,ribbon,propgrid,aui,gl,html,webview,qa,adv,core,xml,net,base)
WXLIBS = $(shell $(GEODA_HOME)/libraries/bin/wx-config --libs xrc,stc,richtext,ribbon,propgrid,aui,gl,html,qa,adv,core,webview,xml,net,base)
WX_HEADER = $(shell $(GEODA_HOME)/libraries/bin/wx-config --cppflags)

LIBS = $(WXLIBS) \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/lapack.a \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/libf2c.a \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/blas.a \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/tmglib.a \
$(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_thread.a \
$(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_system.a \
$(GEODA_HOME)/libraries/lib/libjson_spirit.a \
-L$(GEODA_HOME)/libraries/lib -lgdal -lcurl -lcares \
-L/usr/lib/x86_64-linux-gnu -lGL -lGLU -lglut -lrt -lidn -lssl -lrtmp
# Note: Library -lrtmp causes a missing library problem at runtime on
# Ubuntu 14.10 and later.
LIBS = $(WXLIBS) \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/blas.a \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/F2CLIBS/libf2c.a \
$(GEODA_HOME)/temp/CLAPACK-3.2.1/lapack.a \
-L/usr/lib -liconv \
-L$(GEODA_HOME)/libraries/lib -lgdal -lcurl \
$(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_thread.a \
$(GEODA_HOME)/libraries/include/boost/stage/lib/libboost_system.a \
$(GEODA_HOME)/libraries/lib/libjson_spirit.a


BOOST_HEADER = -I$(GEODA_HOME)/libraries/include/boost

GDAL_HEADER = -I$(GEODA_HOME)/libraries/include -I/usr/include
GDAL_HEADER = -I$(GEODA_HOME)/libraries/include

CPPFLAGS = -I$(GeoDa_ROOT)
CFLAGS = -O2 -Wdeclaration-after-statement $(USER_DEFS) $(GDAL_HEADER)
CXXFLAGS = -O2 $(USER_DEFS) $(WX_HEADER) $(BOOST_HEADER) $(GDAL_HEADER)
LDFLAGS =
CPPFLAGS = -I$(GeoDa_ROOT) $(USER_LOG)
CFLAGS = -Os -arch x86_64 -Wall -Wdeclaration-after-statement $(USER_DEFS) $(GDAL_HEADER)
CXXFLAGS = -Os -arch x86_64 -Wall $(USER_DEFS) $(WX_HEADER) $(BOOST_HEADER) $(GDAL_HEADER)
LDFLAGS = -arch x86_64

OBJ_EXT = o

Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Gda {
const int version_major = 1;
const int version_minor = 8;
const int version_build = 7;
const int version_subbuild = 9;
const int version_subbuild = 11;
const int version_year = 2016;
const int version_month = 5;
const int version_day = 26;
Expand Down

0 comments on commit 6b628aa

Please sign in to comment.