Revision 63
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
# Translations to this plugin |
|
2 |
_Fortune_cookies=Vectorediting |
|
3 |
# Translations from librerias of this plugin_ |
|
4 |
Close=Close |
|
5 |
_Fortune_cookie_message=Vectorediting message |
|
6 |
_Cant_get_fortune_cookie_message=Can't get fortume cookie message |
|
7 |
_Fortune_cookie=Vectorediting |
|
1 |
selection=Selection |
|
2 |
first_point_of_symmetry_axis=First point of the symmetry axis |
|
3 |
second_point_of_symmetry_axis=Second point of the symmetry axis |
|
4 |
delete_original_geometries_question=Delete original geometries? |
|
5 |
short_yes=Y |
|
6 |
short_no=N |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
# Traducciones de este plugin |
|
2 |
_Fortune_cookies=Galletas de la fortuna |
|
3 |
_Show_fortune_cookie_messaje=Mostrar un mensaje de Galleta de la Fortuna |
|
4 |
# Traducciones de librerias que aporta este plugin |
|
5 |
# Las traducciones especificadas en el plugin tienen prioridad sobre |
|
6 |
# las que incluye la propia libreria. |
|
7 |
_Close=Cerrar |
|
8 |
_Fortune_cookie_message=Mensage de la galleta de la fortuna |
|
9 |
_Cant_get_fortune_cookie_message=No puedo obtener el mensaje de la galleta de la fortuna |
|
10 |
_Fortune_cookie=Galleta de la fortuna |
|
1 |
selection=Selecci\u00f3n |
|
2 |
first_point_of_symmetry_axis=Primer punto del eje de simetr\u00eda |
|
3 |
second_point_of_symmetry_axis=Segundo punto del eje de simetr\u00eda |
|
4 |
delete_original_geometries_question=\u00bfDesea borrar las geometr\u00edas originales? |
|
5 |
short_yes=S |
|
6 |
short_no=N |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
105 | 105 |
|
106 | 106 |
</extension> |
107 | 107 |
|
108 |
<extension |
|
109 |
class-name="org.gvsig.vectorediting.app.mainplugin.extensions.SymmetryExtension" |
|
110 |
description="" active="true" priority="1"> |
|
108 | 111 |
|
112 |
<action |
|
113 |
name="symmetry" |
|
114 |
label="_Symmetry" |
|
115 |
tooltip="symmetry" |
|
116 |
position="601002200" |
|
117 |
action-command="symmetry" |
|
118 |
icon="layer-modify-symmetry" |
|
119 |
accelerator="" |
|
120 |
/> |
|
121 |
|
|
122 |
<menu text="Layer/Insert/symmetry" name="symmetry" /> |
|
123 |
|
|
124 |
<tool-bar name="vector_editing" position="601002200"> |
|
125 |
<selectable-tool name="symmetry" /> |
|
126 |
</tool-bar> |
|
127 |
|
|
128 |
</extension> |
|
129 |
|
|
130 |
|
|
109 | 131 |
</extensions> |
110 | 132 |
|
111 | 133 |
</plugin-config> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
62 | 62 |
<include>org.gvsig:org.gvsig.vectorediting.lib.prov.insertpoint</include> |
63 | 63 |
<include>org.gvsig:org.gvsig.vectorediting.lib.prov.circlecr</include> |
64 | 64 |
<include>org.gvsig:org.gvsig.vectorediting.lib.prov.polyline</include> |
65 |
<include>org.gvsig:org.gvsig.vectorediting.lib.prov.symmetry</include> |
|
66 |
|
|
65 | 67 |
</includes> |
66 | 68 |
</dependencySet> |
67 | 69 |
</dependencySets> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/src/main/java/org/gvsig/vectorediting/app/mainplugin/extensions/SymmetryExtension.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.app.mainplugin |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.app.mainplugin.extensions; |
|
8 |
|
|
9 |
import org.gvsig.andami.IconThemeHelper; |
|
10 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
|
11 |
import org.gvsig.fmap.dal.exception.ReadException; |
|
12 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
13 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
14 |
import org.gvsig.tools.service.ServiceException; |
|
15 |
import org.gvsig.vectorediting.app.mainplugin.BaseEditingServiceExtension; |
|
16 |
import org.gvsig.vectorediting.lib.api.EditingServiceInfo; |
|
17 |
import org.gvsig.vectorediting.lib.prov.circlecr.CircleCREditingProviderFactory; |
|
18 |
import org.gvsig.vectorediting.lib.prov.symmetry.SymmetryEditingProviderFactory; |
|
19 |
|
|
20 |
public class SymmetryExtension extends BaseEditingServiceExtension { |
|
21 |
|
|
22 |
public void initialize() { |
|
23 |
// TODO Auto-generated method stub |
|
24 |
|
|
25 |
} |
|
26 |
|
|
27 |
public void execute(String arg0) { |
|
28 |
|
|
29 |
DefaultViewPanel view = getActiveView(); |
|
30 |
swingManager.activateTool(SymmetryEditingProviderFactory.PROVIDER_NAME, view.getMapControl()); |
|
31 |
|
|
32 |
registerIcons(); |
|
33 |
} |
|
34 |
|
|
35 |
private void registerIcons() { |
|
36 |
IconThemeHelper.registerIcon("action", "symmetry", this); |
|
37 |
} |
|
38 |
|
|
39 |
public boolean isEnabled() { |
|
40 |
EditingServiceInfo SymmetryInfo; |
|
41 |
try { |
|
42 |
SymmetryInfo = manager.getServiceInfo(SymmetryEditingProviderFactory.PROVIDER_NAME); |
|
43 |
DefaultViewPanel view = getActiveView(); |
|
44 |
FLyrVect layer = getActiveLayer(view); |
|
45 |
|
|
46 |
int[] supportedTypes = SymmetryInfo.getSupportedPrimitiveGeometryTypes(); |
|
47 |
GeometryType[] supportedGeoTypes = loadGeometryTypes(supportedTypes); |
|
48 |
|
|
49 |
if (isApplicable(supportedGeoTypes, layer.getShapeType())) { |
|
50 |
return true; |
|
51 |
} |
|
52 |
|
|
53 |
return false; |
|
54 |
|
|
55 |
} |
|
56 |
catch (ServiceException e1) { |
|
57 |
// TODO Auto-generated catch block |
|
58 |
e1.printStackTrace(); |
|
59 |
} |
|
60 |
catch (ReadException e) { |
|
61 |
// TODO Auto-generated catch block |
|
62 |
e.printStackTrace(); |
|
63 |
} |
|
64 |
return false; |
|
65 |
} |
|
66 |
|
|
67 |
public boolean isVisible() { |
|
68 |
DefaultViewPanel view = getActiveView(); |
|
69 |
if (view != null) { |
|
70 |
FLyrVect layer = getActiveLayer(view); |
|
71 |
if (layer != null && layer.isEditing()) { |
|
72 |
return true; |
|
73 |
} |
|
74 |
} |
|
75 |
return false; |
|
76 |
} |
|
77 |
|
|
78 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.app/org.gvsig.vectorediting.app.mainplugin/pom.xml | ||
---|---|---|
65 | 65 |
<dependency> |
66 | 66 |
<groupId>org.gvsig</groupId> |
67 | 67 |
<artifactId> |
68 |
org.gvsig.vectorediting.lib.prov.symmetry |
|
69 |
</artifactId> |
|
70 |
</dependency> |
|
71 |
<dependency> |
|
72 |
<groupId>org.gvsig</groupId> |
|
73 |
<artifactId> |
|
68 | 74 |
org.gvsig.vectorediting.lib.prov.polyline |
69 | 75 |
</artifactId> |
70 | 76 |
</dependency> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/pom.xml | ||
---|---|---|
132 | 132 |
</artifactId> |
133 | 133 |
<version>1.0.0-SNAPSHOT</version> |
134 | 134 |
</dependency> |
135 |
|
|
136 |
<dependency> |
|
137 |
<groupId>org.gvsig</groupId> |
|
138 |
<artifactId> |
|
139 |
org.gvsig.vectorediting.lib.prov.symmetry |
|
140 |
</artifactId> |
|
141 |
<version>1.0.0-SNAPSHOT</version> |
|
142 |
</dependency> |
|
135 | 143 |
</dependencies> |
136 | 144 |
</dependencyManagement> |
137 | 145 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/src/main/java/org/gvsig/vectorediting/main/Main.java | ||
---|---|---|
75 | 75 |
import org.gvsig.vectorediting.lib.prov.circlecr.CircleCREditingProviderFactory; |
76 | 76 |
import org.gvsig.vectorediting.lib.prov.insertpoint.InsertPointEditingProviderFactory; |
77 | 77 |
import org.gvsig.vectorediting.lib.prov.polyline.PolylineEditingProviderFactory; |
78 |
import org.gvsig.vectorediting.lib.prov.symmetry.SymmetryEditingProviderFactory; |
|
78 | 79 |
import org.gvsig.vectorediting.lib.spi.EditingProviderLocator; |
79 | 80 |
import org.gvsig.vectorediting.lib.spi.EditingProviderManager; |
80 | 81 |
import org.gvsig.vectorediting.swing.api.EditingBehavior; |
... | ... | |
86 | 87 |
|
87 | 88 |
/** |
88 | 89 |
* Main executable class for testing the VectorEditing library. |
89 |
*
|
|
90 |
* |
|
90 | 91 |
* @author gvSIG Team |
91 | 92 |
* @version $Id$ |
92 | 93 |
*/ |
... | ... | |
150 | 151 |
AbstractAction addLayer; |
151 | 152 |
|
152 | 153 |
AbstractAction circleCr; |
153 |
|
|
154 |
|
|
154 | 155 |
AbstractAction polyline; |
155 | 156 |
|
157 |
AbstractAction symmetry; |
|
158 |
|
|
156 | 159 |
public static void main(String args[]) { |
157 | 160 |
new DefaultLibrariesInitializer().fullInitialize(); |
158 | 161 |
Main main = new Main(); |
... | ... | |
248 | 251 |
JButton insertPointButton = new JButton(insertPoint); |
249 | 252 |
JButton circleCrButton = new JButton(circleCr); |
250 | 253 |
JButton polylineButton = new JButton(polyline); |
254 |
JButton symmetryButton = new JButton(symmetry); |
|
251 | 255 |
|
252 | 256 |
paletteTools.add(new JLabel("Insert tools")); |
253 | 257 |
paletteTools.add(insertPointButton); |
254 | 258 |
paletteTools.add(circleCrButton); |
255 | 259 |
paletteTools.add(polylineButton); |
260 |
paletteTools.add(symmetryButton); |
|
256 | 261 |
} |
257 | 262 |
|
258 | 263 |
private void createToolBar() { |
... | ... | |
290 | 295 |
menuTool.add(new JMenuItem(insertPoint)); |
291 | 296 |
menuTool.add(new JMenuItem(circleCr)); |
292 | 297 |
menuTool.add(new JMenuItem(polyline)); |
298 |
menuTool.add(new JMenuItem(symmetry)); |
|
293 | 299 |
|
294 | 300 |
menuBar.add(menuFile); |
295 | 301 |
menuBar.add(menuTool); |
... | ... | |
389 | 395 |
insertPoint = new AbstractAction("InsertPointAction") { |
390 | 396 |
|
391 | 397 |
public void actionPerformed(ActionEvent e) { |
392 |
|
|
398 |
|
|
393 | 399 |
swingManager.activateTool( |
394 | 400 |
InsertPointEditingProviderFactory.PROVIDER_NAME, mapControl); |
395 | 401 |
} |
... | ... | |
403 | 409 |
mapControl); |
404 | 410 |
} |
405 | 411 |
}; |
412 |
|
|
406 | 413 |
|
407 | 414 |
polyline = new AbstractAction("PolylineAction") { |
408 | 415 |
|
... | ... | |
411 | 418 |
mapControl); |
412 | 419 |
} |
413 | 420 |
}; |
421 |
|
|
422 |
|
|
423 |
symmetry = new AbstractAction("SymmetryAction") { |
|
424 |
|
|
425 |
public void actionPerformed(ActionEvent e) { |
|
426 |
swingManager.activateTool(SymmetryEditingProviderFactory.PROVIDER_NAME, |
|
427 |
mapControl); |
|
428 |
} |
|
429 |
}; |
|
430 |
|
|
414 | 431 |
} |
415 | 432 |
|
416 | 433 |
public void addLayer(String shpPath) throws InitializeException, |
417 | 434 |
ProviderNotRegisteredException, ValidateDataParametersException, |
418 | 435 |
LoadLayerException { |
419 |
// shpPath = "/home/lmarques/data/cartography/Andalucia/hidro_andalucia.shp"; |
|
420 | 436 |
DataStoreParameters params; |
421 | 437 |
params = dataManager.createStoreParameters("Shape"); |
438 |
if (shpPath.isEmpty()){ |
|
439 |
shpPath = "/home/paco/data/cartography/Andalucia/muni_andalucia.shp"; |
|
440 |
} |
|
422 | 441 |
|
423 | 442 |
String dbfPath = shpPath.substring(0, shpPath.length() - 3).concat("dbf"); |
424 | 443 |
String shxPath = shpPath.substring(0, shpPath.length() - 3).concat("shx"); |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.main/pom.xml | ||
---|---|---|
149 | 149 |
<artifactId>org.gvsig.andami</artifactId> |
150 | 150 |
<scope>runtime</scope> |
151 | 151 |
</dependency> |
152 |
<dependency> |
|
153 |
<groupId>org.gvsig</groupId> |
|
154 |
<artifactId> |
|
155 |
org.gvsig.vectorediting.lib.prov.symmetry |
|
156 |
</artifactId> |
|
157 |
</dependency> |
|
152 | 158 |
</dependencies> |
153 | 159 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.symmetry/src/main/java/org/gvsig/vectorediting/lib/prov/symmetry/SymmetryEditingProvider.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.prov.symmetry |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.prov.symmetry; |
|
8 |
|
|
9 |
import java.awt.geom.AffineTransform; |
|
10 |
import java.util.ArrayList; |
|
11 |
import java.util.HashMap; |
|
12 |
import java.util.Iterator; |
|
13 |
import java.util.List; |
|
14 |
import java.util.Map; |
|
15 |
|
|
16 |
import org.gvsig.fmap.dal.exception.DataException; |
|
17 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
18 |
import org.gvsig.fmap.dal.feature.Feature; |
|
19 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
22 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
23 |
import org.gvsig.fmap.geom.Geometry; |
|
24 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
25 |
import org.gvsig.fmap.geom.GeometryManager; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
27 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
|
28 |
import org.gvsig.fmap.geom.primitive.Line; |
|
29 |
import org.gvsig.fmap.geom.primitive.Point; |
|
30 |
import org.gvsig.tools.ToolsLocator; |
|
31 |
import org.gvsig.tools.dispose.DisposableIterator; |
|
32 |
import org.gvsig.tools.dynobject.DynObject; |
|
33 |
import org.gvsig.tools.i18n.I18nManager; |
|
34 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
35 |
import org.gvsig.vectorediting.lib.api.DrawingStatus; |
|
36 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
|
37 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter.TYPE; |
|
38 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
|
39 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
|
40 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
|
41 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
42 |
import org.gvsig.vectorediting.lib.spi.AbstractEditingProvider; |
|
43 |
import org.gvsig.vectorediting.lib.spi.DefaultDrawingStatus; |
|
44 |
import org.gvsig.vectorediting.lib.spi.DefaultEditingServiceParameter; |
|
45 |
import org.gvsig.vectorediting.lib.spi.EditingProvider; |
|
46 |
import org.gvsig.vectorediting.lib.spi.EditingProviderFactory; |
|
47 |
import org.gvsig.vectorediting.lib.spi.EditingProviderServices; |
|
48 |
|
|
49 |
public class SymmetryEditingProvider extends AbstractEditingProvider implements EditingProvider { |
|
50 |
|
|
51 |
protected GeometryManager geomManager = GeometryLocator |
|
52 |
.getGeometryManager(); |
|
53 |
|
|
54 |
private I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
55 |
|
|
56 |
private EditingServiceParameter selectionParameter = new DefaultEditingServiceParameter( |
|
57 |
"Selection", i18nManager.getTranslation("selection"), |
|
58 |
TYPE.SELECTION); |
|
59 |
|
|
60 |
private EditingServiceParameter firstPointParameter = new DefaultEditingServiceParameter( |
|
61 |
"First point", |
|
62 |
i18nManager.getTranslation("first_point_of_symmetry_axis"), |
|
63 |
TYPE.POSITION); |
|
64 |
|
|
65 |
private EditingServiceParameter secondPointParameter = new DefaultEditingServiceParameter( |
|
66 |
"Second point", |
|
67 |
i18nManager.getTranslation("second_point_of_symmetry_axis"), |
|
68 |
TYPE.POSITION); |
|
69 |
|
|
70 |
private EditingServiceParameter deleteOriginalGeometriesParameter = new DefaultEditingServiceParameter( |
|
71 |
"Delete original geometries", i18nManager |
|
72 |
.getTranslation("delete_original_geometries_question") |
|
73 |
.concat(" (") |
|
74 |
.concat(i18nManager.getTranslation("short_yes")) |
|
75 |
.concat("/").concat(i18nManager.getTranslation("short_no")) |
|
76 |
.concat(") "), TYPE.OPTION); |
|
77 |
|
|
78 |
private boolean deleteOriginalGeometries = false; |
|
79 |
|
|
80 |
private Map<EditingServiceParameter, Object> values; |
|
81 |
|
|
82 |
private FeatureStore featureStore; |
|
83 |
|
|
84 |
public SymmetryEditingProvider(ProviderServices providerServices, |
|
85 |
DynObject parameters) { |
|
86 |
super(providerServices); |
|
87 |
this.featureStore = (FeatureStore) parameters |
|
88 |
.getDynValue(EditingProviderFactory.FEATURE_STORE_FIELD); |
|
89 |
} |
|
90 |
|
|
91 |
public DrawingStatus draw(Point mousePosition) throws DrawServiceException { |
|
92 |
DefaultDrawingStatus geometries = new DefaultDrawingStatus(); |
|
93 |
|
|
94 |
FeatureSelection selected = (FeatureSelection) values |
|
95 |
.get(selectionParameter); |
|
96 |
try { |
|
97 |
if (!selected.isEmpty()) { |
|
98 |
Point p1 = (Point) values.get(firstPointParameter); |
|
99 |
if (p1 != null) { |
|
100 |
Object p2Value = values.get(secondPointParameter); |
|
101 |
Point p2 = null; |
|
102 |
if (p2Value != null && p2Value instanceof Point) { |
|
103 |
p2 = (Point) p2Value; |
|
104 |
} else { |
|
105 |
p2 = mousePosition; |
|
106 |
} |
|
107 |
Line line; |
|
108 |
line = geomManager.createLine(featureStore |
|
109 |
.getDefaultFeatureType() |
|
110 |
.getDefaultGeometryAttribute().getGeomType() |
|
111 |
.getSubType()); |
|
112 |
line.addVertex(p1); |
|
113 |
line.addVertex(p2); |
|
114 |
|
|
115 |
geometries.addGeometry(line); |
|
116 |
|
|
117 |
DisposableIterator it; |
|
118 |
it = selected.fastIterator(); |
|
119 |
|
|
120 |
AffineTransform at; |
|
121 |
try { |
|
122 |
at = getSymmetryAffineTransform(p1, p2); |
|
123 |
} catch (Exception e) { |
|
124 |
throw new DrawServiceException(e); |
|
125 |
} |
|
126 |
|
|
127 |
while (it.hasNext()) { |
|
128 |
Feature feat = (Feature) it.next(); |
|
129 |
Geometry geom = (Geometry) feat.getDefaultGeometry() |
|
130 |
.cloneGeometry(); |
|
131 |
geom.transform(at); |
|
132 |
geometries.addGeometry(geom); |
|
133 |
} |
|
134 |
it.dispose(); |
|
135 |
} |
|
136 |
return geometries; |
|
137 |
} |
|
138 |
} catch (Exception e) { |
|
139 |
throw new DrawServiceException(e); |
|
140 |
} |
|
141 |
|
|
142 |
return null; |
|
143 |
|
|
144 |
} |
|
145 |
|
|
146 |
private AffineTransform getSymmetryAffineTransform(Point axisP1, |
|
147 |
Point axisP2) throws GeometryOperationNotSupportedException, |
|
148 |
GeometryOperationException { |
|
149 |
|
|
150 |
AffineTransform translate = AffineTransform.getTranslateInstance( |
|
151 |
-axisP1.getX(), -axisP1.getY()); |
|
152 |
|
|
153 |
Double angle = -getAngle(axisP1, axisP2); |
|
154 |
AffineTransform rotate = AffineTransform.getRotateInstance(angle); |
|
155 |
|
|
156 |
AffineTransform symmetry = new AffineTransform(1, 0, 0, -1, 0, 0); |
|
157 |
AffineTransform inverseRotate = AffineTransform |
|
158 |
.getRotateInstance(-angle); |
|
159 |
AffineTransform inverseTranslate = AffineTransform |
|
160 |
.getTranslateInstance(axisP1.getX(), axisP1.getY()); |
|
161 |
AffineTransform at = new AffineTransform(translate); |
|
162 |
|
|
163 |
at.preConcatenate(rotate); |
|
164 |
at.preConcatenate(symmetry); |
|
165 |
at.preConcatenate(inverseRotate); |
|
166 |
at.preConcatenate(inverseTranslate); |
|
167 |
return at; |
|
168 |
} |
|
169 |
|
|
170 |
private static Double getAngle(Point start, Point end) |
|
171 |
throws GeometryOperationNotSupportedException, |
|
172 |
GeometryOperationException { |
|
173 |
Double angle = Math.acos((end.getX() - start.getX()) |
|
174 |
/ start.distance(end)); |
|
175 |
if (start.getY() > end.getY()) { |
|
176 |
angle = -angle; |
|
177 |
} |
|
178 |
return angle; |
|
179 |
} |
|
180 |
|
|
181 |
public EditingServiceParameter next() { |
|
182 |
if (values.get(selectionParameter) == null) { |
|
183 |
return this.selectionParameter; |
|
184 |
} else if (values.get(firstPointParameter) == null) { |
|
185 |
return this.firstPointParameter; |
|
186 |
} else if (values.get(secondPointParameter) == null) { |
|
187 |
return this.secondPointParameter; |
|
188 |
} else if (values.get(deleteOriginalGeometriesParameter) == null) { |
|
189 |
return this.deleteOriginalGeometriesParameter; |
|
190 |
} |
|
191 |
return null; |
|
192 |
} |
|
193 |
|
|
194 |
public void stop() { |
|
195 |
|
|
196 |
} |
|
197 |
|
|
198 |
private void validateAndInsertValue(EditingServiceParameter param, |
|
199 |
Object value) throws InvalidEntryException { |
|
200 |
if (param == selectionParameter) { |
|
201 |
if (value instanceof FeatureSelection) { |
|
202 |
values.put(param, value); |
|
203 |
return; |
|
204 |
} |
|
205 |
} else if (param == firstPointParameter) { |
|
206 |
if (value instanceof Point) { |
|
207 |
values.put(param, value); |
|
208 |
return; |
|
209 |
} |
|
210 |
} else if (param == secondPointParameter) { |
|
211 |
if (value instanceof Point) { |
|
212 |
values.put(param, value); |
|
213 |
return; |
|
214 |
} |
|
215 |
} else if (param == deleteOriginalGeometriesParameter) { |
|
216 |
if (value instanceof String) { |
|
217 |
values.put(param, value); |
|
218 |
if (((String) value).equalsIgnoreCase(i18nManager |
|
219 |
.getTranslation("short_yes"))) { |
|
220 |
deleteOriginalGeometries = true; |
|
221 |
} else if (((String) value).equalsIgnoreCase(i18nManager |
|
222 |
.getTranslation("short_no"))) { |
|
223 |
deleteOriginalGeometries = false; |
|
224 |
} else { |
|
225 |
throw new InvalidEntryException(null); |
|
226 |
} |
|
227 |
} |
|
228 |
} |
|
229 |
|
|
230 |
} |
|
231 |
|
|
232 |
public List<EditingServiceParameter> getParameters() { |
|
233 |
List<EditingServiceParameter> list = new ArrayList<EditingServiceParameter>(); |
|
234 |
list.add(selectionParameter); |
|
235 |
list.add(firstPointParameter); |
|
236 |
list.add(secondPointParameter); |
|
237 |
return list; |
|
238 |
} |
|
239 |
|
|
240 |
public void value(Object value) throws InvalidEntryException { |
|
241 |
EditingServiceParameter param = next(); |
|
242 |
validateAndInsertValue(param, value); |
|
243 |
} |
|
244 |
|
|
245 |
public void finish() throws FinishServiceException { |
|
246 |
|
|
247 |
FeatureSelection selected = (FeatureSelection) values |
|
248 |
.get(selectionParameter); |
|
249 |
try { |
|
250 |
if (!selected.isEmpty()) { |
|
251 |
Point p1 = (Point) values.get(firstPointParameter); |
|
252 |
Point p2 = (Point) values.get(secondPointParameter); |
|
253 |
if (p1 != null && p2 != null) { |
|
254 |
|
|
255 |
AffineTransform at; |
|
256 |
try { |
|
257 |
at = getSymmetryAffineTransform(p1, p2); |
|
258 |
} catch (GeometryOperationNotSupportedException e) { |
|
259 |
throw new FinishServiceException(e); |
|
260 |
} catch (GeometryOperationException e) { |
|
261 |
throw new FinishServiceException(e); |
|
262 |
} |
|
263 |
|
|
264 |
DisposableIterator it; |
|
265 |
it = selected.fastIterator(); |
|
266 |
|
|
267 |
while (it.hasNext()) { |
|
268 |
Feature feat = (Feature) it.next(); |
|
269 |
Geometry geom = (Geometry) feat.getDefaultGeometry() |
|
270 |
.cloneGeometry(); |
|
271 |
geom.transform(at); |
|
272 |
if (this.deleteOriginalGeometries) { |
|
273 |
// Se sustituye la geometr?a original por la |
|
274 |
// calculada |
|
275 |
EditableFeature editableFeature = feat |
|
276 |
.getEditable(); |
|
277 |
editableFeature.setDefaultGeometry(geom); |
|
278 |
((EditingProviderServices) getProviderServices()) |
|
279 |
.updateFeatureInFeatureStore( |
|
280 |
editableFeature, featureStore); |
|
281 |
} else { |
|
282 |
// Se crea una feature nueva copiando los valores de |
|
283 |
// la feature original excepto aquellos que sean PK |
|
284 |
EditableFeature editableFeature = getFeatureCopyWithoutPK(feat); |
|
285 |
editableFeature.setDefaultGeometry(geom); |
|
286 |
((EditingProviderServices) getProviderServices()) |
|
287 |
.insertFeatureIntoFeatureStore( |
|
288 |
editableFeature, featureStore); |
|
289 |
} |
|
290 |
} |
|
291 |
it.dispose(); |
|
292 |
} |
|
293 |
} |
|
294 |
} catch (DataException e) { |
|
295 |
throw new FinishServiceException(e); |
|
296 |
} |
|
297 |
} |
|
298 |
|
|
299 |
private EditableFeature getFeatureCopyWithoutPK(Feature feat) |
|
300 |
throws DataException { |
|
301 |
EditableFeature editableFeature = featureStore.createNewFeature( |
|
302 |
feat.getType(), true); |
|
303 |
|
|
304 |
FeatureType type_src = feat.getType(); |
|
305 |
@SuppressWarnings("rawtypes") |
|
306 |
Iterator iterator = type_src.iterator(); |
|
307 |
FeatureType type_dest = editableFeature.getType(); |
|
308 |
|
|
309 |
while (iterator.hasNext()) { |
|
310 |
FeatureAttributeDescriptor attribute_src = (FeatureAttributeDescriptor) iterator |
|
311 |
.next(); |
|
312 |
|
|
313 |
FeatureAttributeDescriptor attribute_dest = type_dest |
|
314 |
.getAttributeDescriptor(attribute_src.getName()); |
|
315 |
if (attribute_dest != null) { |
|
316 |
if (!attribute_dest.isPrimaryKey()) { |
|
317 |
editableFeature.set(attribute_dest.getIndex(), |
|
318 |
feat.get(attribute_src.getIndex())); |
|
319 |
} |
|
320 |
} |
|
321 |
} |
|
322 |
return editableFeature; |
|
323 |
} |
|
324 |
|
|
325 |
public void start() throws StartServiceException { |
|
326 |
this.values = new HashMap<EditingServiceParameter, Object>(); |
|
327 |
FeatureSelection selected = null; |
|
328 |
if (featureStore != null) { |
|
329 |
try { |
|
330 |
selected = featureStore.getFeatureSelection(); |
|
331 |
} catch (DataException e) { |
|
332 |
throw new StartServiceException(e); |
|
333 |
} |
|
334 |
if (selected != null && selected.getSelectedCount() > 0) { |
|
335 |
values.put(selectionParameter, selected); |
|
336 |
} |
|
337 |
} |
|
338 |
} |
|
339 |
|
|
340 |
public String getName() { |
|
341 |
return SymmetryEditingProviderFactory.PROVIDER_NAME; |
|
342 |
} |
|
343 |
|
|
344 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.symmetry/src/main/java/org/gvsig/vectorediting/lib/prov/symmetry/SymmetryEditingProviderFactory.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.prov.symmetry |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.prov.symmetry; |
|
8 |
|
|
9 |
import org.gvsig.fmap.geom.Geometry; |
|
10 |
import org.gvsig.tools.ToolsLocator; |
|
11 |
import org.gvsig.tools.dynobject.DynClass; |
|
12 |
import org.gvsig.tools.dynobject.DynObject; |
|
13 |
import org.gvsig.tools.service.spi.AbstractProviderFactory; |
|
14 |
import org.gvsig.tools.service.spi.Provider; |
|
15 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
16 |
import org.gvsig.vectorediting.lib.api.EditingServiceInfo; |
|
17 |
import org.gvsig.vectorediting.lib.api.EditingServiceParameter; |
|
18 |
import org.gvsig.vectorediting.lib.spi.DefaultEditingServiceinfo; |
|
19 |
import org.gvsig.vectorediting.lib.spi.EditingProviderFactory; |
|
20 |
|
|
21 |
public class SymmetryEditingProviderFactory extends AbstractProviderFactory |
|
22 |
implements EditingProviderFactory { |
|
23 |
|
|
24 |
public static final String PROVIDER_NAME = "symmetry"; |
|
25 |
|
|
26 |
private final static String PROVIDER_DESCRIPTION = "Creates symmetric geometries from selection"; |
|
27 |
|
|
28 |
public static final String PROVIDER_NAME_PARAMS = "SymmetryParams"; |
|
29 |
|
|
30 |
public static final String PROVIDER_NAME_PARAMS_DESCRIPTION = ""; |
|
31 |
|
|
32 |
private DynClass dynclass; |
|
33 |
|
|
34 |
public void initialize() { |
|
35 |
dynclass = ToolsLocator.getDynObjectManager().createDynClass( |
|
36 |
PROVIDER_NAME_PARAMS, PROVIDER_NAME_PARAMS_DESCRIPTION); |
|
37 |
|
|
38 |
dynclass.addDynFieldString(PROVIDER_NAME_FIELD); |
|
39 |
dynclass.addDynFieldObject(FEATURE_STORE_FIELD); |
|
40 |
|
|
41 |
} |
|
42 |
|
|
43 |
public EditingServiceInfo getServiceInfo() { |
|
44 |
EditingServiceInfo serviceInfo = new DefaultEditingServiceinfo( |
|
45 |
PROVIDER_NAME, |
|
46 |
"", |
|
47 |
true, |
|
48 |
null, |
|
49 |
null, |
|
50 |
new int[]{ |
|
51 |
Geometry.TYPES.POINT, |
|
52 |
Geometry.TYPES.MULTIPOINT, |
|
53 |
Geometry.TYPES.SURFACE, |
|
54 |
Geometry.TYPES.MULTISURFACE, |
|
55 |
Geometry.TYPES.CURVE, |
|
56 |
Geometry.TYPES.MULTICURVE}); |
|
57 |
|
|
58 |
return serviceInfo; |
|
59 |
} |
|
60 |
|
|
61 |
public EditingServiceParameter getServiceParameterInfo() { |
|
62 |
// TODO Auto-generated method stub |
|
63 |
return null; |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
protected Provider doCreate(DynObject parameters, ProviderServices services) { |
|
68 |
return new SymmetryEditingProvider(services, parameters); |
|
69 |
} |
|
70 |
|
|
71 |
public DynObject createParameters() { |
|
72 |
DynObject dynobject = ToolsLocator.getDynObjectManager().createDynObject( |
|
73 |
dynclass); |
|
74 |
|
|
75 |
dynobject.setDynValue(PROVIDER_NAME_FIELD, PROVIDER_NAME); |
|
76 |
return dynobject; |
|
77 |
} |
|
78 |
|
|
79 |
@Override |
|
80 |
protected DynClass createParametersDynClass() { |
|
81 |
return null; |
|
82 |
} |
|
83 |
|
|
84 |
public String getName() { |
|
85 |
return this.PROVIDER_NAME; |
|
86 |
} |
|
87 |
|
|
88 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.symmetry/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.vectorediting.lib.prov</artifactId> |
|
6 |
<version>1.0.0-SNAPSHOT</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.vectorediting.lib.prov.symmetry</artifactId> |
|
9 |
<name>org.gvsig.vectorediting.lib.prov.symmetry</name> |
|
10 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.polyline/src/main/java/org/gvsig/vectorediting/lib/prov/polyline/PolylineEditingProvider.java | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
3 |
*
|
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.prov.polyline
|
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.prov.polyline |
|
5 | 5 |
* SVN Id : $Id$ |
6 | 6 |
*/ |
7 | 7 |
package org.gvsig.vectorediting.lib.prov.polyline; |
... | ... | |
34 | 34 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
35 | 35 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
36 | 36 |
import org.gvsig.vectorediting.lib.api.exceptions.VectorEditingException; |
37 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
37 | 38 |
import org.gvsig.vectorediting.lib.spi.AbstractEditingProvider; |
38 | 39 |
import org.gvsig.vectorediting.lib.spi.DefaultDrawingStatus; |
39 | 40 |
import org.gvsig.vectorediting.lib.spi.DefaultEditingServiceParameter; |
... | ... | |
124 | 125 |
try { |
125 | 126 |
|
126 | 127 |
lineAntPointToPoint = editingProviderServices.createLine( |
127 |
point.getX(), point.getY(), nextPoint.getX(), nextPoint.getY(),
|
|
128 |
featureStore);
|
|
128 |
point.getX(), point.getY(), nextPoint.getX(), nextPoint.getY(), |
|
129 |
featureStore); |
|
129 | 130 |
|
130 |
Double[] lineParams = getLineParams(point, nextPoint);
|
|
131 |
m = lineParams[0];
|
|
132 |
b = lineParams[1];
|
|
131 |
Double[] lineParams = getLineParams(point, nextPoint); |
|
132 |
m = lineParams[0]; |
|
133 |
b = lineParams[1]; |
|
133 | 134 |
|
134 |
Point[] pointPerpendicular = getPerpendicular(antm, antb, point,
|
|
135 |
featureStore);
|
|
136 |
Line linePointPerpendicular = geomManager
|
|
137 |
.createLine(editingProviderServices.getSubType(featureStore));
|
|
138 |
linePointPerpendicular.setPoints(pointPerpendicular[0],
|
|
139 |
pointPerpendicular[1]);
|
|
135 |
Point[] pointPerpendicular = getPerpendicular(antm, antb, point, |
|
136 |
featureStore); |
|
137 |
Line linePointPerpendicular = geomManager |
|
138 |
.createLine(editingProviderServices.getSubType(featureStore)); |
|
139 |
linePointPerpendicular.setPoints(pointPerpendicular[0], |
|
140 |
pointPerpendicular[1]); |
|
140 | 141 |
|
141 |
Point[] bisector = getPerpendicular(m, b,
|
|
142 |
getMidPoint(point, nextPoint, featureStore), featureStore);
|
|
143 |
Line lineBisector = geomManager.createLine(editingProviderServices
|
|
144 |
.getSubType(featureStore));
|
|
145 |
lineBisector.setPoints(bisector[0], bisector[1]);
|
|
142 |
Point[] bisector = getPerpendicular(m, b, |
|
143 |
getMidPoint(point, nextPoint, featureStore), featureStore); |
|
144 |
Line lineBisector = geomManager.createLine(editingProviderServices |
|
145 |
.getSubType(featureStore)); |
|
146 |
lineBisector.setPoints(bisector[0], bisector[1]); |
|
146 | 147 |
|
147 | 148 |
center = getIntersection(bisector, pointPerpendicular, featureStore); |
148 | 149 |
|
... | ... | |
203 | 204 |
Arc arco = null; |
204 | 205 |
try { |
205 | 206 |
arco = editingProviderServices.createArc(center, radius, |
206 |
startAngle, angleExt, featureStore);
|
|
207 |
startAngle, angleExt, featureStore); |
|
207 | 208 |
} |
208 | 209 |
catch (Exception e) { |
209 | 210 |
throw new DrawServiceException(e); |
... | ... | |
237 | 238 |
} |
238 | 239 |
else { |
239 | 240 |
try { |
240 |
Curve geometry = editingProviderServices.createLine(point.getX(),
|
|
241 |
point.getY(), nextPoint.getX(), nextPoint.getY(), featureStore);
|
|
242 |
geometries.addGeometry(geometry);
|
|
241 |
Curve geometry = editingProviderServices.createLine(point.getX(), |
|
242 |
point.getY(), nextPoint.getX(), nextPoint.getY(), featureStore); |
|
243 |
geometries.addGeometry(geometry); |
|
243 | 244 |
} |
244 | 245 |
catch (Exception e) { |
245 | 246 |
throw new DrawServiceException(e); |
... | ... | |
270 | 271 |
|
271 | 272 |
public DrawingStatus draw(Point mousePosition) throws DrawServiceException { |
272 | 273 |
try { |
273 |
return calculatePolyline(mousePosition);
|
|
274 |
}
|
|
274 |
return calculatePolyline(mousePosition); |
|
275 |
} |
|
275 | 276 |
catch (Exception e) { |
276 | 277 |
throw new DrawServiceException(e); |
277 | 278 |
} |
... | ... | |
279 | 280 |
|
280 | 281 |
public void finish() throws FinishServiceException { |
281 | 282 |
try { |
282 |
GeometryType storeGeomType = editingProviderServices |
|
283 |
.getGeomType(featureStore); |
|
284 |
DrawingStatus finalGeometries = calculatePolyline(null); |
|
285 |
if (storeGeomType.isTypeOf(SURFACE)) { |
|
286 |
Surface surface = geomManager.createPolygon(storeGeomType.getSubType()); |
|
287 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
288 |
surface.addVertex((Point) geometry); |
|
289 |
} |
|
290 |
surface = closeSurfaceIfNecessary(surface); |
|
291 |
editingProviderServices.insertGeometryIntoFeatureStore(surface, |
|
283 |
GeometryType storeGeomType = editingProviderServices |
|
284 |
.getGeomType(featureStore); |
|
285 |
DrawingStatus finalGeometries = calculatePolyline(null); |
|
286 |
if (storeGeomType.isTypeOf(SURFACE)) { |
|
287 |
Surface surface = geomManager.createPolygon(storeGeomType.getSubType()); |
|
288 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
289 |
surface.addVertex((Point) geometry); |
|
290 |
} |
|
291 |
surface = closeSurfaceIfNecessary(surface); |
|
292 |
editingProviderServices.insertGeometryIntoFeatureStore(surface, |
|
293 |
featureStore); |
|
294 |
} |
|
295 |
else if (storeGeomType.isTypeOf(CURVE)) { |
|
296 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
297 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry, |
|
292 | 298 |
featureStore); |
293 | 299 |
} |
294 |
else if (storeGeomType.isTypeOf(CURVE)) { |
|
295 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
296 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry, |
|
297 |
featureStore); |
|
298 |
} |
|
299 |
} |
|
300 |
else if (storeGeomType.isTypeOf(MULTISURFACE)) { |
|
301 |
MultiSurface multiSurface; |
|
300 |
} |
|
301 |
else if (storeGeomType.isTypeOf(MULTISURFACE)) { |
|
302 |
MultiSurface multiSurface; |
|
302 | 303 |
multiSurface = geomManager.createMultiSurface(storeGeomType |
303 | 304 |
.getSubType()); |
304 |
Surface surface = geomManager.createPolygon(storeGeomType.getSubType()); |
|
305 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
306 |
if (geometry instanceof Curve) { |
|
307 |
Curve curve = (Curve) geometry; |
|
308 |
for (int i = 0; i < curve.getNumVertices(); i++) { |
|
309 |
surface.addVertex((Point) curve.getVertex(i)); |
|
310 |
} |
|
305 |
Surface surface = geomManager.createPolygon(storeGeomType.getSubType()); |
|
306 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
307 |
if(geometry instanceof Curve){ |
|
308 |
Curve curve = (Curve) geometry; |
|
309 |
for(int i=0; i < curve.getNumVertices(); i++){ |
|
310 |
surface.addVertex((Point) curve.getVertex(i)); |
|
311 | 311 |
} |
312 | 312 |
} |
313 |
surface = closeSurfaceIfNecessary(surface); |
|
314 |
multiSurface.addSurface(surface); |
|
315 |
editingProviderServices.insertGeometryIntoFeatureStore(multiSurface, |
|
316 |
featureStore); |
|
317 | 313 |
} |
318 |
else if (storeGeomType.isTypeOf(MULTICURVE)) { |
|
319 |
MultiCurve multiCurve; |
|
320 |
multiCurve = geomManager.createMultiCurve(storeGeomType.getSubType()); |
|
321 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
322 |
multiCurve.addCurve((Curve) geometry); |
|
323 |
} |
|
324 |
editingProviderServices.insertGeometryIntoFeatureStore(multiCurve, |
|
325 |
featureStore); |
|
314 |
surface = closeSurfaceIfNecessary(surface); |
|
315 |
multiSurface.addSurface(surface); |
|
316 |
editingProviderServices.insertGeometryIntoFeatureStore(multiSurface, |
|
317 |
featureStore); |
|
318 |
} |
|
319 |
else if (storeGeomType.isTypeOf(MULTICURVE)) { |
|
320 |
MultiCurve multiCurve; |
|
321 |
multiCurve = geomManager.createMultiCurve(storeGeomType.getSubType()); |
|
322 |
for (Geometry geometry : finalGeometries.getGeometries()) { |
|
323 |
multiCurve.addCurve((Curve) geometry); |
|
326 | 324 |
} |
325 |
editingProviderServices.insertGeometryIntoFeatureStore(multiCurve, |
|
326 |
featureStore); |
|
327 | 327 |
} |
328 |
} |
|
328 | 329 |
catch (Exception e) { |
329 | 330 |
throw new FinishServiceException(e); |
330 | 331 |
} |
... | ... | |
541 | 542 |
*/ |
542 | 543 |
private boolean isClose(Surface surface) { |
543 | 544 |
|
544 |
if (surface != null) {
|
|
545 |
if(surface != null){
|
|
545 | 546 |
Point firstPoint = surface.getVertex(0); |
546 |
Point lastPoint = surface.getVertex(surface.getNumVertices() - 1);
|
|
547 |
if (firstPoint.equals(lastPoint)) {
|
|
547 |
Point lastPoint = surface.getVertex(surface.getNumVertices()-1);
|
|
548 |
if(firstPoint.equals(lastPoint)){
|
|
548 | 549 |
return true; |
549 | 550 |
} |
550 | 551 |
} |
... | ... | |
552 | 553 |
} |
553 | 554 |
|
554 | 555 |
public EditingServiceParameter next() { |
555 |
if (values.size() >= 2) {
|
|
556 |
if (arcMode) {
|
|
556 |
if( values.size() >= 2){
|
|
557 |
if(arcMode){
|
|
557 | 558 |
points |
558 | 559 |
.setDescription("Inserts [L] to change to line mode. Double-click to finish. Inserts new point."); |
559 | 560 |
} |
560 |
else {
|
|
561 |
else{ |
|
561 | 562 |
points |
562 | 563 |
.setDescription("Inserts [A] to change to arc mode. Double-click to finish. Inserts new point."); |
563 | 564 |
} |
... | ... | |
565 | 566 |
return points; |
566 | 567 |
} |
567 | 568 |
|
568 |
public void start() { |
|
569 |
public void start() throws StartServiceException {
|
|
569 | 570 |
values = new ArrayList<MyPolyLinePoint>(); |
570 | 571 |
} |
571 | 572 |
|
... | ... | |
583 | 584 |
if (value instanceof String) { |
584 | 585 |
if (values.size() >= 2) { |
585 | 586 |
if(((String) value).equalsIgnoreCase("A") || ((String) value).equalsIgnoreCase("L")){ |
586 |
if (((String) value).equalsIgnoreCase("A")) {
|
|
587 |
arcMode = true;
|
|
588 |
}
|
|
589 |
else if (((String) value).equalsIgnoreCase("L")) {
|
|
590 |
arcMode = false;
|
|
591 |
}
|
|
592 |
if (values.size() > 0) {
|
|
593 |
values.get(values.size() - 1).setArcMode(arcMode);
|
|
594 |
return;
|
|
595 |
}
|
|
587 |
if (((String) value).equalsIgnoreCase("A")) { |
|
588 |
arcMode = true; |
|
589 |
} |
|
590 |
else if (((String) value).equalsIgnoreCase("L")) { |
|
591 |
arcMode = false; |
|
592 |
} |
|
593 |
if (values.size() > 0) { |
|
594 |
values.get(values.size() - 1).setArcMode(arcMode); |
|
595 |
return; |
|
596 |
} |
|
596 | 597 |
} else{ |
597 | 598 |
throw new InvalidEntryException(null); |
598 | 599 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.insertpoint/src/main/java/org/gvsig/vectorediting/lib/prov/insertpoint/InsertPointEditingProvider.java | ||
---|---|---|
18 | 18 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
19 | 19 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
20 | 20 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
21 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
21 | 22 |
import org.gvsig.vectorediting.lib.spi.AbstractEditingProvider; |
22 | 23 |
import org.gvsig.vectorediting.lib.spi.DefaultDrawingStatus; |
23 | 24 |
import org.gvsig.vectorediting.lib.spi.DefaultEditingServiceParameter; |
... | ... | |
54 | 55 |
return null; |
55 | 56 |
} |
56 | 57 |
|
57 |
public void stop() {
|
|
58 |
public void stop(){ |
|
58 | 59 |
|
59 | 60 |
} |
60 | 61 |
|
61 |
private boolean isValidValue(EditingServiceParameter param, Object value){ |
|
62 |
private boolean isValidValue(EditingServiceParameter param, Object value) {
|
|
62 | 63 |
return (value instanceof Point) ? true : false; |
63 | 64 |
} |
64 | 65 |
|
... | ... | |
96 | 97 |
} |
97 | 98 |
} |
98 | 99 |
|
99 |
public void start() { |
|
100 |
public void start() throws StartServiceException {
|
|
100 | 101 |
this.valuePoint = null; |
101 | 102 |
} |
102 | 103 |
|
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.circlecr/src/main/java/org/gvsig/vectorediting/lib/prov/circlecr/CircleCREditingProvider.java | ||
---|---|---|
29 | 29 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
30 | 30 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
31 | 31 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
32 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
32 | 33 |
import org.gvsig.vectorediting.lib.spi.AbstractEditingProvider; |
33 | 34 |
import org.gvsig.vectorediting.lib.spi.DefaultDrawingStatus; |
34 | 35 |
import org.gvsig.vectorediting.lib.spi.DefaultEditingServiceParameter; |
... | ... | |
69 | 70 |
if (values.get(center) != null) { |
70 | 71 |
Point centerPoint = (Point) values.get(center); |
71 | 72 |
try { |
72 |
Curve line = ((EditingProviderServices) getProviderServices())
|
|
73 |
.createLine(centerPoint.getX(), centerPoint.getY(),
|
|
74 |
mousePosition.getX(), mousePosition.getY(), featureStore);
|
|
73 |
Curve line = ((EditingProviderServices) getProviderServices()) |
|
74 |
.createLine(centerPoint.getX(), centerPoint.getY(), |
|
75 |
mousePosition.getX(), mousePosition.getY(), featureStore); |
|
75 | 76 |
Arc circle = ((EditingProviderServices) getProviderServices()) |
76 | 77 |
.createArc(centerPoint, mousePosition.distance(centerPoint), 0, |
77 | 78 |
2 * Math.PI, featureStore); |
78 |
geometries.addGeometry(circle);
|
|
79 |
geometries.addGeometry(centerPoint);
|
|
80 |
geometries.addGeometry(line);
|
|
79 |
geometries.addGeometry(circle); |
|
80 |
geometries.addGeometry(centerPoint); |
|
81 |
geometries.addGeometry(line); |
|
81 | 82 |
|
82 | 83 |
} |
83 | 84 |
catch (Exception e) { |
... | ... | |
154 | 155 |
double radiusValue = (Double) values.get(radius); |
155 | 156 |
EditingProviderServices editingProviderServices = (EditingProviderServices) getProviderServices(); |
156 | 157 |
try { |
157 |
GeometryType storeGeomType = editingProviderServices
|
|
158 |
.getGeomType(featureStore);
|
|
159 |
Geometry geometry = null;
|
|
160 |
if (storeGeomType.isTypeOf(SURFACE)) {
|
|
158 |
GeometryType storeGeomType = editingProviderServices |
|
159 |
.getGeomType(featureStore); |
|
160 |
Geometry geometry = null; |
|
161 |
if (storeGeomType.isTypeOf(SURFACE)) { |
|
161 | 162 |
geometry = editingProviderServices.createCircle(centerPoint, |
162 | 163 |
radiusValue, featureStore); |
163 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry,
|
|
164 |
featureStore);
|
|
165 |
}
|
|
166 |
else if (storeGeomType.isTypeOf(CURVE)) {
|
|
164 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry, |
|
165 |
featureStore); |
|
166 |
} |
|
167 |
else if (storeGeomType.isTypeOf(CURVE)) { |
|
167 | 168 |
geometry = editingProviderServices.createArc(centerPoint, radiusValue, |
168 | 169 |
0, 2 * Math.PI, featureStore); |
169 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry,
|
|
170 |
featureStore);
|
|
171 |
}
|
|
172 |
else if (storeGeomType.isTypeOf(MULTISURFACE)) {
|
|
170 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry, |
|
171 |
featureStore); |
|
172 |
} |
|
173 |
else if (storeGeomType.isTypeOf(MULTISURFACE)) { |
|
173 | 174 |
geometry = editingProviderServices.createCircle(centerPoint, |
174 | 175 |
radiusValue, featureStore); |
175 |
MultiSurface multisurface;
|
|
176 |
MultiSurface multisurface; |
|
176 | 177 |
multisurface = geomManager.createMultiSurface(storeGeomType |
177 | 178 |
.getSubType()); |
178 |
multisurface.addSurface((Circle) geometry);
|
|
179 |
editingProviderServices.insertGeometryIntoFeatureStore(multisurface,
|
|
180 |
featureStore);
|
|
181 |
}
|
|
182 |
else if (storeGeomType.isTypeOf(MULTICURVE)) {
|
|
179 |
multisurface.addSurface((Circle) geometry); |
|
180 |
editingProviderServices.insertGeometryIntoFeatureStore(multisurface, |
|
181 |
featureStore); |
|
182 |
} |
|
183 |
else if (storeGeomType.isTypeOf(MULTICURVE)) { |
|
183 | 184 |
geometry = editingProviderServices.createArc(centerPoint, radiusValue, |
184 | 185 |
0, 2 * Math.PI, featureStore); |
185 |
MultiCurve multicurve; |
|
186 |
multicurve = geomManager.createMultiCurve(storeGeomType.getSubType()); |
|
187 |
multicurve.addCurve((Arc) geometry); |
|
188 |
editingProviderServices.insertGeometryIntoFeatureStore(multicurve, |
|
189 |
featureStore); |
|
190 |
} |
|
191 |
else { |
|
192 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry, |
|
193 |
featureStore); |
|
194 |
} |
|
186 |
MultiCurve multicurve; |
|
187 |
multicurve = geomManager.createMultiCurve(storeGeomType.getSubType()); |
|
188 |
multicurve.addCurve((Arc) geometry); |
|
189 |
editingProviderServices.insertGeometryIntoFeatureStore(multicurve, |
|
190 |
featureStore); |
|
191 |
|
|
195 | 192 |
} |
193 |
else { |
|
194 |
editingProviderServices.insertGeometryIntoFeatureStore(geometry, |
|
195 |
featureStore); |
|
196 |
} |
|
197 |
} |
|
196 | 198 |
catch (Exception e) { |
197 | 199 |
throw new FinishServiceException(e); |
198 | 200 |
} |
199 | 201 |
} |
200 | 202 |
|
201 |
public void start() { |
|
203 |
public void start() throws StartServiceException {
|
|
202 | 204 |
this.values = new HashMap<EditingServiceParameter, Object>(); |
203 | 205 |
} |
204 | 206 |
|
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/pom.xml | ||
---|---|---|
12 | 12 |
<module>org.gvsig.vectorediting.lib.prov.insertpoint</module> |
13 | 13 |
<module>org.gvsig.vectorediting.lib.prov.circlecr</module> |
14 | 14 |
<module>org.gvsig.vectorediting.lib.prov.polyline</module> |
15 |
<module>org.gvsig.vectorediting.lib.prov.symmetry</module> |
|
15 | 16 |
</modules> |
16 | 17 |
<dependencies> |
17 | 18 |
<dependency> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/exceptions/StartServiceException.java | ||
---|---|---|
1 |
/* |
|
2 |
* Copyright 2014 DiSiD Technologies S.L.L. All rights reserved. |
|
3 |
* |
|
4 |
* Project : DiSiD org.gvsig.vectorediting.lib.api |
|
5 |
* SVN Id : $Id$ |
|
6 |
*/ |
|
7 |
package org.gvsig.vectorediting.lib.api.exceptions; |
|
8 |
|
|
9 |
|
|
10 |
public class StartServiceException extends EditingServiceException { |
|
11 |
|
|
12 |
/** |
|
13 |
* |
|
14 |
*/ |
|
15 |
private static final long serialVersionUID = -1368352148381697338L; |
|
16 |
|
|
17 |
private static final String MESSAGE = "An error has been produced starting the service."; |
|
18 |
|
|
19 |
private static final String KEY = "_StartServiceException"; |
|
20 |
|
|
21 |
public StartServiceException(Throwable ex) { |
|
22 |
super(MESSAGE, ex, KEY, serialVersionUID); |
|
23 |
} |
|
24 |
|
|
25 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.api/src/main/java/org/gvsig/vectorediting/lib/api/EditingService.java | ||
---|---|---|
15 | 15 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
16 | 16 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
17 | 17 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
18 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
18 | 19 |
|
19 | 20 |
public interface EditingService extends Service { |
20 | 21 |
|
... | ... | |
52 | 53 |
|
53 | 54 |
/** |
54 | 55 |
* @throws DataException |
55 |
* @throws BaseException
|
|
56 |
* @throws BaseException |
|
56 | 57 |
* |
57 | 58 |
*/ |
58 | 59 |
public void finish() throws FinishServiceException; |
59 | 60 |
|
60 | 61 |
/** |
62 |
* @throws StartServiceException |
|
61 | 63 |
* |
62 | 64 |
*/ |
63 |
public void start(); |
|
65 |
public void start() throws StartServiceException;
|
|
64 | 66 |
|
65 | 67 |
/** |
66 | 68 |
* |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProviderServices.java | ||
---|---|---|
9 | 9 |
import java.awt.geom.Point2D; |
10 | 10 |
|
11 | 11 |
import org.gvsig.fmap.dal.exception.DataException; |
12 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
12 | 13 |
import org.gvsig.fmap.dal.feature.Feature; |
13 | 14 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
14 | 15 |
import org.gvsig.fmap.geom.Geometry; |
... | ... | |
66 | 67 |
public void updateGeometryInFeatureStore(Geometry geometry, |
67 | 68 |
FeatureStore featureStore); |
68 | 69 |
|
69 |
/** |
|
70 |
* Create a circle from a GeneralPath. If there is an error return |
|
71 |
* <code>null</code> and add the error to the log |
|
72 |
* |
|
73 |
* @param p1 |
|
74 |
* @param p2 |
|
75 |
* @return The circle |
|
76 |
* @throws CreateGeometryException |
|
77 |
* @throws DataException |
|
78 |
*/ |
|
70 |
|
|
71 |
/** |
|
72 |
* Create a circle from a GeneralPath. If there is an error return |
|
73 |
* <code>null</code> and add the error to the log |
|
74 |
* |
|
75 |
* @param p1 |
|
76 |
* @param p2 |
|
77 |
* @return The circle |
|
78 |
* @throws CreateGeometryException |
|
79 |
* @throws DataException |
|
80 |
*/ |
|
79 | 81 |
public Circle createCircle(Point2D p1, Point2D p2, FeatureStore featureStore) |
80 | 82 |
throws CreateGeometryException, DataException; |
81 | 83 |
|
82 |
/**
|
|
84 |
/**
|
|
83 | 85 |
* Create a circle. If there is an error return <code>null</code> and add the |
84 | 86 |
* error to the log |
85 |
*
|
|
86 |
* @param p1
|
|
87 |
* @param p2
|
|
88 |
* @return The circle
|
|
89 |
* @throws CreateGeometryException
|
|
90 |
* @throws DataException
|
|
91 |
*/
|
|
87 |
*
|
|
88 |
* @param p1
|
|
89 |
* @param p2
|
|
90 |
* @return The circle
|
|
91 |
* @throws CreateGeometryException
|
|
92 |
* @throws DataException
|
|
93 |
*/
|
|
92 | 94 |
public Circle createCircle(Point p1, Point p2, FeatureStore featureStore) |
93 | 95 |
throws CreateGeometryException, DataException; |
94 | 96 |
|
95 |
/**
|
|
97 |
/**
|
|
96 | 98 |
* Create a circle. If there is an error return <code>null</code> and add the |
97 | 99 |
* error to the log |
98 |
*
|
|
99 |
* @param center
|
|
100 |
* @param radius
|
|
101 |
* @return The circle
|
|
102 |
* @throws CreateGeometryException
|
|
103 |
* @throws DataException
|
|
104 |
*/
|
|
105 |
public Circle createCircle(Point center, double radius,
|
|
100 |
*
|
|
101 |
* @param center
|
|
102 |
* @param radius
|
|
103 |
* @return The circle
|
|
104 |
* @throws CreateGeometryException
|
|
105 |
* @throws DataException
|
|
106 |
*/
|
|
107 |
public Circle createCircle(Point center, double radius,
|
|
106 | 108 |
FeatureStore featureStore) |
107 | 109 |
throws CreateGeometryException, DataException; |
108 | 110 |
|
109 |
/**
|
|
111 |
/**
|
|
110 | 112 |
* Create a circle. If there is an error return <code>null</code> and add the |
111 | 113 |
* error to the log |
112 |
*
|
|
113 |
* @param center
|
|
114 |
* @param radius
|
|
114 |
*
|
|
115 |
* @param center
|
|
116 |
* @param radius
|
|
115 | 117 |
* @param startAngle in radians |
116 |
* @param angleExt
|
|
117 |
* @return The circle
|
|
118 |
* @throws org.gvsig.fmap.geom.exception.CreateGeometryException
|
|
119 |
* @throws DataException
|
|
120 |
*/
|
|
121 |
public Arc createArc(Point center, double radius, double startAngle,
|
|
122 |
double angleExt, FeatureStore featureStore)
|
|
123 |
throws CreateGeometryException, DataException;
|
|
118 |
* @param angleExt
|
|
119 |
* @return The circle
|
|
120 |
* @throws org.gvsig.fmap.geom.exception.CreateGeometryException
|
|
121 |
* @throws DataException
|
|
122 |
*/
|
|
123 |
public Arc createArc(Point center, double radius, double startAngle,
|
|
124 |
double angleExt, FeatureStore featureStore)
|
|
125 |
throws CreateGeometryException, DataException;
|
|
124 | 126 |
|
125 |
/**
|
|
127 |
/**
|
|
126 | 128 |
* @param antPoint |
127 | 129 |
* @param p1 |
128 | 130 |
* @param p2 |
... | ... | |
137 | 139 |
GeometryOperationNotSupportedException, GeometryOperationException; |
138 | 140 |
|
139 | 141 |
/** |
140 |
* Create point. If there is an error return <code>null</code> and add the
|
|
141 |
* error to the log
|
|
142 |
*
|
|
142 |
* Create point. If there is an error return <code>null</code> and add the
|
|
143 |
* error to the log
|
|
144 |
*
|
|
143 | 145 |
* @param x The X coordinate |
144 | 146 |
* @param y The y coordinate |
145 |
* @return The Point
|
|
146 |
* @throws CreateGeometryException
|
|
147 |
* @throws DataException
|
|
148 |
*/
|
|
149 |
public Point createPoint(double x, double y, FeatureStore featureStore)
|
|
150 |
throws CreateGeometryException, DataException;
|
|
147 |
* @return The Point
|
|
148 |
* @throws CreateGeometryException
|
|
149 |
* @throws DataException
|
|
150 |
*/
|
|
151 |
public Point createPoint(double x, double y, FeatureStore featureStore)
|
|
152 |
throws CreateGeometryException, DataException;
|
|
151 | 153 |
|
152 |
/**
|
|
153 |
* Create line. If there is an error return <code>null</code> and add the
|
|
154 |
* error to the log
|
|
155 |
*
|
|
154 |
/**
|
|
155 |
* Create line. If there is an error return <code>null</code> and add the
|
|
156 |
* error to the log
|
|
157 |
*
|
|
156 | 158 |
* @param x1 The X1 coordinate |
157 | 159 |
* @param y1 The y1 coordinate |
158 | 160 |
* @param x2 The X2 coordinate |
159 | 161 |
* @param y2 The y2 coordinate |
160 |
* @return The Point
|
|
161 |
* @throws CreateGeometryException
|
|
162 |
* @throws DataException
|
|
163 |
*/
|
|
164 |
public Curve createLine(double x1, double y1, double x2, double y2,
|
|
162 |
* @return The Point
|
|
163 |
* @throws CreateGeometryException
|
|
164 |
* @throws DataException
|
|
165 |
*/
|
|
166 |
public Curve createLine(double x1, double y1, double x2, double y2,
|
|
165 | 167 |
FeatureStore featureStore) |
166 | 168 |
throws CreateGeometryException, DataException; |
167 | 169 |
|
168 |
/**
|
|
169 |
* @return the subtype of the default geometry.
|
|
170 |
* @throws DataException
|
|
171 |
*/
|
|
172 |
public int getSubType(FeatureStore featureStore) throws DataException;
|
|
170 |
/**
|
|
171 |
* @return the subtype of the default geometry.
|
|
172 |
* @throws DataException
|
|
173 |
*/
|
|
174 |
public int getSubType(FeatureStore featureStore) throws DataException;
|
|
173 | 175 |
|
174 |
/**
|
|
175 |
* @return the subtype of the default geometry.
|
|
176 |
* @throws DataException
|
|
177 |
*/
|
|
178 |
public GeometryType getGeomType(FeatureStore featureStore)
|
|
179 |
throws DataException;
|
|
176 |
/**
|
|
177 |
* @return the subtype of the default geometry.
|
|
178 |
* @throws DataException
|
|
179 |
*/
|
|
180 |
public GeometryType getGeomType(FeatureStore featureStore)
|
|
181 |
throws DataException;
|
|
180 | 182 |
|
181 | 183 |
} |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.spi/src/main/java/org/gvsig/vectorediting/lib/spi/EditingProvider.java | ||
---|---|---|
20 | 20 |
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException; |
21 | 21 |
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException; |
22 | 22 |
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException; |
23 |
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException; |
|
23 | 24 |
|
24 | 25 |
public interface EditingProvider extends Provider { |
25 | 26 |
|
... | ... | |
61 | 62 |
public void finish() throws FinishServiceException; |
62 | 63 |
|
63 | 64 |
/** |
65 |
* @throws StartServiceException |
|
64 | 66 |
* |
65 | 67 |
*/ |
66 |
public void start(); |
|
68 |
public void start() throws StartServiceException;
|
|
67 | 69 |
|
68 | 70 |
/** |
69 | 71 |
* @return |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/pom.xml | ||
---|---|---|
37 | 37 |
org.gvsig.vectorediting.lib.prov.polyline |
38 | 38 |
</artifactId> |
39 | 39 |
</dependency> |
40 |
|
|
41 |
<dependency> |
|
42 |
<groupId>org.gvsig</groupId> |
|
43 |
<artifactId> |
|
44 |
org.gvsig.vectorediting.lib.prov.symmetry |
|
45 |
</artifactId> |
|
46 |
</dependency> |
|
40 | 47 |
</dependencies> |
41 | 48 |
</project> |
org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.impl/src/main/java/org/gvsig/vectorediting/lib/impl/DefaultEditingProviderServices.java | ||
---|---|---|
34 | 34 |
import org.gvsig.vectorediting.lib.spi.EditingProviderServices; |
Also available in: Unified diff