Changeset 3177 for inundation/pmesh/mesh.py
- Timestamp:
- Jun 19, 2006, 10:30:57 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pmesh/mesh.py
r3100 r3177 13 13 Geoscience Australia 14 14 """ 15 import load_mesh.loadASCII16 import alpha_shape.alpha_shape17 15 18 16 import sys … … 29 27 from coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE 30 28 from utilities.polygon import point_in_polygon 29 import load_mesh.loadASCII 30 import alpha_shape.alpha_shape 31 from geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial 31 32 32 33 SET_COLOUR='red' … … 609 610 610 611 611 612 def add_vertices(self, data): 613 data = ensure_geospatial(data) 614 615 # get points relative to the mesh geo_ref 616 points = data.get_data_points(geo_reference=self.geo_reference) 617 #FIXME finish.... 618 619 for point in points: 620 v=Vertex(point[0], point[1]) 621 self.userVertices.append(v) 622 612 623 def add_hole_from_polygon(self, polygon, tags=None, geo_reference=None): 613 624 """ … … 853 864 854 865 def getUserVertices(self): 866 """ 867 Note: The x,y values will be relative to the mesh geo_reference 868 This returns a list of vertex objects 869 """ 855 870 return self.userVertices 871 872 def get_user_vertices(self, absolute=True): 873 """ 874 This returns a list of (x,y) values 875 (maybe it should return a geospatical object? 876 It makes it a bit confusing though.) 877 """ 878 pointlist=[] 879 for vertex in self.userVertices: 880 pointlist.append([vertex.x,vertex.y]) 881 spat = Geospatial_data(pointlist, geo_reference=self.geo_reference) 882 return spat.get_data_points(absolute=absolute) 856 883 857 884 def getUserSegments(self):
Note: See TracChangeset
for help on using the changeset viewer.