Skip to content

Commit

Permalink
Merge pull request #1977 from lixun910/fix_201
Browse files Browse the repository at this point in the history
for 1.14.0.2
  • Loading branch information
lixun910 committed Oct 15, 2019
2 parents 8f0cda5 + 547302a commit 1a0cc2e
Show file tree
Hide file tree
Showing 22 changed files with 7,318 additions and 509 deletions.
682 changes: 682 additions & 0 deletions BuildTools/ubuntu/build_disco.sh

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions BuildTools/ubuntu/create_deb_disco.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash


if ! [ -d build ]; then
echo "Please run build.sh to build GeoDa executable file first."
exit
fi

if ! [ -f build/GeoDa ]; then
echo "Please run build.sh to build GeoDa executable file first."
exit
fi


rm -rf product
if [ $# -ne 1 ]; then
cp -rf package product
else
cp -rf package_$1 product
fi

chmod +x product/DEBIAN/postinst
mkdir product/usr/local
mkdir product/usr/bin
mkdir product/usr/local/geoda
cp -rf build/* product/usr/local/geoda/
cp run_geoda.sh product/usr/bin/

cd product
find . -name .svn |xargs rm -rf
cd ..

MACHINE_TYPE=`uname -m`
if [ $MACHINE_TYPE == 'x86_64' ]; then
# 64-bit platform
rm product/DEBIAN/control
mv product/DEBIAN/control_disco product/DEBIAN/control
fi

rm -f *.deb
if [ $# -ne 1 ]; then
dpkg -b product/ geoda_1.14-1disco1_amd64.deb
else
dpkg -b product/ geoda_1.14-1$1.deb
fi
13 changes: 13 additions & 0 deletions BuildTools/ubuntu/package/DEBIAN/control_disco
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: geoda
Version: 1.14-1disco1
Architecture: amd64
Priority: optional
Section: graphics
Installed-Size: 121795
Depends: zlib1g, libexpat1, freeglut3, libreadline8, libgtk-3-0, libssl1.1, libwebkit2gtk-4.0-37
Maintainer: Luc Anselin < [email protected] >
Provides: geoda
Homepage: http://spatial.uchicago.edu
Description: GeoDa Software
GeoDa Software for Geospatial Analysis and Computation

5 changes: 5 additions & 0 deletions BuildTools/windows/installer/32bit/GeoDa.iss
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ begin
begin
langCode := '179'; // spanish
end;
3:
begin
langCode := '159'; // russian
end;
end;
end;
Expand All @@ -208,6 +212,7 @@ begin
ComboBox.Items.Add('English');
ComboBox.Items.Add('Chinese (Simplified)');
ComboBox.Items.Add('Spanish');
ComboBox.Items.Add('Russian');
ComboBox.ItemIndex := 0;
ComboBox.OnChange := @ComboBoxChange;
langCode := '58';
Expand Down
5 changes: 5 additions & 0 deletions BuildTools/windows/installer/64bit/GeoDa.iss
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ begin
begin
langCode := '179'; // spanish
end;
3:
begin
langCode := '159'; // russian
end;
end;
end;
Expand All @@ -223,6 +227,7 @@ begin
ComboBox.Items.Add('English');
ComboBox.Items.Add('Chinese (Simplified)');
ComboBox.Items.Add('Spanish');
ComboBox.Items.Add('Russian');
ComboBox.ItemIndex := 0;
ComboBox.OnChange := @ComboBoxChange;
langCode := '58';
Expand Down
6 changes: 4 additions & 2 deletions DialogTools/CreatingWeightDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,10 @@ void CreatingWeightDlg::UpdateCreateButtonState()
// Check that a Weights File ID variable is selected.
if (m_id_field->GetSelection() == wxNOT_FOUND) enable = false;
// Check that a weight type radio button choice is selected.
if (m_X->GetSelection() == wxNOT_FOUND ||
m_Y->GetSelection() == wxNOT_FOUND) enable = false;
if (!project->IsTableOnlyProject()) {
if (m_X->GetSelection() == wxNOT_FOUND ||
m_Y->GetSelection() == wxNOT_FOUND) enable = false;
}

m_btn_ok->Enable(enable);
m_nb_weights_type->Enable(enable);
Expand Down
14 changes: 9 additions & 5 deletions DialogTools/ExportDataDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,15 @@ ExportDataDlg::CreateOGRLayer(wxString& ds_name, bool is_table,
new_ref.importFromEPSG(4326);
valid_input_crs = true;
}
if (spatial_ref && (valid_input_crs && !spatial_ref->IsSame(&new_ref))) {
OGRCoordinateTransformation *poCT;
poCT = OGRCreateCoordinateTransformation(spatial_ref, &new_ref);
for (size_t i=0; i < ogr_geometries.size(); i++) {
ogr_geometries[i]->transform(poCT);
if (ogr_geometries.size() > 0 && valid_input_crs) {
if (spatial_ref && spatial_ref->IsSame(&new_ref) == false) {
// transform geometries from old CRS to new CRS
OGRCoordinateTransformation *poCT;
poCT = OGRCreateCoordinateTransformation(spatial_ref, &new_ref);
for (size_t i=0; i < ogr_geometries.size(); i++) {
ogr_geometries[i]->transform(poCT);
}
OGRCoordinateTransformation::DestroyCT(poCT);
}
spatial_ref = &new_ref; // use new CRS
}
Expand Down
12 changes: 6 additions & 6 deletions DialogTools/FieldNewCalcSheetDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ w_man_state(project_s->GetWManState())
pRate->SetOtherPanelPointers(pSpecial, pUni, pBin, pLag);
pDT->SetOtherPanelPointers(pSpecial, pBin, pLag, pRate);

m_note->AddPage(pSpecial, "Special");
m_note->AddPage(pUni, "Univariate");
m_note->AddPage(pBin, "Bivariate");
m_note->AddPage(pLag, "Spatial Lag");
m_note->AddPage(pRate, "Rates");
m_note->AddPage(pDT, "Date/Time");
m_note->AddPage(pSpecial, _("Special"));
m_note->AddPage(pUni, _("Univariate"));
m_note->AddPage(pBin, _("Bivariate"));
m_note->AddPage(pLag, _("Spatial Lag"));
m_note->AddPage(pRate, _("Rates"));
m_note->AddPage(pDT, _("Date/Time"));
pLag->InitWeightsList();
pRate->InitWeightsList();
this->SetSize(-1,-1,-1,-1);
Expand Down
34 changes: 25 additions & 9 deletions DialogTools/PreferenceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PreferenceDlg::PreferenceDlg(wxWindow* parent,
const wxString& title,
const wxPoint& pos,
const wxSize& size)
: wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE)
: wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
{
highlight_state = NULL;
table_state = NULL;
Expand All @@ -89,7 +89,7 @@ PreferenceDlg::PreferenceDlg(wxWindow* parent,
const wxString& title,
const wxPoint& pos,
const wxSize& size)
: wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE)
: wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
{
highlight_state = _highlight_state;
table_state = _table_state;
Expand All @@ -102,10 +102,15 @@ void PreferenceDlg::Init()
{
ReadFromCache();

wxScrolledWindow* scrl = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxSize(880,820), wxHSCROLL|wxVSCROLL );
scrl->SetScrollRate( 5, 5 );

wxPanel *panel = new wxPanel(scrl);

long txt_num_style = wxTE_RIGHT | wxTE_PROCESS_ENTER;
wxPoint pos = wxDefaultPosition;

wxNotebook* notebook = new wxNotebook(this, wxID_ANY, pos, wxDefaultSize);
wxNotebook* notebook = new wxNotebook(panel, wxID_ANY, pos, wxDefaultSize);
// visualization tab
wxNotebookPage* vis_page = new wxNotebookPage(notebook, wxID_ANY,
pos, wxSize(560, 680));
Expand Down Expand Up @@ -247,6 +252,7 @@ void PreferenceDlg::Init()
cmb113->Append("English");
cmb113->Append("Chinese (Simplified)");
cmb113->Append("Spanish");
cmb113->Append("Russian");
//cmb113->Append("German");
cmb113->Bind(wxEVT_COMBOBOX, &PreferenceDlg::OnChooseLanguage, this);
//cmb113->Disable();
Expand Down Expand Up @@ -418,8 +424,8 @@ void PreferenceDlg::Init()
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
wxSize bt_sz = wxSize(70, 30);
wxButton *resetButton = new wxButton(this, wxID_ANY, _("Reset"), pos, bt_sz);
wxButton *closeButton = new wxButton(this, wxID_OK, _("Close"), pos, bt_sz);
wxButton *resetButton = new wxButton(panel, wxID_ANY, _("Reset"), pos, bt_sz);
wxButton *closeButton = new wxButton(panel, wxID_OK, _("Close"), pos, bt_sz);
resetButton->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &PreferenceDlg::OnReset, this);

hbox->Add(resetButton, 1);
Expand All @@ -428,9 +434,19 @@ void PreferenceDlg::Init()
vbox->Add(notebook, 1, wxEXPAND | wxALL, 10);
vbox->Add(hbox, 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, 10);

SetSizer(vbox);
vbox->Fit(this);

panel->SetSizer(vbox);

wxBoxSizer* panelSizer = new wxBoxSizer(wxVERTICAL);
panelSizer->Add(panel, 1, wxEXPAND|wxALL, 0);

scrl->SetSizer(panelSizer);

wxBoxSizer* sizerAll = new wxBoxSizer(wxVERTICAL);
sizerAll->Add(scrl, 1, wxEXPAND|wxALL, 0);
SetSizer(sizerAll);
SetAutoLayout(true);
sizerAll->Fit(this);

Centre();
ShowModal();

Expand Down Expand Up @@ -856,7 +872,7 @@ void PreferenceDlg::OnChooseLanguage(wxCommandEvent& ev)
} else if (lan_sel == 3) {
language = 179;//wxLANGUAGE_SPANISH;
} else if (lan_sel == 4) {
language = 88; // wxLANGUAGE_GERMAN
language = wxLANGUAGE_RUSSIAN;
}
config->DeleteEntry("Translation");
config->SetPath("Translation");
Expand Down
4 changes: 2 additions & 2 deletions Explore/ConditionalHistogramView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void ConditionalHistogramCanvas::ResizeSelectableShps(int virtual_scrn_w,
vert_label << CatClassification::CatClassifTypeToString(
GetCatType(VERT_VAR));
}
vert_label << " vert cat var: ";
vert_label << _(" vert cat var: ");
vert_label << GetNameWithTime(VERT_VAR);
s = new GdaShapeText(vert_label, *GdaConst::small_font,
wxRealPoint(bg_xmin, bg_ymin+(bg_ymax-bg_ymin)/2.0), 90,
Expand Down Expand Up @@ -397,7 +397,7 @@ void ConditionalHistogramCanvas::ResizeSelectableShps(int virtual_scrn_w,
horiz_label << CatClassification::CatClassifTypeToString(
GetCatType(HOR_VAR));
}
horiz_label << " horiz cat var: ";
horiz_label << _(" horiz cat var: ");
horiz_label << GetNameWithTime(HOR_VAR);
s = new GdaShapeText(horiz_label, *GdaConst::small_font,
wxRealPoint(bg_xmin+(bg_xmax-bg_xmin)/2.0, bg_ymin), 0,
Expand Down
8 changes: 4 additions & 4 deletions Explore/ConditionalScatterPlotView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ void ConditionalScatterPlotCanvas::ResizeSelectableShps(int virtual_scrn_w,
vert_label << CatClassification::CatClassifTypeToString(
GetCatType(VERT_VAR));
}
vert_label << " vert cat var: ";
vert_label << _(" vert cat var: ");
vert_label << GetNameWithTime(VERT_VAR);
vert_label << ", ";
}
vert_label << "dep. var: " << GetNameWithTime(DEP_VAR);
vert_label << _("dep. var: ") << GetNameWithTime(DEP_VAR);
s = new GdaShapeText(vert_label, *GdaConst::small_font,
wxRealPoint(bg_xmin, bg_ymin+(bg_ymax-bg_ymin)/2.0), 90,
GdaShapeText::h_center, GdaShapeText::bottom, -(label_offset+18), 0);
Expand Down Expand Up @@ -369,11 +369,11 @@ void ConditionalScatterPlotCanvas::ResizeSelectableShps(int virtual_scrn_w,
horiz_label << CatClassification::CatClassifTypeToString(
GetCatType(HOR_VAR));
}
horiz_label << " horiz cat var: ";
horiz_label << _(" horiz cat var: ");
horiz_label << GetNameWithTime(HOR_VAR);
horiz_label << ", ";
}
horiz_label << "ind. var: " << GetNameWithTime(IND_VAR);
horiz_label << _("ind. var: ") << GetNameWithTime(IND_VAR);
s = new GdaShapeText(horiz_label, *GdaConst::small_font,
wxRealPoint(bg_xmin+(bg_xmax-bg_xmin)/2.0, bg_ymin), 0,
GdaShapeText::h_center, GdaShapeText::top, 0, (label_offset+18));
Expand Down
1 change: 1 addition & 0 deletions Explore/MapLayoutView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Xun Li on 8/6/18.
//
#include <stdio.h>
#include <wx/wx.h>
#include <wx/dcsvg.h>
#include <wx/dcps.h>

Expand Down
2 changes: 1 addition & 1 deletion Explore/MapNewView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ MapCanvas::MapCanvas(wxWindow *parent, TemplateFrame* t_frame,
const wxPoint& pos, const wxSize& size)
: TemplateCanvas(parent, t_frame, project_s,
project_s->GetHighlightState(),
pos, size, true, true),
pos, size, true, true, GdaConst::enable_high_dpi_support),
num_obs(project_s->GetNumRecords()),
p_datasource(project_s->GetDataSource()),
num_time_vals(1),
Expand Down
2 changes: 1 addition & 1 deletion GdaConst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ wxString GdaConst::gda_user_email = "";
uint64_t GdaConst::gda_user_seed = 123456789;
bool GdaConst::use_gda_user_seed = true;
int GdaConst::gdal_http_timeout = 5;
bool GdaConst::enable_high_dpi_support = true;
bool GdaConst::enable_high_dpi_support = false;
bool GdaConst::show_csv_configure_in_merge = true;
bool GdaConst::show_recent_sample_connect_ds_dialog = true;
bool GdaConst::use_cross_hatching = false;
Expand Down
77 changes: 77 additions & 0 deletions GeoDamake.disco.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
GeoDa_ROOT = $(GEODA_HOME)/../..

TARGET = GeoDa

CC = /usr/bin/gcc
CXX = /usr/bin/g++
LD = /usr/bin/g++
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)
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_date_time.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 -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.0 -lEGL
# Note: Library -lrtmp causes a missing library problem at runtime on
# Ubuntu 14.10 and later.

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

EIGEN_HEADER = -I$(GEODA_HOME)/libraries/include/eigen3

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

CPPFLAGS = -I$(GeoDa_ROOT) -std=c++98
CFLAGS = -O2 -Wdeclaration-after-statement $(USER_DEFS) $(GDAL_HEADER) $(EIGEN_HEADER)
CXXFLAGS = -O2 $(USER_DEFS) $(WX_HEADER) $(BOOST_HEADER) $(GDAL_HEADER) $(EIGEN_HEADER)
LDFLAGS =

OBJ_EXT = o

#
# generic library rules
#

#
# gdal and ogr low level drivers use the following default rules in order to
# populate the ../o/ directory with all object and library object files
#

O_OBJ = $(foreach file,$(OBJ),../o/$(file))
T_OBJ = $(foreach file,$(OBJ),o/$(file))

../o/%.$(OBJ_EXT): %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

../o/%.$(OBJ_EXT): %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

o/%.$(OBJ_EXT): %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

o/%.$(OBJ_EXT): %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

%.$(OBJ_EXT): %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

%.$(OBJ_EXT): %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

#
# default rules for handling subdirectories
#

%-target:
$(MAKE) -C $*

%-clean:
$(MAKE) -C $* clean
2 changes: 1 addition & 1 deletion TemplateCanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TemplateCanvas : public wxScrolledWindow, public HighlightStateObserver
const wxSize& size,
bool fixed_aspect_ratio_mode = false,
bool fit_to_window_mode = true,
bool enable_high_dpi_support = GdaConst::enable_high_dpi_support);
bool enable_high_dpi_support = true); // always try hdpi except maps
virtual ~TemplateCanvas();

public:
Expand Down
Binary file added internationalization/lang/ru/GeoDa.mo
Binary file not shown.
Binary file modified internationalization/lang/zh_CN/GeoDa.mo
Binary file not shown.
Loading

0 comments on commit 1a0cc2e

Please sign in to comment.