200 void SetValid(
bool valid) { bValid = valid; }
201 time_t GetFileTime()
const {
return file_date; }
202 time_t GetChartEditionDate()
const {
return edition_date; }
204 int GetnPlyEntries()
const {
return nPlyEntries; }
205 float *GetpPlyTable()
const {
return pPlyTable; }
207 int GetnAuxPlyEntries()
const {
return nAuxPlyEntries; }
208 float *GetpAuxPlyTableEntry(
int index)
const {
return pAuxPlyTable[index]; }
209 int GetAuxCntTableEntry(
int index)
const {
return pAuxCntTable[index]; }
211 int GetnNoCovrPlyEntries()
const {
return nNoCovrPlyEntries; }
212 float *GetpNoCovrPlyTableEntry(
int index)
const {
213 return pNoCovrPlyTable[index];
215 int GetNoCovrCntTableEntry(
int index)
const {
return pNoCovrCntTable[index]; }
217 const LLBBox &GetBBox()
const {
return m_bbox; }
219 char *GetpFullPath()
const {
return pFullPath; }
220 float GetLonMax()
const {
return LonMax; }
221 float GetLonMin()
const {
return LonMin; }
222 float GetLatMax()
const {
return LatMax; }
223 float GetLatMin()
const {
return LatMin; }
224 int GetScale()
const {
return Scale; }
225 int GetChartType()
const {
return ChartType; }
226 int GetChartFamily()
const {
return ChartFamily; }
227 int GetChartProjectionType()
const {
return ProjectionType; }
228 float GetChartSkew()
const {
return Skew; }
230 bool GetbValid() {
return bValid; }
231 void SetEntryOffset(
int n) { EntryOffset = n; }
232 const wxString *GetpFileName(
void)
const {
return m_pfilename; }
233 wxString *GetpsFullPath(
void)
const {
return m_psFullPath; }
234 wxString GetFullSystemPath()
const {
return m_fullSystemPath; }
235 const std::string &GetFullPath()
const {
return m_FullPath; }
237 const std::vector<int> &GetGroupArray(
void)
const {
return m_GroupArray; }
238 void ClearGroupArray(
void) { m_GroupArray.clear(); }
239 void AddIntToGroupArray(
int val) { m_GroupArray.push_back(val); }
240 void SetAvailable(
bool avail) { m_bavail = avail; }
242 std::vector<float> GetReducedPlyPoints();
243 std::vector<float> GetReducedAuxPlyPoints(
int iTable);
245 LLRegion quilt_candidate_region;
247 void SetScale(
int scale);
248 bool Scale_eq(
int b)
const {
return abs(Scale - b) <= rounding; }
249 bool Scale_ge(
int b)
const {
return Scale_eq(b) || Scale > b; }
250 bool Scale_gt(
int b)
const {
return Scale > b && !Scale_eq(b); }
251 bool IsBasemap()
const;
269 float **pAuxPlyTable;
274 int nNoCovrPlyEntries;
275 int *pNoCovrCntTable;
276 float **pNoCovrPlyTable;
278 std::vector<int> m_GroupArray;
279 wxString *m_pfilename;
280 wxString *m_psFullPath;
281 wxString m_fullSystemPath;
282 std::string m_FullPath;
287 std::vector<float> m_reducedPlyPoints;
289 std::vector<std::vector<float>> m_reducedAuxPlyPointsVector;
310 void OnAnyEvent(wxEvent &event);
317 bool Create(ArrayOfCDI &dir_array, wxGenericProgressDialog *pprog);
325 bool Update(ArrayOfCDI &dir_array,
bool bForce,
326 wxGenericProgressDialog *pprog);
327 void FinalizeChartUpdate();
329 bool Read(
const wxString &filePath);
330 bool Write(
const wxString &filePath);
332 bool AddSingleChart(wxString &fullpath,
bool b_force_full_search =
true);
333 bool RemoveSingleChart(wxString &ChartFullPath);
335 const wxString &GetDBFileName()
const {
return m_DBFileName; }
336 ArrayOfCDI &GetChartDirArray() {
return m_dir_array; }
337 wxArrayString &GetChartDirArrayString() {
return m_chartDirs; }
338 void SetChartDirArray(ArrayOfCDI array) { m_dir_array = array; }
339 bool CompareChartDirArray(ArrayOfCDI &test_array);
340 wxString GetMagicNumberCached(wxString dir);
342 void UpdateChartClassDescriptorArray(
void);
343 bool UpdateChartDatabaseInplace(ArrayOfCDI &DirArray,
bool b_force,
344 wxGenericProgressDialog *_prog);
346 inline std::vector<std::shared_ptr<ChartTableEntry>> &GetChartTable() {
347 return active_chartTable;
349 int GetChartTableEntries()
const {
return active_chartTable.size(); }
352 bool IsValid()
const {
return bValid; }
353 int DisableChart(wxString &PathToDisable);
354 bool GetCentroidOfLargestScaleChart(
double *clat,
double *clon,
355 ChartFamilyEnum family);
356 int GetDBChartType(
int dbIndex);
357 int GetDBChartFamily(
int dbIndex);
358 float GetDBChartSkew(
int dbIndex);
359 int GetDBChartProj(
int dbIndex);
360 int GetDBChartScale(
int dbIndex);
362 bool GetDBBoundingBox(
int dbindex, LLBBox &box);
363 const LLBBox &GetDBBoundingBox(
int dbIndex);
365 int GetnAuxPlyEntries(
int dbIndex);
366 int GetDBPlyPoint(
int dbIndex,
int plyindex,
float *lat,
float *lon);
367 int GetDBAuxPlyPoint(
int dbIndex,
int plyindex,
int iAuxPly,
float *lat,
369 int GetVersion() {
return m_dbversion; }
370 wxString GetFullChartInfo(
ChartBase *pc,
int dbIndex,
int *char_width,
372 int FinddbIndex(wxString PathToFind);
373 wxString GetDBChartFileName(
int dbIndex);
374 void ApplyGroupArray(ChartGroupArray *pGroupArray);
375 bool IsChartAvailable(
int dbIndex);
376 std::map<wxString, int> active_chartTable_pathindex;
378 std::vector<float> GetReducedPlyPoints(
int dbIndex);
379 std::vector<float> GetReducedAuxPlyPoints(
int dbIndex,
int iTable);
381 bool IsBusy() {
return m_b_busy; }
382 void SetBusy(
bool _busy) { m_b_busy = _busy; }
383 bool ScrubGroupArray();
389 std::vector<std::shared_ptr<ChartTableEntry>> active_chartTable;
390 void OnDBSProgressUpdate(wxCommandEvent &evt);
393 virtual ChartBase *GetChart(
const wxChar *theFilePath,
395 int AddChartDirectory(
const wxString &theDir,
bool bshow_prog);
396 void SetValid(
bool valid) { bValid = valid; }
398 std::vector<ChartClassDescriptor> m_ChartClassDescriptorArray;
399 ArrayOfCDI m_dir_array;
403 bool IsChartDirUsed(
const wxString &theDir);
405 int SearchDirAndAddCharts(wxString &dir_name_base,
407 wxGenericProgressDialog *pprog);
410 wxGenericProgressDialog *pprog,
411 wxString &dir_magic,
bool bForce);
412 bool DetectDirChange(
const wxString &dir_path,
const wxString &prog_label,
413 const wxString &magic, wxString &new_magic,
414 wxGenericProgressDialog *pprog);
417 wxGenericProgressDialog *pprog,
int isearch,
418 bool bthis_dir_in_dB);
420 bool Check_CM93_Structure(wxString dir_name);
423 wxArrayString m_chartDirs;
427 m_ChartTableEntryDummy;
428 wxString m_DBFileName;
436 std::atomic<int> m_jobsRemaining{0};
439 std::vector<std::shared_ptr<ChartTableEntryJobTicket>> m_ticket_vector;
440 std::vector<std::shared_ptr<ChartTableEntryJobTicket>>
441 m_deferred_ticket_vector;
442 ChartCollisionsHashMap m_full_collision_map;
445 wxGenericProgressDialog *m_pprog;
447 int m_nFileProgressQuantum;
448 wxString m_gshhg_chart_loc;
Represents an entry in the chart table, containing information about a single chart.