def on_nodes_to_shapefile(self, event=None): """ Export Network nodes data to shape file. """ print 'on_nodes_to_shapefile' dirpath = self._net.parent.get_workdirpath() defaultFile = self._net.parent.get_rootfilename() + '.nodes.shp' wildcards_all = 'All files (*.*)|*.*|SHP files (*.shp)|*.shp' dlg = wx.FileDialog( None, message='Export nodes to shapefile', defaultDir=dirpath, # defaultFile=defaultFile, wildcard=wildcards_all, style=wx.SAVE | wx.CHANGE_DIR) if dlg.ShowModal() == wx.ID_OK: filepath = dlg.GetPath() else: return shapeformat.nodes_to_shapefile(self._net, filepath, log=self._mainframe.get_logger())
def on_nodes_to_shapefile(self, event=None): """ Export Network nodes data to shape file. """ print 'on_nodes_to_shapefile' dirpath = self._net.parent.get_workdirpath() defaultFile = self._net.parent.get_rootfilename()+'.nodes.shp' wildcards_all = 'All files (*.*)|*.*|SHP files (*.shp)|*.shp' dlg = wx.FileDialog(None, message='Export nodes to shapefile', defaultDir=dirpath, defaultFile=defaultFile, wildcard=wildcards_all, style=wx.SAVE | wx.CHANGE_DIR) if dlg.ShowModal() == wx.ID_OK: filepath = dlg.GetPath() else: return shapeformat.nodes_to_shapefile(self._net, filepath, log=self._mainframe.get_logger())