#shape_path = "/home/boland/Dropbox/University/UniMelb\ #/AGOS/PROGRAMS/ANT/Versions/26.04.2015/shapefiles/aus.shp" t0 = dt.datetime.now() #----------------------------------------------------------------------------- # INITIALISE CLASS STATES #----------------------------------------------------------------------------- # Generate InShape class SHAPE = InShape(shape_path) # Create shapely polygon from imported shapefile UNIQUE_SHAPE = SHAPE.shape_poly() print type(UNIQUE_SHAPE) # Generate InPoly class INPOLY = InPoly(shape_path) GEODESIC = Geodesic() COORDS = Coordinates() INPOLY = InPoly(shape_path) POLY_NODES = INPOLY.poly_nodes() # decluster the points to desired specifications. coords = COORDS.decluster(inputs=coords, degree_dist=0.5) lonmin, lonmax = np.floor(min(coords[:, 0])), np.ceil(max(coords[:, 0])) latmin, latmax = np.floor(min(coords[:, 1])), np.ceil(max(coords[:, 1])) print lonmin, lonmax, latmin, latmax plt.figure() plt.scatter(coords[:, 0], coords[:, 1]) plt.show()