| [79c239e] | 1 | /* export.h |
|---|
| [85f7905] | 2 | * Export to GIS formats, CAD formats, and other formats. |
|---|
| [79c239e] | 3 | */ |
|---|
| 4 | |
|---|
| [681e33d] | 5 | /* Copyright (C) 2004-2024 Olly Betts |
|---|
| [79c239e] | 6 | * |
|---|
| 7 | * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | * it under the terms of the GNU General Public License as published by |
|---|
| 9 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 10 | * (at your option) any later version. |
|---|
| 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 |
|---|
| [40f1e82] | 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| [79c239e] | 20 | */ |
|---|
| 21 | |
|---|
| [5940815] | 22 | #ifndef SURVEX_INCLUDED_EXPORT_H |
|---|
| 23 | #define SURVEX_INCLUDED_EXPORT_H |
|---|
| 24 | |
|---|
| [1940bcd] | 25 | #include "img_for_survex.h" |
|---|
| [5940815] | 26 | #include "wx.h" |
|---|
| 27 | |
|---|
| [1798716] | 28 | class Model; |
|---|
| [1a46879] | 29 | class SurveyFilter; |
|---|
| [5940815] | 30 | |
|---|
| [bd30612] | 31 | // Order here needs to match order of extension array in export.cc. |
|---|
| [583c17d] | 32 | typedef enum { |
|---|
| [355df41] | 33 | FMT_3D, |
|---|
| [df121c2d] | 34 | FMT_CSV, |
|---|
| [583c17d] | 35 | FMT_DXF, |
|---|
| 36 | FMT_EPS, |
|---|
| 37 | FMT_GPX, |
|---|
| 38 | FMT_HPGL, |
|---|
| [1fe107a] | 39 | FMT_JSON, |
|---|
| [1534ed9] | 40 | FMT_KML, |
|---|
| [583c17d] | 41 | FMT_PLT, |
|---|
| [59d4fbc7] | 42 | FMT_POS, |
|---|
| [bd30612] | 43 | FMT_SVG, |
|---|
| [85f7905] | 44 | FMT_SHP_LINES, |
|---|
| 45 | FMT_SHP_POINTS, |
|---|
| [bd30612] | 46 | FMT_MAX_PLUS_ONE_ |
|---|
| [583c17d] | 47 | } export_format; |
|---|
| 48 | |
|---|
| [4d3c8915] | 49 | struct format_info { |
|---|
| 50 | const char* extension; |
|---|
| 51 | int msg_filetype; |
|---|
| 52 | unsigned mask; |
|---|
| [f7fb2ec] | 53 | // Defaults for survexport (aven defaults to what is currently shown). |
|---|
| 54 | unsigned defaults; |
|---|
| [4d3c8915] | 55 | }; |
|---|
| 56 | |
|---|
| 57 | extern const format_info export_format_info[]; |
|---|
| [bd30612] | 58 | |
|---|
| [681e33d] | 59 | // Align flag values with img_FLAG_*. |
|---|
| 60 | #define SURF img_FLAG_SURFACE |
|---|
| 61 | // img_FLAG_DUPLICATE |
|---|
| 62 | #define SPLAYS img_FLAG_SPLAY |
|---|
| 63 | #define MASK_ (img_FLAG_SURFACE|img_FLAG_DUPLICATE|img_FLAG_SPLAY) |
|---|
| [1e954b3] | 64 | static_assert(MASK_ < 0x00000008, "MASK_ only contains expected bits"); |
|---|
| [681e33d] | 65 | #define LEGS 0x00000008 |
|---|
| 66 | #define STNS 0x00000010 |
|---|
| 67 | #define LABELS 0x00000020 |
|---|
| 68 | #define XSECT 0x00000040 |
|---|
| 69 | #define WALL1 0x00000080 |
|---|
| 70 | #define WALL2 0x00000100 |
|---|
| [fc68ad5] | 71 | #define WALLS (WALL1|WALL2) |
|---|
| [681e33d] | 72 | #define PASG 0x00000200 |
|---|
| 73 | #define ORIENTABLE 0x00000400 |
|---|
| 74 | #define CENTRED 0x00000800 |
|---|
| 75 | #define ENTS 0x00001000 |
|---|
| 76 | #define FIXES 0x00002000 |
|---|
| 77 | #define EXPORTS 0x00004000 |
|---|
| 78 | #define PROJ 0x00008000 |
|---|
| 79 | #define GRID 0x00010000 |
|---|
| 80 | #define TEXT_HEIGHT 0x00020000 |
|---|
| 81 | #define MARKER_SIZE 0x00040000 |
|---|
| 82 | #define SCALE 0x00080000 |
|---|
| 83 | #define FULL_COORDS 0x00100000 |
|---|
| 84 | #define CLAMP_TO_GROUND 0x00200000 |
|---|
| [fc68ad5] | 85 | |
|---|
| [01c70fc] | 86 | #define DEFAULT_GRID_SPACING 100 // metres |
|---|
| 87 | #define DEFAULT_TEXT_HEIGHT 0.6 |
|---|
| 88 | #define DEFAULT_MARKER_SIZE 0.8 |
|---|
| 89 | |
|---|
| [79c239e] | 90 | bool Export(const wxString &fnm_out, const wxString &title, |
|---|
| [1798716] | 91 | const Model& model, |
|---|
| [1a46879] | 92 | const SurveyFilter* filter, |
|---|
| [70462c8] | 93 | double pan, double tilt, int show_mask, export_format format, |
|---|
| [18ff765] | 94 | double grid_, double text_height_, double marker_size_, |
|---|
| 95 | double scale); |
|---|
| [5940815] | 96 | |
|---|
| 97 | #endif |
|---|