source: git/src/kml.h

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

Pass station name to export code as wxString

This means we don't force a conversion to UTF8 for formats where
the name isn't actually used, and also means we can pass the name
in to the cross method too without worrying about extra costs.

This fixes poor handling of equated stations in SVG export where
previously we'd write out the same station name for each equated
station. SVG export is also more efficient than before.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/* kml.h
2 * Export from Aven as KML.
3 */
4/* Copyright (C) 2005,2013,2014,2015,2016,2017,2018 Olly Betts
5 *
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.
10 *
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.
15 *
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
19 */
20
21#include "exportfilter.h"
22
23#include <proj.h>
24
25#include "vector3.h"
26
27#include <vector>
28
29class KML : public ExportFilter {
30    PJ* pj = NULL;
31    bool in_linestring = false;
32    bool in_wall = false;
33    bool in_passage = false;
34    bool clamp_to_ground;
35    Vector3 v1, v2;
36  public:
37    KML(const char * input_datum, bool clamp_to_ground_);
38    ~KML();
39    const int * passes() const;
40    void header(const char *, const char *, time_t,
41                double, double, double,
42                double, double, double);
43    void start_pass(int pass);
44    void line(const img_point *, const img_point *, unsigned, bool);
45    void label(const img_point *, const wxString&, bool, int);
46    void xsect(const img_point *, double, double, double);
47    void wall(const img_point *, double, double);
48    void passage(const img_point *, double, double, double);
49    void tube_end();
50    void footer();
51};
Note: See TracBrowser for help on using the repository browser.