World Ocean Simulation System (WOSS) library
bathymetry-utm-csv-db-creator.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
33#ifndef WOSS_BATHYMETRY_UMT_CSV_DB_CREATOR_H
34#define WOSS_BATHYMETRY_UMT_CSV_DB_CREATOR_H
35
36#include <utility>
37#include "woss-db-creator.h"
38
39
40namespace woss {
41
49
50 public:
51
56
58
60
61 virtual ~BathyUtmCsvDbCreator() override = default;
62
64
66
74 virtual std::unique_ptr<WossDbCreator> clone() const override { return std::make_unique<BathyUtmCsvDbCreator>(*this); }
75
76
81 virtual std::unique_ptr<WossDb> createWossDb() const override;
82
89 BathyUtmCsvDbCreator& setCSVSeparator( const char new_separator ) { separator = new_separator; return *this; }
90
96 const char getCSVSeparator() const { return separator; }
97
104 BathyUtmCsvDbCreator& setDbSpacing( double spacing ) { db_spacing = spacing; return *this; }
105
111 double getDbSpacing() const { return db_spacing; }
112
120 BathyUtmCsvDbCreator& setDbTotalValues(int nnorth, int neast) {
121 total_northing_values = nnorth;
122 total_easting_values = neast;
123 return *this;
124 }
125
131 std::pair<int, int> getDbTotalValues() const {
132 return std::make_pair(total_northing_values, total_easting_values);
133 }
134
142 BathyUtmCsvDbCreator& setDbRangeEasting(double start, double end) {
143 range_easting_start = start;
144 range_easting_end = end;
145 return *this;
146 }
147
153 std::pair<double, double> getDbRangeEasting() const {
154 return std::make_pair(range_easting_start, range_easting_end);
155 }
156
164 BathyUtmCsvDbCreator& setDbRangeNorthing(double start, double end) {
165 range_northing_start = start;
166 range_northing_end = end;
167 return *this;
168 }
169
175 std::pair<double, double> getDbRangeNorthing() const {
176 return std::make_pair( range_northing_start, range_northing_end);
177 }
178
186 return *this;
187 }
188
196 }
197
198 protected:
199
202 double db_spacing;
223 virtual bool initializeDb( WossDb& woss_db ) const override;
224
225 };
226
227}
228
229#endif /* WOSS_BATHYMETRY_UMT_CSV_DB_CREATOR_H */
WossDbCreator for the UMT CSV bathymetry database.
Definition bathymetry-utm-csv-db-creator.h:48
BathyUtmCsvDbCreator & setDbRangeNorthing(double start, double end)
Definition bathymetry-utm-csv-db-creator.h:164
BathyUtmCsvDbCreator(const BathyUtmCsvDbCreator &copy)=default
std::pair< int, int > getDbTotalValues() const
Definition bathymetry-utm-csv-db-creator.h:131
virtual std::unique_ptr< WossDbCreator > clone() const override
Definition bathymetry-utm-csv-db-creator.h:74
int total_northing_values
Definition bathymetry-utm-csv-db-creator.h:204
double getDbSpacing() const
Definition bathymetry-utm-csv-db-creator.h:111
double range_northing_start
Definition bathymetry-utm-csv-db-creator.h:212
virtual ~BathyUtmCsvDbCreator() override=default
BathyUtmCsvDbCreator & operator=(BathyUtmCsvDbCreator &&tmp)=default
BathyUtmCsvDbCreator & operator=(const BathyUtmCsvDbCreator &copy)=default
BathyUtmCsvDbCreator()
Definition bathymetry-utm-csv-db-creator.cpp:32
BathyUtmCsvDbCreator & setLandApproximationFlag(bool flag)
Definition bathymetry-utm-csv-db-creator.h:184
BathyUtmCsvDbCreator(BathyUtmCsvDbCreator &&tmp)=default
virtual bool initializeDb(WossDb &woss_db) const override
Definition bathymetry-utm-csv-db-creator.cpp:64
int total_easting_values
Definition bathymetry-utm-csv-db-creator.h:206
virtual std::unique_ptr< WossDb > createWossDb() const override
Definition bathymetry-utm-csv-db-creator.cpp:47
double range_easting_end
Definition bathymetry-utm-csv-db-creator.h:210
BathyUtmCsvDbCreator & setDbTotalValues(int nnorth, int neast)
Definition bathymetry-utm-csv-db-creator.h:120
std::pair< double, double > getDbRangeNorthing() const
Definition bathymetry-utm-csv-db-creator.h:175
double range_northing_end
Definition bathymetry-utm-csv-db-creator.h:214
std::pair< double, double > getDbRangeEasting() const
Definition bathymetry-utm-csv-db-creator.h:153
BathyUtmCsvDbCreator & setDbRangeEasting(double start, double end)
Definition bathymetry-utm-csv-db-creator.h:142
BathyUtmCsvDbCreator & setDbSpacing(double spacing)
Definition bathymetry-utm-csv-db-creator.h:104
char separator
Definition bathymetry-utm-csv-db-creator.h:200
bool approx_land_to_sea_surface
Definition bathymetry-utm-csv-db-creator.h:216
bool getLandApproximationFlag() const
Definition bathymetry-utm-csv-db-creator.h:194
const char getCSVSeparator() const
Definition bathymetry-utm-csv-db-creator.h:96
double range_easting_start
Definition bathymetry-utm-csv-db-creator.h:208
double db_spacing
Definition bathymetry-utm-csv-db-creator.h:202
BathyUtmCsvDbCreator & setCSVSeparator(const char new_separator)
Definition bathymetry-utm-csv-db-creator.h:89
Abstract class that provides the interface of database creator ( Factory object )
Definition woss-db-creator.h:55
Abstract class that provides the interface of databases.
Definition woss-db.h:79
Definition ac-toolbox-arr-asc-reader.h:44
Provides the interface for woss::WossDbCreator class.