Revision 787
org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib/gvsig/libs/gvpy.py | ||
---|---|---|
1 | 1 |
|
2 | 2 |
# File: gvpy.py |
3 |
# Version: v0.5
|
|
4 |
# 2016/02/10
|
|
3 |
# Version: v0.6
|
|
4 |
# 2016/10/24
|
|
5 | 5 |
|
6 |
__author__ = """Oscar Martinez Olmos <masquesig@gmail.com>""" |
|
7 | 6 |
|
8 | 7 |
import gvsig |
9 | 8 |
from gvsig import geom |
... | ... | |
18 | 17 |
import java.awt.geom |
19 | 18 |
from java.io import File |
20 | 19 |
from java.util import ArrayList |
20 |
import collections |
|
21 | 21 |
|
22 | 22 |
from gvsig import uselib |
23 | 23 |
uselib.use_plugin("org.gvsig.geoprocess.app.mainplugin") |
... | ... | |
148 | 148 |
def __defineParameters_multi2sextante(self, param, paramValue): |
149 | 149 |
if DEV_INFO: print "PARAM VALUE PRE", paramValue |
150 | 150 |
paramValue2 = [] |
151 |
# Just one layer as parameter, to make it iterable |
|
152 |
if not isinstance(paramValue, collections.Iterable): |
|
153 |
paramValue = [paramValue] |
|
154 |
|
|
151 | 155 |
for i in paramValue: |
152 | 156 |
if isinstance(i, str): |
153 | 157 |
layer = gvsig.currentView().getLayer(i) |
154 |
print "--------------- lidar: ", layer |
|
155 | 158 |
i = self.__createSextanteLayer(layer) |
156 | 159 |
ii = self.__createSextanteLayer(layer) |
157 | 160 |
|
... | ... | |
521 | 524 |
if "OUTPUT_VIEW" in kwparams: |
522 | 525 |
outputview = (kwparams["OUTPUT_VIEW"]).decode("UTF-8") |
523 | 526 |
if isinstance(outputview, str): |
524 |
view = currentProject().getView(outputview) |
|
527 |
view = gvsig.currentProject().getView(outputview)
|
|
525 | 528 |
else: |
526 | 529 |
view = outputview |
527 | 530 |
else: |
... | ... | |
561 | 564 |
if "OUTPUT_VIEW" in kwparams: |
562 | 565 |
outputview = (kwparams["OUTPUT_VIEW"]).decode("UTF-8") |
563 | 566 |
if isinstance(outputview, str): |
564 |
view = currentProject().getView(outputview) |
|
567 |
view = gvsig.currentProject().getView(outputview)
|
|
565 | 568 |
else: |
566 | 569 |
view = outputview |
567 | 570 |
else: |
Also available in: Unified diff