PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
lwt_edgeend.h
Go to the documentation of this file.
1/**********************************************************************
2 *
3 * PostGIS - Spatial Types for PostgreSQL
4 * http://postgis.net
5 *
6 * PostGIS 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 * PostGIS 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 PostGIS. If not, see <http://www.gnu.org/licenses/>.
18 *
19 **********************************************************************
20 *
21 * Copyright (C) 2024 Sandro Santilli <strk@kbt.io>
22 *
23 **********************************************************************/
24
25#ifndef _LWT_EDGEEND_H
26#define _LWT_EDGEEND_H 1
27
28#include "liblwgeom.h"
29#include "liblwgeom_topo.h"
30
31/* Single edge end */
32typedef struct LWT_EDGEEND_t {
33 const LWT_ISO_EDGE *edge; /* Edge this edgeend comes from (parent edge) */
34 POINT2D p0; /* point incident to the node */
35 POINT2D p1; /* point away from the node */
36 int outgoing; /* 1 if p0 is the start_node of the parent edge, 0 if it is the end_node of it */
37 double azimuth; /* azimuth of the edge end (p0 to p1) */
39
40/*
41 * @param edge an edge, needs have a geometry
42 * @param outgoing 1 if p0 is the start_node of the parent edge, 0 if it is the end_node of it
43 */
44LWT_EDGEEND *lwt_edgeEnd_fromEdge( const LWT_ISO_EDGE *edge, int outgoing );
45
46/*
47 * Release memory owned by an edgeend
48 */
50
51#endif /* !defined _LWT_EDGEEND_H */
This library is the generic geometry handling section of PostGIS.
void lwt_edgeEnd_release(LWT_EDGEEND *end)
Definition lwt_edgeend.c:34
LWT_EDGEEND * lwt_edgeEnd_fromEdge(const LWT_ISO_EDGE *edge, int outgoing)
Definition lwt_edgeend.c:68
struct LWT_EDGEEND_t LWT_EDGEEND
const LWT_ISO_EDGE * edge
Definition lwt_edgeend.h:33