File: qgsgmlschema.sip

package info (click to toggle)
qgis 2.18.28%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,007,948 kB
  • sloc: cpp: 671,774; python: 158,539; xml: 35,690; ansic: 8,346; sh: 1,766; perl: 1,669; sql: 999; yacc: 836; lex: 461; makefile: 292
file content (52 lines) | stat: -rw-r--r-- 1,371 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//typedef QMap<int, QgsField> QgsFieldMap;

/* Description of feature class in GML */
class QgsGmlFeatureClass
{
  public:
    QgsGmlFeatureClass();
    QgsGmlFeatureClass( const QString& name, const QString& path );

    QList<QgsField> & fields();

    int fieldIndex( const QString & name );

    QString path() const;

    QStringList & geometryAttributes();
};

class QgsGmlSchema : QObject
{

%TypeHeaderCode
#include <qgsgmlschema.h>
%End

  public:
    QgsGmlSchema();

    ~QgsGmlSchema();

    /** Get fields info from XSD */
    bool parseXSD( const QByteArray &xml );

    /** Guess GML schema from data if XSD does not exist.
      * Currently only recognizes UMN Mapserver GetFeatureInfo GML response.
      * Supports only UTF-8, UTF-16, ISO-8859-1, US-ASCII XML encodings.
      * @param data GML data
      * @return true in case of success */
    bool guessSchema( const QByteArray &data );

    /** Get list of dot separated paths to feature classes parsed from GML or XSD */
    QStringList typeNames() const;

    /** Get fields for type/class name parsed from GML or XSD */
    QList<QgsField> fields( const QString & typeName );

    /** Get list of geometry attributes for type/class name */
    QStringList geometryAttributes( const QString & typeName );

    /** Get error if parseXSD() or guessSchema() failed */
    QgsError error() const;
};