Revision 795
org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/scripts/tools/photo2shape/imagegpsmetadata.inf | ||
---|---|---|
9 | 9 |
main = main |
10 | 10 |
Lang = python |
11 | 11 |
|
12 |
[script] |
|
13 |
enable = true |
|
14 |
isolation = 0 |
|
15 |
|
org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/scripts/tools/photo2shape/photo2shape.py | ||
---|---|---|
4 | 4 |
import os.path |
5 | 5 |
|
6 | 6 |
from gvsig import * |
7 |
from commonsdialog import * |
|
8 |
from geom import * |
|
7 |
from gvsig.commonsdialog import *
|
|
8 |
from gvsig.geom import *
|
|
9 | 9 |
|
10 | 10 |
from java.io import File |
11 | 11 |
from java.lang import Thread |
... | ... | |
138 | 138 |
|
139 | 139 |
class Photo2shapePanel(FormPanel): |
140 | 140 |
def __init__(self): |
141 |
FormPanel.__init__(self,script.getResource("photo2shape.xml"))
|
|
141 |
FormPanel.__init__(self,getResource(__file__,"photo2shape.xml"))
|
|
142 | 142 |
self.getPanel().setPreferredSize(Dimension(500,140)) |
143 |
self.txtInputFolder.setText(script.getResource("data/test-images").getAbsolutePath())
|
|
144 |
self.txtOutputFile.setText(script.getResource("data/photos.shp").getAbsolutePath())
|
|
143 |
self.txtInputFolder.setText(getResource(__file__,"data/test-images")) #.getAbsolutePath())
|
|
144 |
self.txtOutputFile.setText(getTempFile("phots",".shp")) #getResource(__file__,"data/photos.shp")) #.getAbsolutePath())
|
|
145 | 145 |
|
146 | 146 |
def showWindow(self): |
147 | 147 |
FormPanel.showWindow(self, "Photo2shape") |
... | ... | |
150 | 150 |
f = openFolderDialog("Select input folder") |
151 | 151 |
if f == None or len(f)<1: |
152 | 152 |
return |
153 |
self.txtInputFolder.setText(f[0].getAbsolutePath()) |
|
153 |
self.txtInputFolder.setText(f[0]) #.getAbsolutePath())
|
|
154 | 154 |
|
155 | 155 |
def btnOutputFile_click(self, *args): |
156 | 156 |
f = saveFileDialog("Select output shape") |
157 | 157 |
if f == None or len(f)<1: |
158 | 158 |
return |
159 |
self.txtOutputFile.setText(f[0].getAbsolutePath()) |
|
159 |
self.txtOutputFile.setText(f[0]) #.getAbsolutePath())
|
|
160 | 160 |
|
161 | 161 |
def btnClose_click(self, *args): |
162 | 162 |
self.hide() |
org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/scripts/tools/photo2shape/imagegpsmetadata.py | ||
---|---|---|
7 | 7 |
# |
8 | 8 |
import os |
9 | 9 |
|
10 |
from uselib import use_jar |
|
10 |
from gvsig.uselib import use_jar
|
|
11 | 11 |
|
12 | 12 |
use_jar(os.path.join(os.path.dirname(__file__),"libs","metadata-extractor-2.8.1.jar")) |
13 | 13 |
use_jar(os.path.join(os.path.dirname(__file__),"libs","xmpcore-5.1.2.jar")) |
org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/scripts/tools/photo2shape/photo2shape.inf | ||
---|---|---|
1 | 1 |
[Unit] |
2 | 2 |
type = Script |
3 | 3 |
name = photo2shape |
4 |
description = |
|
5 |
createdBy = |
|
6 |
version = |
|
4 |
description =
|
|
5 |
createdBy =
|
|
6 |
version =
|
|
7 | 7 |
|
8 | 8 |
[Script] |
9 | 9 |
main = main |
10 | 10 |
Lang = python |
11 | 11 |
|
12 |
[script] |
|
13 |
enable = true |
|
14 |
isolation = 0 |
|
15 |
|
Also available in: Unified diff