1# -*- coding: utf-8 -*-

2

3"""

4***************************************************************************

5 qgsgeometry.py

6 ---------------------

7 Date : May 2018

8 Copyright : (C) 2018 by Denis Rouzaud

9 Email : denis@opengis.ch

10***************************************************************************

11* *

12* This program is free software; you can redistribute it and/or modify *

13* it under the terms of the GNU General Public License as published by *

14* the Free Software Foundation; either version 2 of the License, or *

15* (at your option) any later version. *

16* *

17***************************************************************************

18"""

19

20

21 def _geometryNonZero(self):

22 return not self.isEmpty()

23

24

25 def mapping_geometry(geometry):

26 geo = geometry.asJson()

27 # We have to use eval because exportToGeoJSON() gives us

28 # back a string that looks like a dictionary.

29 return eval(geo)