Constructor for an existing project file */
| 76 | |
| 77 | /** Constructor for an existing project file */ |
| 78 | Project::Project(const wxString& proj_fname) |
| 79 | : is_project_valid(false), |
| 80 | table_int(0), table_state(0), time_state(0), |
| 81 | w_man_int(0), w_man_state(0), maplayer_state(0), |
| 82 | save_manager(0), |
| 83 | frames_manager(0),cat_classif_manager(0), mean_centers(0), centroids(0), |
| 84 | voronoi_rook_nbr_gal(0), default_var_name(4), default_var_time(4), |
| 85 | point_duplicates_initialized(false), point_dups_warn_prev_displayed(false), |
| 86 | num_records(0), layer_proxy(NULL), |
| 87 | highlight_state(0), con_map_hl_state(0), pairs_hl_state(0), |
| 88 | dist_metric(WeightsMetaInfo::DM_euclidean), |
| 89 | dist_units(WeightsMetaInfo::DU_mile), |
| 90 | min_1nn_dist_euc(-1), max_1nn_dist_euc(-1), max_dist_euc(-1), |
| 91 | min_1nn_dist_arc(-1), max_1nn_dist_arc(-1), max_dist_arc(-1), |
| 92 | sourceSR(NULL), rtree_bbox_ready(false), has_null_geometry(false) |
| 93 | { |
| 94 | |
| 95 | wxLogMessage("Entering Project::Project (existing project)"); |
| 96 | //wxLogMessage("%s", proj_fname); |
| 97 | |
| 98 | SetProjectFullPath(proj_fname); |
| 99 | bool wd_success = SetWorkingDir(proj_fname); |
| 100 | if (!wd_success) { |
| 101 | //LOG_MSG("Warning: could not set Working Dir from " + proj_fname); |
| 102 | // attempt to set working dir according to standard location |
| 103 | wd_success = SetWorkingDir(wxGetHomeDir()); |
| 104 | if (!wd_success) { |
| 105 | //LOG_MSG("Warning: could not set Working Dir to wxGetHomeDir()"); |
| 106 | } |
| 107 | } |
| 108 | project_conf = new ProjectConfiguration(proj_fname); |
| 109 | LayerConfiguration* layer_conf = project_conf->GetLayerConfiguration(); |
| 110 | layername = layer_conf->GetName(); |
| 111 | datasource = layer_conf->GetDataSource(); |
| 112 | |
| 113 | is_project_valid = CommonProjectInit(); |
| 114 | if (is_project_valid) |
| 115 | save_manager->SetAllowEnableSave(true); |
| 116 | |
| 117 | if (is_project_valid) { |
| 118 | // correct cat classifications in weights manager from Table |
| 119 | GetCatClassifManager()->VerifyAgainstTable(); |
| 120 | } |
| 121 | |
| 122 | wxLogMessage("Exiting Project::Project"); |
| 123 | } |
| 124 | |
| 125 | /** Constructor for a newly connected datasource */ |
| 126 | Project::Project(const wxString& proj_title, |
nothing calls this directly
no test coverage detected