Branch data Line data Source code
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 : : 22 : : G_BEGIN_DECLS 23 : : 24 : : /** 25 : : * ShumateGeometryType: 26 : : * @SHUMATE_GEOMETRY_TYPE_UNKNOWN: Unknown geometry type 27 : : * @SHUMATE_GEOMETRY_TYPE_POINT: A single point 28 : : * @SHUMATE_GEOMETRY_TYPE_MULTIPOINT: A collection of points 29 : : * @SHUMATE_GEOMETRY_TYPE_LINESTRING: A single line 30 : : * @SHUMATE_GEOMETRY_TYPE_MULTILINESTRING: A collection of lines 31 : : * @SHUMATE_GEOMETRY_TYPE_POLYGON: A single polygon 32 : : * @SHUMATE_GEOMETRY_TYPE_MULTIPOLYGON: A collection of polygons 33 : : * 34 : : * A type of geometry. 35 : : * 36 : : * Since: 1.2 37 : : */ 38 : : typedef enum { 39 : : SHUMATE_GEOMETRY_TYPE_UNKNOWN, 40 : : SHUMATE_GEOMETRY_TYPE_POINT, 41 : : SHUMATE_GEOMETRY_TYPE_MULTIPOINT, 42 : : SHUMATE_GEOMETRY_TYPE_LINESTRING, 43 : : SHUMATE_GEOMETRY_TYPE_MULTILINESTRING, 44 : : SHUMATE_GEOMETRY_TYPE_POLYGON, 45 : : SHUMATE_GEOMETRY_TYPE_MULTIPOLYGON 46 : : } ShumateGeometryType; 47 : : 48 : : #define SHUMATE_TYPE_VECTOR_READER_ITER (shumate_vector_reader_iter_get_type ()) 49 [ + - + - : 666 : G_DECLARE_FINAL_TYPE (ShumateVectorReaderIter, shumate_vector_reader_iter, SHUMATE, VECTOR_READER_ITER, GObject) + + + - + - + - ] 50 : : 51 : : guint shumate_vector_reader_iter_get_layer_count (ShumateVectorReaderIter *self); 52 : : void shumate_vector_reader_iter_read_layer (ShumateVectorReaderIter *self, int index); 53 : : gboolean shumate_vector_reader_iter_read_layer_by_name (ShumateVectorReaderIter *self, const char *name); 54 : : const char *shumate_vector_reader_iter_get_layer_name (ShumateVectorReaderIter *self); 55 : : 56 : : guint shumate_vector_reader_iter_get_layer_extent (ShumateVectorReaderIter *self); 57 : : guint shumate_vector_reader_iter_get_layer_feature_count (ShumateVectorReaderIter *self); 58 : : 59 : : void shumate_vector_reader_iter_read_feature (ShumateVectorReaderIter *self, int index); 60 : : gboolean shumate_vector_reader_iter_next_feature (ShumateVectorReaderIter *self); 61 : : guint64 shumate_vector_reader_iter_get_feature_id (ShumateVectorReaderIter *self); 62 : : gboolean shumate_vector_reader_iter_get_feature_tag (ShumateVectorReaderIter *self, 63 : : const char *key, 64 : : GValue *value); 65 : : const char **shumate_vector_reader_iter_get_feature_keys (ShumateVectorReaderIter *self); 66 : : 67 : : 68 : : ShumateGeometryType shumate_vector_reader_iter_get_feature_geometry_type (ShumateVectorReaderIter *self); 69 : : gboolean shumate_vector_reader_iter_get_feature_point (ShumateVectorReaderIter *self, 70 : : double *x, 71 : : double *y); 72 : : gboolean shumate_vector_reader_iter_feature_contains_point (ShumateVectorReaderIter *self, 73 : : double x, 74 : : double y); 75 : : G_END_DECLS