shumate/shumate-vector-reader-iter.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Copyright (C) 2023 James Westman <james@jwestman.net> | ||
| 3 | * | ||
| 4 | * This library is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU Lesser General Public | ||
| 6 | * License as published by the Free Software Foundation; either | ||
| 7 | * version 2.1 of the License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This library is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 12 | * Lesser General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU Lesser General Public | ||
| 15 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include <glib-object.h> | ||
| 21 | #include <shumate/shumate-version.h> | ||
| 22 | |||
| 23 | G_BEGIN_DECLS | ||
| 24 | |||
| 25 | /** | ||
| 26 | * ShumateGeometryType: | ||
| 27 | * @SHUMATE_GEOMETRY_TYPE_UNKNOWN: Unknown geometry type | ||
| 28 | * @SHUMATE_GEOMETRY_TYPE_POINT: A single point | ||
| 29 | * @SHUMATE_GEOMETRY_TYPE_MULTIPOINT: A collection of points | ||
| 30 | * @SHUMATE_GEOMETRY_TYPE_LINESTRING: A single line | ||
| 31 | * @SHUMATE_GEOMETRY_TYPE_MULTILINESTRING: A collection of lines | ||
| 32 | * @SHUMATE_GEOMETRY_TYPE_POLYGON: A single polygon | ||
| 33 | * @SHUMATE_GEOMETRY_TYPE_MULTIPOLYGON: A collection of polygons | ||
| 34 | * | ||
| 35 | * A type of geometry. | ||
| 36 | * | ||
| 37 | * Since: 1.2 | ||
| 38 | */ | ||
| 39 | SHUMATE_AVAILABLE_TYPE_IN_1_2 | ||
| 40 | typedef enum { | ||
| 41 | SHUMATE_GEOMETRY_TYPE_UNKNOWN, | ||
| 42 | SHUMATE_GEOMETRY_TYPE_POINT, | ||
| 43 | SHUMATE_GEOMETRY_TYPE_MULTIPOINT, | ||
| 44 | SHUMATE_GEOMETRY_TYPE_LINESTRING, | ||
| 45 | SHUMATE_GEOMETRY_TYPE_MULTILINESTRING, | ||
| 46 | SHUMATE_GEOMETRY_TYPE_POLYGON, | ||
| 47 | SHUMATE_GEOMETRY_TYPE_MULTIPOLYGON | ||
| 48 | } ShumateGeometryType; | ||
| 49 | |||
| 50 | SHUMATE_AVAILABLE_MACRO_IN_1_2 | ||
| 51 | #define SHUMATE_TYPE_VECTOR_READER_ITER (shumate_vector_reader_iter_get_type ()) | ||
| 52 |
9/18None:
✓ Branch 39 → 40 taken 2 times.
✗ Branch 39 → 41 not taken.
✓ Branch 40 → 41 taken 2 times.
✗ Branch 40 → 42 not taken.
✓ Branch 41 → 42 taken 2 times.
✗ Branch 41 → 43 not taken.
✓ Branch 42 → 43 taken 2 times.
✗ Branch 42 → 44 not taken.
✓ Branch 108 → 109 taken 2 times.
✗ Branch 108 → 110 not taken.
✓ Branch 110 → 111 taken 2 times.
✗ Branch 110 → 112 not taken.
SHUMATE_IS_VECTOR_READER_ITER:
✓ Branch 3 → 4 taken 432 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 432 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 432 times.
|
438 | G_DECLARE_FINAL_TYPE (ShumateVectorReaderIter, shumate_vector_reader_iter, SHUMATE, VECTOR_READER_ITER, GObject) |
| 53 | |||
| 54 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 55 | guint shumate_vector_reader_iter_get_layer_count (ShumateVectorReaderIter *self); | ||
| 56 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 57 | void shumate_vector_reader_iter_read_layer (ShumateVectorReaderIter *self, int index); | ||
| 58 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 59 | gboolean shumate_vector_reader_iter_read_layer_by_name (ShumateVectorReaderIter *self, const char *name); | ||
| 60 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 61 | const char *shumate_vector_reader_iter_get_layer_name (ShumateVectorReaderIter *self); | ||
| 62 | |||
| 63 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 64 | guint shumate_vector_reader_iter_get_layer_extent (ShumateVectorReaderIter *self); | ||
| 65 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 66 | guint shumate_vector_reader_iter_get_layer_feature_count (ShumateVectorReaderIter *self); | ||
| 67 | |||
| 68 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 69 | void shumate_vector_reader_iter_read_feature (ShumateVectorReaderIter *self, int index); | ||
| 70 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 71 | gboolean shumate_vector_reader_iter_next_feature (ShumateVectorReaderIter *self); | ||
| 72 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 73 | guint64 shumate_vector_reader_iter_get_feature_id (ShumateVectorReaderIter *self); | ||
| 74 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 75 | gboolean shumate_vector_reader_iter_get_feature_tag (ShumateVectorReaderIter *self, | ||
| 76 | const char *key, | ||
| 77 | GValue *value); | ||
| 78 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 79 | const char **shumate_vector_reader_iter_get_feature_keys (ShumateVectorReaderIter *self); | ||
| 80 | |||
| 81 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 82 | ShumateGeometryType shumate_vector_reader_iter_get_feature_geometry_type (ShumateVectorReaderIter *self); | ||
| 83 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 84 | gboolean shumate_vector_reader_iter_get_feature_point (ShumateVectorReaderIter *self, | ||
| 85 | double *x, | ||
| 86 | double *y); | ||
| 87 | SHUMATE_AVAILABLE_IN_1_2 | ||
| 88 | gboolean shumate_vector_reader_iter_feature_contains_point (ShumateVectorReaderIter *self, | ||
| 89 | double x, | ||
| 90 | double y); | ||
| 91 | G_END_DECLS | ||
| 92 |