Fix message references for inches and feet
[survex.git] / src / gdalexport.h
blobf65a6f8de00a54a33ce7083e89546a77cf175502
1 /* gdalexport.h
2 * Export using GDAL
3 */
4 /* Copyright (C) 2024 Olly Betts
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "exportfilter.h"
23 #ifdef HAVE_GDAL
24 # include <ogrsf_frmts.h>
25 #endif
27 #include "vector3.h"
29 #include <vector>
31 class ExportWithGDAL : public ExportFilter {
32 #ifdef HAVE_GDAL
33 GDALDataset* gdal_dataset = nullptr;
34 OGRLayer* gdal_layer = nullptr;
35 OGRSpatialReference* srs = nullptr;
36 OGRLineString line_string;
38 void finish_line_string();
39 #endif
41 public:
42 ExportWithGDAL(const char* filename,
43 const char* input_datum,
44 const char* gdal_driver_name);
45 ~ExportWithGDAL();
46 #ifdef HAVE_GDAL
47 void header(const char *, const char *, time_t,
48 double, double, double,
49 double, double, double) override;
50 void start_pass(int pass) override;
51 void line(const img_point *, const img_point *, unsigned, bool) override;
52 #endif
53 void label(const img_point *, const wxString&, int, int) override;
54 #ifdef HAVE_GDAL
55 void footer() override;
56 #endif
59 class ShapefilePoints : public ExportWithGDAL {
60 public:
61 ShapefilePoints(const char* filename,
62 const char* input_datum)
63 : ExportWithGDAL(filename, input_datum, "ESRI Shapefile") {}
65 const int * passes() const override;
68 class ShapefileLines : public ExportWithGDAL {
69 public:
70 ShapefileLines(const char* filename,
71 const char* input_datum)
72 : ExportWithGDAL(filename, input_datum, "ESRI Shapefile") {}
74 const int * passes() const override;