PageRenderTime 343ms CodeModel.GetById 130ms app.highlight 2ms RepoModel.GetById 210ms app.codeStats 0ms

/django/contrib/gis/geos/io.py

https://code.google.com/p/mango-py/
Python | 20 lines | 10 code | 4 blank | 6 comment | 0 complexity | 1d13d6cd1c8c2ee7829b3ddb288c2fdf MD5 | raw file
 1"""
 2Module that holds classes for performing I/O operations on GEOS geometry
 3objects.  Specifically, this has Python implementations of WKB/WKT
 4reader and writer classes.
 5"""
 6from django.contrib.gis.geos.geometry import GEOSGeometry
 7from django.contrib.gis.geos.prototypes.io import _WKTReader, _WKBReader, WKBWriter, WKTWriter
 8
 9# Public classes for (WKB|WKT)Reader, which return GEOSGeometry
10class WKBReader(_WKBReader):
11    def read(self, wkb):
12        "Returns a GEOSGeometry for the given WKB buffer."
13        return GEOSGeometry(super(WKBReader, self).read(wkb))
14
15class WKTReader(_WKTReader):
16    def read(self, wkt):
17        "Returns a GEOSGeometry for the given WKT string."
18        return GEOSGeometry(super(WKTReader, self).read(wkt))
19
20