source: git/src/export.h

walls-data-hanging-as-warning
Last change on this file was 355df41, checked in by Olly Betts <olly@…>, 20 months ago

Add ability to export as Survex 3d

This is useful as you can filter to a subset of surveys, filter
out splays, convert from other formats the img library can read,
etc.

This is a bit rough and ready currently. Please report issues.

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[79c239e]1/* export.h
[9fc1cac]2 * Export to CAD-like formats (DXF, Skencil, SVG, EPS, HPGL) and also Compass
[40f1e82]3 * PLT.
[79c239e]4 */
5
[1798716]6/* Copyright (C) 2004,2005,2012,2014,2015,2018 Olly Betts
[79c239e]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 as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
[40f1e82]20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
[79c239e]21 */
22
[5940815]23#ifndef SURVEX_INCLUDED_EXPORT_H
24#define SURVEX_INCLUDED_EXPORT_H
25
26#include "wx.h"
27
[1798716]28class Model;
[1a46879]29class SurveyFilter;
[5940815]30
[bd30612]31// Order here needs to match order of extension array in export.cc.
[583c17d]32typedef 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,
[9fc1cac]42    FMT_SK,
[59d4fbc7]43    FMT_POS,
[bd30612]44    FMT_SVG,
45    FMT_MAX_PLUS_ONE_
[583c17d]46} export_format;
47
[4d3c8915]48struct format_info {
49    const char* extension;
50    int msg_filetype;
51    unsigned mask;
[f7fb2ec]52    // Defaults for survexport (aven defaults to what is currently shown).
53    unsigned defaults;
[4d3c8915]54};
55
56extern const format_info export_format_info[];
[bd30612]57
[7b55ac2]58#define LEGS            0x00000001
59#define SURF            0x00000002
60#define STNS            0x00000004
61#define LABELS          0x00000008
62#define XSECT           0x00000010
63#define WALL1           0x00000020
64#define WALL2           0x00000040
[fc68ad5]65#define WALLS (WALL1|WALL2)
[7b55ac2]66#define PASG            0x00000080
[40623c5]67#define ORIENTABLE      0x00000100
[bc1fac5]68#define CENTRED         0x00000200
[7b55ac2]69#define ENTS            0x00000400
70#define FIXES           0x00000800
71#define EXPORTS         0x00001000
72#define PROJ            0x00002000
73#define GRID            0x00004000
74#define TEXT_HEIGHT     0x00008000
75#define MARKER_SIZE     0x00010000
76#define SCALE           0x00020000
[bc1fac5]77#define FULL_COORDS     0x00040000
[ddcf585]78#define SPLAYS          0x00080000
[32a040e]79#define CLAMP_TO_GROUND 0x00100000
[fc68ad5]80
[01c70fc]81#define DEFAULT_GRID_SPACING 100 // metres
82#define DEFAULT_TEXT_HEIGHT 0.6
83#define DEFAULT_MARKER_SIZE 0.8
84
[79c239e]85bool Export(const wxString &fnm_out, const wxString &title,
[1798716]86            const wxString &datestamp,
87            const Model& model,
[1a46879]88            const SurveyFilter* filter,
[70462c8]89            double pan, double tilt, int show_mask, export_format format,
[18ff765]90            double grid_, double text_height_, double marker_size_,
91            double scale);
[5940815]92
93#endif
Note: See TracBrowser for help on using the repository browser.