Left: | ||
Right: |
LEFT | RIGHT |
---|---|
(no file at all) | |
1 # This file is part of trytond_backend_gis. The COPYRIGHT file at the top | |
2 # level of this repository contains the full copyright notices and license | |
3 # terms. | |
4 from trytond.config import config | |
5 | |
6 from .const import WGS_84 | |
7 | |
8 | |
9 class _GeoJSON(dict): | |
ced
2017/09/20 17:28:20
I do not find it is a good place to define such cl
| |
10 | |
11 def __init__(self, *args, **kwargs): | |
12 super(_GeoJSON, self).__init__(*args, **kwargs) | |
13 if 'meta' not in self: | |
ced
2017/09/20 17:28:20
why not use setdefault?
| |
14 self['meta'] = {} | |
15 if 'srid' not in self['meta']: | |
16 self['meta']['srid'] = config.getint( | |
17 'database', 'srid', default=WGS_84) | |
LEFT | RIGHT |