Revision 6111
trunk/extensions/extGeoprocessingExtensions/build.xml | ||
---|---|---|
1 |
<!--REHACERLO PARA QUE SE COPIEN BIEN LAS LIBRERIAS--> |
|
2 |
|
|
3 |
<project name="GeoprocessingExtensions" default="generate-without-source" basedir="."> |
|
4 |
<description> |
|
5 |
Registra las extensiones de geoprocesamiento. |
|
6 |
</description> |
|
7 |
<!-- set global properties for this build --> |
|
8 |
<property name="src" location="src"/> |
|
9 |
<property name="build" location="bin"/> |
|
10 |
<property name="doc" location="doc"/> |
|
11 |
<property name="dist" location="dist"/> |
|
12 |
<property name="without_src" location="without_src"/> |
|
13 |
<property name="plugin" value="com.iver.cit.gvsig.geoprocessextensions"/> |
|
14 |
|
|
15 |
|
|
16 |
<property name="lib" value="lib"/> |
|
17 |
<property name="andami" value="../_fwAndami"/> |
|
18 |
<property name="jarName" value="${plugin}.jar"/> |
|
19 |
<property name="extensionsDir" location="${andami}/gvSIG/extensiones"/> |
|
20 |
<property name="andamiJar" location="${andami}/andami.jar"/> |
|
21 |
<property name="gvsigJar" location="${extensionsDir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar"/> |
|
22 |
<property name="geoprocessingJar" location="${extensionsDir}/com.iver.cit.gvsig.geoprocess/com.iver.cit.gvsig.geoprocess.jar"/> |
|
23 |
<property name="andamiLibs" location="${andami}/lib"/> |
|
24 |
<property name="fmapLibs" location="../libFMap/lib" /> |
|
25 |
<property name="compile-classpath" value="${andamiJar}:${gvsigJar}:${fmapLibs}/cms.jar:${fmapLibs}/driver-manager-1.1.jar:${lib}/ehcache-1.2beta4.jar:${fmapLibs}/fmap.jar:${fmapLibs}/gdbms-0.8-SNAPSHOT.jar:${andamiLibs}/iver-utiles.jar:${fmapLibs}/jts-1.7.jar:${lib}/spatialindex.jar:${geoprocessingJar}"/> |
|
26 |
|
|
27 |
|
|
28 |
<target name="init"> |
|
29 |
<!-- Create the time stamp --> |
|
30 |
<tstamp/> |
|
31 |
</target> |
|
32 |
|
|
33 |
|
|
34 |
<target name="dist" depends="init" |
|
35 |
description="generate the distribution" > |
|
36 |
<!-- Remove previous distribution directory --> |
|
37 |
<delete dir="${dist}"/> |
|
38 |
<!-- Create the distribution directory structure --> |
|
39 |
<mkdir dir="${dist}"/> |
|
40 |
<mkdir dir="${dist}/src"/> |
|
41 |
<mkdir dir="${dist}/doc"/> |
|
42 |
<mkdir dir="${dist}/bin"/> |
|
43 |
<mkdir dir="${dist}/bin/com"/> |
|
44 |
<mkdir dir="${dist}/bin/com/iver"/> |
|
45 |
<mkdir dir="${dist}/bin/com/iver/gvsig"/> |
|
46 |
<mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing"/> |
|
47 |
<mkdir dir="${dist}/bin/com/iver/gvsig/geoprocessing/images"/> |
|
48 |
<mkdir dir="${dist}/images"/> |
|
49 |
<mkdir dir="${dist}/config"/> |
|
50 |
<mkdir dir="${dist}/lib"/> |
|
51 |
<!-- Copy necessary distribution files to dist dir --> |
|
52 |
<copy todir="${dist}/src"> |
|
53 |
<fileset dir="${src}"/> |
|
54 |
</copy> |
|
55 |
<!-- |
|
56 |
<copy todir="${dist}/doc"> |
|
57 |
<fileset dir="${doc}"/> |
|
58 |
</copy> |
|
59 |
<copy todir="${dist}/images"> |
|
60 |
<fileset dir="images"/> |
|
61 |
</copy> |
|
62 |
<copy todir="${dist}/lib"> |
|
63 |
<fileset dir="lib" includes="*.*"/> |
|
64 |
</copy> |
|
65 |
--> |
|
66 |
<copy file="config/config.xml" todir="${dist}/config"/> |
|
67 |
<copy file="build.xml" todir="${dist}"/> |
|
68 |
<copy todir="${dist}"> |
|
69 |
<fileset dir="config" includes="text*.properties"/> |
|
70 |
</copy> |
|
71 |
<jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${build}"/> |
|
72 |
<copy file="config/config.xml" todir="${dist}/bin/com/iver/gvsig/geoprocessing"/> |
|
73 |
<!-- |
|
74 |
<copy todir="${dist}/bin/com/iver/gvsig/geoprocessing/images"> |
|
75 |
<fileset dir="images"/> |
|
76 |
</copy> |
|
77 |
--> |
|
78 |
<!-- Zip distribution --> |
|
79 |
<zip destfile="${dist}/gvSIGGeoProcessingPlugin.zip" |
|
80 |
basedir="${dist}" |
|
81 |
update="true" |
|
82 |
/> |
|
83 |
</target> |
|
84 |
|
|
85 |
<target name="clean-orig" depends="dist" |
|
86 |
description="clean dist directory" > |
|
87 |
<!-- Clean the distribution directory --> |
|
88 |
<delete dir="${dist}/src"/> |
|
89 |
<delete dir="${dist}/doc"/> |
|
90 |
<delete dir="${dist}/bin"/> |
|
91 |
<delete dir="${dist}/images"/> |
|
92 |
<delete dir="${dist}/config"/> |
|
93 |
<delete file="${dist}/build.xml"/> |
|
94 |
<delete> |
|
95 |
<fileset dir="${dist}" includes="**/*.properties"/> |
|
96 |
</delete> |
|
97 |
</target> |
|
98 |
|
|
99 |
<target name="generate-without-source" depends="clean-orig" description="generate the distribution without the source file" > |
|
100 |
<!-- Create the distribution directory --> |
|
101 |
<mkdir dir="${without_src}"/> |
|
102 |
|
|
103 |
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> |
|
104 |
<jar jarfile="${without_src}/${plugin}.jar" basedir="${build}"/> |
|
105 |
<copy file="config/config.xml" todir="${without_src}"/> |
|
106 |
<copy todir="${without_src}"> |
|
107 |
<fileset dir="config" includes="text*.properties"/> |
|
108 |
</copy> |
|
109 |
<!-- |
|
110 |
<copy todir="${without_src}"> |
|
111 |
<fileset dir="lib" includes="*.*"/> |
|
112 |
</copy> |
|
113 |
<copy todir="${without_src}/images"> |
|
114 |
<fileset dir="images/" includes="*"/> |
|
115 |
</copy> |
|
116 |
--> |
|
117 |
<move todir="${extensionsDir}/${plugin}/"> |
|
118 |
<fileset dir="${without_src}" includes="**/**"/> |
|
119 |
</move> |
|
120 |
</target> |
|
121 |
|
|
122 |
<target name="batch-build" |
|
123 |
description="compile the sources, create the jar file" |
|
124 |
depends="compile,create-jar,copy-data-files,copy-libs,move-to-andami"> |
|
125 |
</target> |
|
126 |
|
|
127 |
<target name="compile" description="compile the source" > |
|
128 |
<!-- Compile the Java code from ${src} to ${build} --> |
|
129 |
<mkdir dir="${build}" /> |
|
130 |
<javac srcdir="${src}" |
|
131 |
destdir="${build}" |
|
132 |
classpath="${compile-classpath}"/> |
|
133 |
</target> |
|
134 |
|
|
135 |
<target name="create-jar" |
|
136 |
description="Creates the plugin jar"> |
|
137 |
<mkdir dir="${dist}"/> |
|
138 |
<!-- <jar jarfile="${dist}/bin/com/iver/gvsig/geoprocessing/${plugin}.jar" basedir="${build}"/>--> |
|
139 |
<jar jarfile="${dist}/${jarName}" basedir="${build}"/> |
|
140 |
</target> |
|
141 |
|
|
142 |
<target name="copy-data-files"> |
|
143 |
<copy file="config/config.xml" todir="${dist}"/> |
|
144 |
<copy todir="${dist}"> |
|
145 |
<fileset dir="config" includes="text*.properties"/> |
|
146 |
</copy> |
|
147 |
<copy todir="${dist}/images"> |
|
148 |
<fileset dir="images/" includes="*"/> |
|
149 |
</copy> |
|
150 |
</target> |
|
151 |
|
|
152 |
<target name="copy-libs"> |
|
153 |
<copy todir="${dist}"> |
|
154 |
<fileset dir="lib" includes="*.*"/> |
|
155 |
</copy> |
|
156 |
</target> |
|
157 |
|
|
158 |
<target name="move-to-andami"> |
|
159 |
<move todir="${extensionsDir}/${plugin}/"> |
|
160 |
<fileset dir="${dist}" includes="**/**"/> |
|
161 |
</move> |
|
162 |
</target> |
|
163 |
|
|
164 |
<target name="clean" |
|
165 |
description="clean up" > |
|
166 |
<delete dir="${build}"/> |
|
167 |
<delete dir="${dist}"/> |
|
168 |
</target> |
|
169 |
|
|
170 |
</project> |
|
171 |
|
|
0 | 172 |
trunk/extensions/extGeoprocessingExtensions/config/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<libraries library-dir="."> |
|
4 |
</libraries> |
|
5 |
<depends plugin-name="com.iver.cit.gvsig"/> |
|
6 |
<depends plugin-name="com.iver.cit.gvsig.geoprocess"/> |
|
7 |
<resourceBundle name="text"/> |
|
8 |
<extensions> |
|
9 |
<extension class-name="com.iver.cit.gvsig.geoprocess.impl.RegisterGeoprocessExtension" |
|
10 |
description="Extensiones de geoprocesamiento" |
|
11 |
active="true"> |
|
12 |
</extension> |
|
13 |
</extensions> |
|
14 |
</plugin-config> |
|
0 | 15 |
trunk/extensions/extGeoprocessingExtensions/config/text.properties | ||
---|---|---|
1 |
#text.properties |
|
2 |
yOffset=Desplazamiento en Y |
|
3 |
xOffset=Desplazamiento en X |
|
4 |
XYShift._Introduccion_de_datos=Traslaci?n. Introducci?n de datos |
|
5 |
Error_offset_no_numerico=Error. Se han introducido valores de desplazamiento no v?lidos |
|
6 |
XYShift._Progress_Message=Aplicando desplazamiento... |
|
7 |
Introducir_valores_desplazamiento=Valores de desplazamiento. |
|
0 | 8 |
trunk/extensions/extGeoprocessingExtensions/config/text_en.properties | ||
---|---|---|
1 |
#text_en.properties |
|
2 |
yOffset=Y Offset |
|
3 |
xOffset=X Offset |
|
4 |
XYShift._Introduccion_de_datos=XY Shift. Data input |
|
5 |
Error_offset_no_numerico=Error. Invalid offset values. |
|
6 |
XYShift._Progress_Message=Applying xy offset. |
|
7 |
Introducir_valores_desplazamiento=Offset values |
|
0 | 8 |
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/fmap/XYShiftGeoprocess.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-28 18:17:21 azabala |
|
48 |
* Revision 1.2 2006-06-29 17:58:31 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/28 18:17:21 azabala |
|
49 | 52 |
* first version in cvs |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
55 | 58 |
import java.util.Map; |
56 | 59 |
|
57 | 60 |
import com.hardcode.gdbms.engine.data.driver.DriverException; |
61 |
import com.iver.andami.PluginServices; |
|
58 | 62 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
59 | 63 |
import com.iver.cit.gvsig.fmap.drivers.ILayerDefinition; |
60 |
import com.iver.cit.gvsig.fmap.edition.ISchemaManager; |
|
61 |
import com.iver.cit.gvsig.fmap.edition.IWriter; |
|
62 | 64 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
63 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
64 | 65 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
65 | 66 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
66 | 67 |
import com.iver.cit.gvsig.fmap.operations.strategies.StrategyManager; |
... | ... | |
68 | 69 |
import com.iver.cit.gvsig.geoprocess.core.fmap.DefinitionUtils; |
69 | 70 |
import com.iver.cit.gvsig.geoprocess.core.fmap.FeaturePersisterProcessor2; |
70 | 71 |
import com.iver.cit.gvsig.geoprocess.core.fmap.GeoprocessException; |
71 |
import com.iver.cit.gvsig.geoprocess.core.fmap.IOneLayerGeoprocess; |
|
72 |
import com.iver.cit.gvsig.geoprocess.impl.clip.fmap.ClipGeoprocess; |
|
72 |
import com.iver.cit.gvsig.geoprocess.core.util.UnitUtils; |
|
73 | 73 |
import com.iver.utiles.swing.threads.AbstractMonitorableTask; |
74 |
import com.iver.utiles.swing.threads.CancellableMonitorable; |
|
75 | 74 |
import com.iver.utiles.swing.threads.DefaultCancellableMonitorable; |
76 | 75 |
import com.iver.utiles.swing.threads.IMonitorableTask; |
77 | 76 |
/** |
... | ... | |
127 | 126 |
Double xShift = (Double) |
128 | 127 |
params.get("xshift"); |
129 | 128 |
if(xShift != null) |
130 |
this.offsetX = xShift.doubleValue(); |
|
129 |
this.offsetX = UnitUtils. |
|
130 |
getInInternalUnits(xShift.doubleValue()); |
|
131 | 131 |
Double yShift = (Double) |
132 | 132 |
params.get("yshift"); |
133 | 133 |
if(yShift != null) |
134 |
this.offsetY = yShift.doubleValue(); |
|
135 |
|
|
136 |
|
|
134 |
this.offsetY = UnitUtils. |
|
135 |
getInInternalUnits(yShift.doubleValue()); |
|
137 | 136 |
} |
138 | 137 |
|
139 | 138 |
public void checkPreconditions() throws GeoprocessException { |
... | ... | |
185 | 184 |
e.printStackTrace(); |
186 | 185 |
} |
187 | 186 |
setDeterminatedProcess(true); |
188 |
setStatusMessage("APLICANDO OFFSET X-Y");
|
|
187 |
setStatusMessage(PluginServices.getText(this, "XYShift._Progress_Message"));
|
|
189 | 188 |
|
190 | 189 |
} |
191 | 190 |
|
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/fmap/XYShifterFeatureVisitor.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-28 18:17:21 azabala |
|
48 |
* Revision 1.2 2006-06-29 17:58:31 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/28 18:17:21 azabala |
|
49 | 52 |
* first version in cvs |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
61 | 64 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
62 | 65 |
import com.iver.cit.gvsig.fmap.drivers.FieldDescription; |
63 | 66 |
import com.iver.cit.gvsig.fmap.drivers.ILayerDefinition; |
67 |
import com.iver.cit.gvsig.fmap.edition.EditionException; |
|
64 | 68 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
65 | 69 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
66 | 70 |
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource; |
... | ... | |
190 | 194 |
if (layer instanceof AlphanumericData && layer instanceof VectorialData) { |
191 | 195 |
try { |
192 | 196 |
this.recordset = ((AlphanumericData) layer).getRecordset(); |
197 |
this.featureProcessor.start(); |
|
193 | 198 |
} catch (DriverException e) { |
194 | 199 |
return false;// must we throw an Exception?? |
200 |
} catch (EditionException e) { |
|
201 |
return false; |
|
195 | 202 |
} |
196 | 203 |
return true; |
197 | 204 |
} |
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/gui/GeoprocessingXYShiftPanel.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-28 18:17:21 azabala |
|
48 |
* Revision 1.2 2006-06-29 17:58:31 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/28 18:17:21 azabala |
|
49 | 52 |
* first version in cvs |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
90 | 93 |
private JTextField xoffsetTextField = null; |
91 | 94 |
private JLabel jLabel3 = null; |
92 | 95 |
private JTextField yoffsetTextField = null; |
96 |
private JLabel offsetLabel = null; |
|
93 | 97 |
|
94 | 98 |
/** |
95 | 99 |
* This method initializes |
... | ... | |
135 | 139 |
* |
136 | 140 |
*/ |
137 | 141 |
private void initialize() { |
142 |
offsetLabel = new JLabel(); |
|
143 |
offsetLabel.setBounds(new java.awt.Rectangle(29,147,211,23)); |
|
144 |
offsetLabel.setText(PluginServices.getText(this,"Introducir_valores_desplazamiento")); |
|
138 | 145 |
jLabel3 = new JLabel(); |
139 |
jLabel3.setBounds(new java.awt.Rectangle(27,186,152,27));
|
|
146 |
jLabel3.setBounds(new java.awt.Rectangle(27,215,152,27));
|
|
140 | 147 |
jLabel3.setText(PluginServices.getText(this,"yOffset")+":"); |
141 | 148 |
xoffsetLabel = new JLabel(); |
142 |
xoffsetLabel.setBounds(new java.awt.Rectangle(26,153,154,26));
|
|
149 |
xoffsetLabel.setBounds(new java.awt.Rectangle(26,182,154,26));
|
|
143 | 150 |
xoffsetLabel.setText(PluginServices.getText(this,"xOffset")+":"); |
144 | 151 |
jLabel1 = new JLabel(); |
145 |
jLabel1.setBounds(new java.awt.Rectangle(27,52,384,23));
|
|
152 |
jLabel1.setBounds(new java.awt.Rectangle(27,60,384,23));
|
|
146 | 153 |
jLabel1.setText(PluginServices.getText(this, "Cobertura_de_entrada") + ":"); |
147 | 154 |
jLabel = new JLabel(); |
148 | 155 |
jLabel.setBounds(new java.awt.Rectangle(27,17,384,27)); |
149 | 156 |
jLabel.setText(PluginServices.getText(this, "XYShift._Introduccion_de_datos") + ":"); |
150 | 157 |
this.setLayout(null); |
151 |
this.setSize(new java.awt.Dimension(598,318));
|
|
158 |
this.setBounds(new java.awt.Rectangle(0,0,500,400));
|
|
152 | 159 |
this.add(jLabel, null); |
153 | 160 |
this.add(jLabel1, null); |
154 | 161 |
this.add(getSelectedOnlyCheckBox(), null); |
... | ... | |
157 | 164 |
this.add(getXoffsetTextField(), null); |
158 | 165 |
this.add(jLabel3, null); |
159 | 166 |
this.add(getYoffsetjTextField1(), null); |
167 |
this.add(offsetLabel, null); |
|
160 | 168 |
this.add(getLayersComboBox(), null); |
161 | 169 |
} |
162 | 170 |
|
... | ... | |
168 | 176 |
private JCheckBox getSelectedOnlyCheckBox() { |
169 | 177 |
if (selectedOnlyCheckBox == null) { |
170 | 178 |
selectedOnlyCheckBox = new JCheckBox(); |
171 |
selectedOnlyCheckBox.setBounds(new java.awt.Rectangle(26,120,383,23));
|
|
179 |
selectedOnlyCheckBox.setBounds(new java.awt.Rectangle(27,94,383,23));
|
|
172 | 180 |
selectedOnlyCheckBox.setText(PluginServices.getText(this, "Usar_solamente_los_elementos_seleccionados")); |
173 | 181 |
} |
174 | 182 |
return selectedOnlyCheckBox; |
... | ... | |
223 | 231 |
jLabel2.setText(PluginServices.getText(this, "Cobertura_de_salida") + ":"); |
224 | 232 |
jPanel = new JPanel(); |
225 | 233 |
jPanel.setLayout(null); |
226 |
jPanel.setBounds(new java.awt.Rectangle(26,229,494,46));
|
|
234 |
jPanel.setBounds(new java.awt.Rectangle(26,259,443,46));
|
|
227 | 235 |
jPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED)); |
228 | 236 |
jPanel.add(getOpenResultButton(), null); |
229 | 237 |
jPanel.add(getFileNameResultTextField(), null); |
... | ... | |
272 | 280 |
private JTextField getXoffsetTextField() { |
273 | 281 |
if (xoffsetTextField == null) { |
274 | 282 |
xoffsetTextField = new JTextField(); |
275 |
xoffsetTextField.setBounds(new java.awt.Rectangle(193,153,216,25));
|
|
283 |
xoffsetTextField.setBounds(new java.awt.Rectangle(193,182,216,25));
|
|
276 | 284 |
} |
277 | 285 |
return xoffsetTextField; |
278 | 286 |
} |
... | ... | |
285 | 293 |
private JTextField getYoffsetjTextField1() { |
286 | 294 |
if (yoffsetTextField == null) { |
287 | 295 |
yoffsetTextField = new JTextField(); |
288 |
yoffsetTextField.setBounds(new java.awt.Rectangle(193,187,216,25));
|
|
296 |
yoffsetTextField.setBounds(new java.awt.Rectangle(193,216,216,25));
|
|
289 | 297 |
} |
290 | 298 |
return yoffsetTextField; |
291 | 299 |
} |
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/XYShiftGeoprocessPlugin.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-28 18:17:21 azabala |
|
48 |
* Revision 1.2 2006-06-29 17:58:31 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/28 18:17:21 azabala |
|
49 | 52 |
* first version in cvs |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
60 | 63 |
import com.iver.cit.gvsig.geoprocess.core.IGeoprocessPlugin; |
61 | 64 |
import com.iver.cit.gvsig.geoprocess.core.gui.GeoProcessingOverlayPanel; |
62 | 65 |
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel; |
66 |
import com.iver.cit.gvsig.geoprocess.impl.buffer.BufferGeoprocessPlugin; |
|
63 | 67 |
import com.iver.cit.gvsig.geoprocess.impl.xyshift.gui.GeoprocessingXYShiftPanel; |
64 | 68 |
import com.iver.cit.gvsig.gui.View; |
65 | 69 |
|
... | ... | |
77 | 81 |
} |
78 | 82 |
|
79 | 83 |
public URL getHtmlDescription() { |
80 |
// TODO Auto-generated method stub |
|
81 |
return null; |
|
84 |
URL url = XYShiftGeoprocessPlugin.class. |
|
85 |
getResource("resources/description.html"); |
|
86 |
return url; |
|
82 | 87 |
} |
83 | 88 |
|
84 | 89 |
public URL getImgDescription() { |
85 |
// TODO Auto-generated method stub |
|
86 |
return null; |
|
90 |
URL url = XYShiftGeoprocessPlugin.class. |
|
91 |
getResource("resources/xyshiftdesc.png"); |
|
92 |
return url; |
|
87 | 93 |
} |
88 | 94 |
|
89 | 95 |
public IGeoprocessController getGpController() { |
... | ... | |
91 | 97 |
} |
92 | 98 |
|
93 | 99 |
public String getNamespace() { |
94 |
// TODO Auto-generated method stub |
|
95 |
return null; |
|
100 |
return "Conversion de datos/XYShift"; |
|
96 | 101 |
} |
102 |
|
|
103 |
public String toString(){ |
|
104 |
return "XYShift"; |
|
105 |
} |
|
97 | 106 |
|
98 | 107 |
} |
99 | 108 |
|
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/resources/description.html | ||
---|---|---|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
|
2 |
<HTML> |
|
3 |
<HEAD> |
|
4 |
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> |
|
5 |
<TITLE></TITLE> |
|
6 |
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.1 (Win32)"> |
|
7 |
<META NAME="CREATED" CONTENT="20060629;17004817"> |
|
8 |
<META NAME="CHANGED" CONTENT="16010101;0"> |
|
9 |
<STYLE> |
|
10 |
<!-- |
|
11 |
@page { size: 21cm 29.7cm; margin: 2cm } |
|
12 |
P { margin-bottom: 0.21cm } |
|
13 |
--> |
|
14 |
</STYLE> |
|
15 |
</HEAD> |
|
16 |
<BODY LANG="es-ES" DIR="LTR"> |
|
17 |
<P><FONT COLOR="#800000"><B>XYSHIFT</B></FONT></P> |
|
18 |
<P><BR><BR> |
|
19 |
</P> |
|
20 |
<P>Este geoproceso permite aplicar una transformación de |
|
21 |
traslación sobre todos los puntos de las geometrías de |
|
22 |
la capa de entrada. Para tal fin, el usuario deberá |
|
23 |
especificar el desplazamiento en X y en Y a aplicar.</P> |
|
24 |
<P><IMG SRC="xyshiftdesc.png" NAME="Imagen1" ALIGN=LEFT WIDTH=400 HEIGHT=315 BORDER=0><BR CLEAR=LEFT><BR><BR> |
|
25 |
</P> |
|
26 |
<P>Este geoproceso puede ser de gran utilidad para hacer concordar |
|
27 |
cartografías procedentes de fuentes distintas, en lo que se |
|
28 |
viene a denominar por el término inglés “conflation”.</P> |
|
29 |
<P><BR><BR> |
|
30 |
</P> |
|
31 |
</BODY> |
|
32 |
</HTML> |
|
0 | 33 |
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/XYShiftGeoprocessController.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-28 18:17:21 azabala |
|
48 |
* Revision 1.2 2006-06-29 17:58:31 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/28 18:17:21 azabala |
|
49 | 52 |
* first version in cvs |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
61 | 64 |
import com.iver.cit.gvsig.fmap.edition.ShpSchemaManager; |
62 | 65 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
63 | 66 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
64 |
import com.iver.cit.gvsig.geoprocess.core.IGeoprocessController; |
|
65 | 67 |
import com.iver.cit.gvsig.geoprocess.core.fmap.AbstractGeoprocessController; |
66 | 68 |
import com.iver.cit.gvsig.geoprocess.core.fmap.GeoprocessException; |
67 | 69 |
import com.iver.cit.gvsig.geoprocess.core.fmap.IGeoprocess; |
68 | 70 |
import com.iver.cit.gvsig.geoprocess.core.gui.AddResultLayerTask; |
69 | 71 |
import com.iver.cit.gvsig.geoprocess.core.gui.IGeoprocessPanel; |
70 |
import com.iver.cit.gvsig.geoprocess.impl.convexhull.fmap.ConvexHullGeoprocess; |
|
71 | 72 |
import com.iver.cit.gvsig.geoprocess.impl.xyshift.fmap.XYShiftGeoprocess; |
72 | 73 |
import com.iver.cit.gvsig.geoprocess.impl.xyshift.gui.GeoprocessingXYShiftPanel; |
73 | 74 |
import com.iver.utiles.swing.threads.IMonitorableTask; |
... | ... | |
106 | 107 |
SHPLayerDefinition definition = |
107 | 108 |
(SHPLayerDefinition) xyShift.createLayerDefinition(); |
108 | 109 |
definition.setFile(outputFile); |
109 |
ShpSchemaManager schemaManager = new ShpSchemaManager(); |
|
110 |
ShpSchemaManager schemaManager = new ShpSchemaManager(outputFile.getAbsolutePath());
|
|
110 | 111 |
IWriter writer = null; |
111 | 112 |
try { |
112 | 113 |
writer = getShpWriter(definition); |
... | ... | |
119 | 120 |
xyShift.setResultLayerProperties(writer, schemaManager); |
120 | 121 |
HashMap params = new HashMap(); |
121 | 122 |
boolean onlySelected = panel.isOnlySelected(); |
122 |
params.put("layer_selection", new Boolean(onlySelected));
|
|
123 |
params.put("firstlayerselection", new Boolean(onlySelected));
|
|
123 | 124 |
try { |
125 |
double xShift = panel.getXOffset(); |
|
126 |
params.put("xshift", new Double(xShift)); |
|
127 |
double yShift = panel.getYOffset(); |
|
128 |
params.put("yshift", new Double(yShift)); |
|
129 |
} catch (GeoprocessException e1) { |
|
130 |
String error = PluginServices.getText(this, "Error_escritura_resultados"); |
|
131 |
String errorDescription = PluginServices.getText(this, "Error_preparar_escritura_resultados"); |
|
132 |
panel.error(errorDescription, error); |
|
133 |
return false; |
|
134 |
} |
|
135 |
|
|
136 |
try { |
|
124 | 137 |
xyShift.setParameters(params); |
125 | 138 |
xyShift.checkPreconditions(); |
126 | 139 |
IMonitorableTask task1 = xyShift.createTask(); |
trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/RegisterGeoprocessExtension.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-06-28 18:17:21 azabala |
|
48 |
* Revision 1.2 2006-06-29 17:58:31 azabala |
|
49 |
* *** empty log message *** |
|
50 |
* |
|
51 |
* Revision 1.1 2006/06/28 18:17:21 azabala |
|
49 | 52 |
* first version in cvs |
50 | 53 |
* |
51 | 54 |
* |
... | ... | |
53 | 56 |
package com.iver.cit.gvsig.geoprocess.impl; |
54 | 57 |
|
55 | 58 |
import com.iver.andami.plugins.Extension; |
59 |
import com.iver.cit.gvsig.geoprocess.impl.xyshift.XYShiftGeoprocessPlugin; |
|
60 |
import com.iver.utiles.extensionPoints.ExtensionPoints; |
|
61 |
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
|
56 | 62 |
|
57 | 63 |
public class RegisterGeoprocessExtension extends Extension{ |
58 | 64 |
|
59 | 65 |
public void initialize() { |
60 |
// TODO Auto-generated method stub |
|
61 |
|
|
66 |
ExtensionPoints extensionPoints = |
|
67 |
ExtensionPointsSingleton.getInstance(); |
|
68 |
extensionPoints.add("GeoprocessManager", |
|
69 |
"XYSHIFT", |
|
70 |
XYShiftGeoprocessPlugin.class); |
|
62 | 71 |
} |
63 | 72 |
|
64 | 73 |
public void execute(String actionCommand) { |
65 |
// TODO Auto-generated method stub |
|
66 |
|
|
67 | 74 |
} |
68 | 75 |
|
69 | 76 |
public boolean isEnabled() { |
70 |
// TODO Auto-generated method stub |
|
71 |
return false; |
|
77 |
return true; |
|
72 | 78 |
} |
73 | 79 |
|
74 | 80 |
public boolean isVisible() { |
75 |
// TODO Auto-generated method stub |
|
76 |
return false; |
|
81 |
return true; |
|
77 | 82 |
} |
78 | 83 |
|
79 | 84 |
} |
Also available in: Unified diff