Support "clamp to ground" for KML export
[survex.git] / src / kml.h
blob931f3d01420257b8444687687594b487d716eaf9
1 /* kml.h
2 * Export from Aven as KML.
3 */
4 /* Copyright (C) 2005,2013,2014,2015,2016,2017,2018 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 #include <proj_api.h>
25 #include "vector3.h"
27 #include <vector>
29 class KML : public ExportFilter {
30 projPJ pj_input = NULL, pj_output = NULL;
31 bool in_linestring = false;
32 bool in_wall = false;
33 bool clamp_to_ground;
34 std::vector<Vector3> psg;
35 public:
36 KML(const char * input_datum, bool clamp_to_ground_);
37 ~KML();
38 const int * passes() const;
39 void header(const char *, const char *, time_t,
40 double, double, double,
41 double, double, double);
42 void start_pass(int pass);
43 void line(const img_point *, const img_point *, unsigned, bool);
44 void label(const img_point *, const char *, bool, int);
45 void xsect(const img_point *, double, double, double);
46 void wall(const img_point *, double, double);
47 void passage(const img_point *, double, double, double);
48 void tube_end();
49 void footer();