maps import

This commit is contained in:
Max Zwiessele 2014-02-26 13:18:37 +00:00
parent f6228abd4c
commit adce78ba5a

View file

@ -4,7 +4,6 @@ import matplotlib.patches as patches
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
#from matplotlib import cm
import shapefile
import re
pb.ion()
@ -134,8 +133,10 @@ def plot_string_match(sf,regex,field,**kwargs):
plot(shape_records,**kwargs)
def new_shape_string(sf,name,regex,field=2,type=shapefile.POINT):
def new_shape_string(sf,name,regex,field=2,type=None):
import shapefile
if type is None:
type = shapefile.POINT
newshp = shapefile.Writer(shapeType = sf.shapeType)
newshp.autoBalance = 1