Revision 1361
org.gvsig.wfs.app/trunk/org.gvsig.wfs.app/org.gvsig.wfs.app.mainplugin/src/main/java/org/gvsig/wfs/gui/panels/WFSAreaPanel.java | ||
---|---|---|
55 | 55 |
import org.gvsig.fmap.geom.GeometryManager; |
56 | 56 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
57 | 57 |
import org.gvsig.fmap.geom.primitive.Envelope; |
58 |
import org.gvsig.fmap.geom.primitive.Polygon; |
|
58 | 59 |
import org.gvsig.fmap.geom.primitive.Surface; |
59 | 60 |
import org.gvsig.fmap.mapcontext.MapContext; |
60 | 61 |
import org.gvsig.fmap.mapcontext.ViewPort; |
... | ... | |
1928 | 1929 |
double v2x = getDoubleValueOfJTextFieldV2X(); |
1929 | 1930 |
double v2y = getDoubleValueOfJTextFieldV2Y(); |
1930 | 1931 |
|
1931 |
Surface surface = (Surface)geometryManager.create(TYPES.SURFACE, SUBTYPES.GEOM2D);
|
|
1932 |
surface.addMoveToVertex(geometryManager.createPoint(v1x, v1y, SUBTYPES.GEOM2D));
|
|
1933 |
surface.addVertex(geometryManager.createPoint(v1x, v2y, SUBTYPES.GEOM2D));
|
|
1934 |
surface.addVertex(geometryManager.createPoint(v2x, v2y, SUBTYPES.GEOM2D));
|
|
1935 |
surface.addVertex(geometryManager.createPoint(v2x, v1y, SUBTYPES.GEOM2D));
|
|
1936 |
surface.closePrimitive();
|
|
1937 |
|
|
1938 |
return surface;
|
|
1932 |
Polygon polygon = geometryManager.createPolygon(SUBTYPES.GEOM2D);
|
|
1933 |
polygon.addVertex(v1x, v1y);
|
|
1934 |
polygon.addVertex(v1x, v2y);
|
|
1935 |
polygon.addVertex(v2x, v2y);
|
|
1936 |
polygon.addVertex(v2x, v1y);
|
|
1937 |
// polygon.closePrimitive();
|
|
1938 |
|
|
1939 |
return polygon;
|
|
1939 | 1940 |
} |
1940 | 1941 |
|
1941 | 1942 |
public void setSurface(Surface surface){ |
Also available in: Unified diff