]> Pileus Git - grits/blob - src/objects/gis-object.c
b86933705375b86a07fe3da1f48fa40f953ca55d
[grits] / src / objects / gis-object.c
1 /*
2  * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program 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
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #include <config.h>
19 #include "gis-object.h"
20
21 /* GisPoint */
22 GisPoint *gis_point_new()
23 {
24         return g_new0(GisPoint, 1);
25 }
26
27 void gis_point_set_lle(GisPoint *self, gdouble lat, gdouble lon, gdouble elev)
28 {
29         self->lat  = lat;
30         self->lon  = lon;
31         self->elev = elev;
32 }
33
34 void gis_point_free(GisPoint *self)
35 {
36         g_free(self);
37 }
38
39
40 /* GisObject */
41 G_DEFINE_TYPE(GisObject, gis_object, G_TYPE_OBJECT);
42 static void gis_object_init(GisObject *self) { }
43 static void gis_object_class_init(GisObjectClass *klass) { }