Skip to content

Commit

Permalink
[sextante] force export to shp in grass algorithms, since v.in.ogr sy…
Browse files Browse the repository at this point in the history
…ntax seems to be not always the same and some formats (i.e. GML) are not working
  • Loading branch information
volaya committed Apr 13, 2013
1 parent ac43402 commit 58c0036
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/GrassAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ def postProcessResults(self):
func(self)

def exportVectorLayer(self, orgFilename):
#only export to an intermediate shp if the layer is not file-based.
#We assume that almost all file formats will be supported by ogr
#TODO: improve this. We are now exporting if it is not a shapefile,
#but the functionality of v.in.ogr could be used for this.
#We also export if there is a selection
if not os.path.exists(orgFilename):
if not os.path.exists(orgFilename) or not orgFilename.endswith("shp"):
layer = QGisLayers.getObjectFromUri(orgFilename, False)
if layer:
filename = LayerExporter.exportVectorLayer(layer)
Expand Down

0 comments on commit 58c0036

Please sign in to comment.