diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-04-30 18:56:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-04-30 18:56:02 +0200 |
commit | 24638f6d715da09a78ffe255389f2217e628ac4b (patch) | |
tree | b6aa3e7a4e70cd7d7ddf2f0bf14fa8a2ae28d2e2 /chimere/utils.py | |
parent | 930c229283251e38b0dc493a4c9a71aca67e062d (diff) | |
download | Chimère-24638f6d715da09a78ffe255389f2217e628ac4b.tar.bz2 Chimère-24638f6d715da09a78ffe255389f2217e628ac4b.zip |
Shapefile export
Diffstat (limited to 'chimere/utils.py')
-rw-r--r-- | chimere/utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chimere/utils.py b/chimere/utils.py index b2c8ccc..97f710f 100644 --- a/chimere/utils.py +++ b/chimere/utils.py @@ -22,6 +22,7 @@ Utilitaries """ import urllib2, re +import unicodedata from external_utils import OsmApi from lxml import etree from chimere import get_version @@ -30,6 +31,11 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext_lazy as _ +def unicode_normalize(string): + return ''.join( + (c for c in unicodedata.normalize('NFD', string) + if unicodedata.category(c) != 'Mn')) + class ImportManager: u""" Generic class for specific importers @@ -130,7 +136,7 @@ RE_NODE = re.compile('node\[([^\]]*)\]') class OSMManager(ImportManager): u""" - OSM importer + OSM importer/exporter The source url is a path to an OSM file or a XAPI url The filtr argument is XAPI args or empty if it is an OSM file. """ |