pysal

This Page

IOHandlers.wkt — Well Known Text (geometry) Plugin for PySAL’s FileIO System

New in version 1.0.

class pysal.core.IOHandlers.wkt.WKTParser

Class to represent OGC WKT, supports reading and writing Modified from... # URL: http://dev.openlayers.org/releases/OpenLayers-2.7/lib/OpenLayers/Format/WKT.js #Reg Ex Strings copied from OpenLayers.Format.WKT

Methods

LineString
Point
Polygon
fromWKT
LineString(geoStr)
Point(geoStr)
Polygon(geoStr)
fromWKT(wkt)
class pysal.core.IOHandlers.wkt.WKTReader(*args, **kwargs)
class by_row(parent)
WKTReader.cast(key, typ)
cast key as typ
classmethod WKTReader.check()
Prints the contents of the registry
WKTReader.close()
WKTReader.flush()
WKTReader.get(n)
Seeks the file to n and returns n If .ids is set n should be an id, else, n should be an offset
static WKTReader.getType(dataPath)
Parse the dataPath and return the data type
WKTReader.ids
WKTReader.next()
A FileIO object is its own iterator, see StringIO
WKTReader.open()
WKTReader.rIds
WKTReader.read(n=-1)
Read at most n objects, less if read hits EOF if size is negative or omitted read all objects until EOF returns None if EOF is reached before any objects.
WKTReader.seek(n)
WKTReader.tell()
Return id (or offset) of next object
WKTReader.truncate(size=None)
Should be implemented by subclasses and redefine this doc string
WKTReader.write(obj)
Must be implemented by subclasses that support ‘w’ subclasses should increment .pos subclasses should also check if obj is an instance of type(list) and redefine this doc string