Revision 47160

View differences:

tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/test/resources/log4j.xml
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2013 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 3
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
28

  
29
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
30

  
31
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
32
		<layout class="org.apache.log4j.PatternLayout">
33
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
34
		</layout>
35
	</appender>
36

  
37
	<category name="org.gvsig.tools">
38
		<priority value="DEBUG" />
39
	</category>
40
	<category name="org.gvsig.fmap.mapcontext">
41
		<priority value="DEBUG" /> 
42
	</category>
43

  
44
	<root>
45
		<priority value="INFO" />
46
		<appender-ref ref="CONSOLE" />
47
	</root>
48
</log4j:configuration>
0 49

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/java/org/gvsig/fmap/geom/operation/Draw.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.geom.operation;
25

  
26
import java.awt.geom.AffineTransform;
27

  
28

  
29
import org.gvsig.fmap.geom.Geometry;
30
import org.gvsig.fmap.geom.GeometryManager;
31
import org.gvsig.fmap.geom.GeometryLocator;
32

  
33
public class Draw extends GeometryOperation{
34
	public static final String NAME = "draw";
35
	public static int CODE = Integer.MIN_VALUE;
36

  
37
	public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException {
38
		DrawOperationContext doc = (DrawOperationContext)ctx;
39
		AffineTransform at = doc.getViewPort().getAffineTransform();		
40
		doc.getSymbol().draw(doc.getGraphics(), at, geom, doc.getFeature(),
41
				doc.getCancellable());
42
		return null;
43
	}
44

  
45
	public int getOperationIndex() {
46
		return CODE;
47
	}
48

  
49
	public static void register() {
50
		
51
		GeometryManager geoMan = GeometryLocator.getGeometryManager();
52
		CODE = geoMan.getGeometryOperationCode(NAME);
53
		geoMan.registerGeometryOperation(NAME, new Draw());
54
	}
55

  
56
}
0 57

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/java/org/gvsig/fmap/geom/operation/AggregateDrawInts.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.geom.operation;
25

  
26
import org.gvsig.fmap.geom.Geometry;
27
import org.gvsig.fmap.geom.GeometryLocator;
28
import org.gvsig.fmap.geom.GeometryManager;
29
import org.gvsig.fmap.geom.Geometry.TYPES;
30
import org.gvsig.fmap.geom.aggregate.Aggregate;
31
import org.slf4j.Logger;
32
import org.slf4j.LoggerFactory;
33

  
34
/**
35
 * @author jmvivo
36
 *
37
 */
38
public class AggregateDrawInts extends GeometryOperation {
39
	public static final String NAME = "drawInts";
40
	public static int CODE = Integer.MIN_VALUE;
41

  
42
	
43
	final static private Logger logger = LoggerFactory
44
			.getLogger(DrawInts.class);
45

  
46
	/* (non-Javadoc)
47
	 * @see org.gvsig.fmap.geom.operation.GeometryOperation#getOperationIndex()
48
	 */
49
	public int getOperationIndex() {
50
		return CODE;
51
	}
52

  
53
	/* (non-Javadoc)
54
	 * @see org.gvsig.fmap.geom.operation.GeometryOperation#invoke(org.gvsig.fmap.geom.Geometry, org.gvsig.fmap.geom.operation.GeometryOperationContext)
55
	 */
56
	public Object invoke(Geometry geom, GeometryOperationContext ctx)
57
			throws GeometryOperationException {
58

  
59
		Aggregate aggregate = (Aggregate) geom;
60
		for (int i=0;i<aggregate.getPrimitivesNumber();i++){
61
			Geometry prim = aggregate.getPrimitiveAt(i);
62
			try {
63
				prim.invokeOperation(CODE, ctx);
64
			} catch (GeometryOperationNotSupportedException e) {
65
				throw new GeometryOperationException(e);
66
			}
67
		}
68
		return null;
69
	}
70

  
71
	public static void register() {
72
		GeometryManager geoMan = GeometryLocator.getGeometryManager();
73

  
74
		CODE = geoMan.getGeometryOperationCode(NAME);
75
		
76
		geoMan.registerGeometryOperation(NAME, new AggregateDrawInts(),
77
				TYPES.AGGREGATE);
78
		geoMan.registerGeometryOperation(NAME, new AggregateDrawInts(),
79
				TYPES.MULTIPOINT);
80
		geoMan.registerGeometryOperation(NAME, new AggregateDrawInts(),
81
				TYPES.MULTICURVE);
82
		geoMan.registerGeometryOperation(NAME, new AggregateDrawInts(),
83
				TYPES.MULTISURFACE);
84
		geoMan.registerGeometryOperation(NAME, new AggregateDrawInts(),
85
				TYPES.MULTISOLID);
86

  
87
	}
88

  
89
}
0 90

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/java/org/gvsig/fmap/geom/operation/DrawOperationContext.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.geom.operation;
25

  
26
import java.awt.Graphics2D;
27

  
28
import org.gvsig.fmap.dal.feature.Feature;
29
import org.gvsig.fmap.mapcontext.ViewPort;
30
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
31
import org.gvsig.tools.task.Cancellable;
32

  
33

  
34
public class DrawOperationContext extends GeometryOperationContext{
35
	private ISymbol symbol=null;
36
	private Graphics2D graphics=null;
37
	private Cancellable cancellable;
38
	private double dpi;
39
	private double scale;
40
	private boolean hasDPI=false;
41
	private ViewPort viewPort;
42
	private Feature feature;
43
	
44
	public ViewPort getViewPort() {
45
		return viewPort;
46
	}
47
	public void setViewPort(ViewPort viewPort) {
48
		this.viewPort = viewPort;
49
	}
50
	public Graphics2D getGraphics() {
51
		return graphics;
52
	}
53
	public void setGraphics(Graphics2D graphics) {
54
		this.graphics = graphics;
55
	}
56
	public ISymbol getSymbol() {
57
		return symbol;
58
	}
59
	public void setSymbol(ISymbol symbol) {
60
		this.symbol = symbol;
61
	}
62
	public void setCancellable(Cancellable cancel) {
63
		this.cancellable=cancel;
64

  
65
	}
66
	public Cancellable getCancellable() {
67
		return cancellable;
68
	}
69
	public void setDPI(double dpi) {
70
		this.hasDPI=true;
71
		this.dpi=dpi;
72
	}
73
	public double getDPI(){
74
		return dpi;
75
	}
76
	public boolean hasDPI() {
77
		return hasDPI;
78
	}
79
	/**
80
	 * @param scale the scale to set
81
	 */
82
	public void setScale(double scale) {
83
		this.scale = scale;
84
	}
85
	/**
86
	 * @return the scale
87
	 */
88
	public double getScale() {
89
		return scale;
90
	}
91
	public Feature getFeature() {
92
		return feature;
93
	}
94
	public void setFeature(Feature feature) {
95
		this.feature = feature;
96
	}
97

  
98
}
0 99

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/java/org/gvsig/fmap/geom/operation/MapContextGeomOperationsLibrary.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.geom.operation;
25

  
26
import org.gvsig.fmap.mapcontext.MapContextLibrary;
27
import org.gvsig.tools.library.AbstractLibrary;
28
import org.gvsig.tools.library.LibraryException;
29

  
30
/**
31
 * @author jmvivo
32
 *
33
 */
34
public class MapContextGeomOperationsLibrary extends AbstractLibrary {
35

  
36
    public void doRegistration() {
37
        registerAsServiceOf(MapContextLibrary.class);
38
    }
39

  
40
	protected void doInitialize() throws LibraryException {
41
	}
42

  
43
	protected void doPostInitialize() throws LibraryException {
44
		// Register Draw Operations
45
		Draw.register();
46
		DrawInts.register();
47
		AggregateDrawInts.register();
48
		AggregateDraw.register();
49
	}
50

  
51
}
0 52

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/java/org/gvsig/fmap/geom/operation/AggregateDraw.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.geom.operation;
25

  
26
import org.gvsig.fmap.geom.Geometry;
27
import org.gvsig.fmap.geom.GeometryLocator;
28
import org.gvsig.fmap.geom.GeometryManager;
29
import org.gvsig.fmap.geom.Geometry.TYPES;
30
import org.gvsig.fmap.geom.aggregate.Aggregate;
31
import org.slf4j.Logger;
32
import org.slf4j.LoggerFactory;
33

  
34
/**
35
 * @author Vicente Caballero Navarro
36
 *
37
 */
38
public class AggregateDraw extends GeometryOperation {
39
	
40
	public static final String NAME = "draw";
41
	public static int CODE = Integer.MIN_VALUE;
42

  
43
	final static private Logger logger = LoggerFactory
44
	.getLogger(AggregateDraw.class);
45

  
46
	/* (non-Javadoc)
47
	 * @see org.gvsig.fmap.geom.operation.GeometryOperation#getOperationIndex()
48
	 */
49
	public int getOperationIndex() {
50
		return CODE;
51
	}
52

  
53
	/* (non-Javadoc)
54
	 * @see org.gvsig.fmap.geom.operation.GeometryOperation#invoke(org.gvsig.fmap.geom.Geometry, org.gvsig.fmap.geom.operation.GeometryOperationContext)
55
	 */
56
	public Object invoke(Geometry geom, GeometryOperationContext ctx)
57
	throws GeometryOperationException {
58

  
59
		Aggregate aggregate = (Aggregate) geom;
60
		for (int i=0;i<aggregate.getPrimitivesNumber();i++){
61
			Geometry prim = aggregate.getPrimitiveAt(i);
62
			try {
63
				prim.invokeOperation(CODE, ctx);
64
			} catch (GeometryOperationNotSupportedException e) {
65
				throw new GeometryOperationException(e);
66
			}
67
		}
68
		return null;
69
	}
70

  
71
	public static void register() {
72
		GeometryManager geoMan = GeometryLocator.getGeometryManager();
73
		
74
		CODE = geoMan.getGeometryOperationCode(NAME);
75

  
76
		geoMan.registerGeometryOperation(NAME, new AggregateDraw(),
77
				TYPES.AGGREGATE);
78
		geoMan.registerGeometryOperation(NAME, new AggregateDraw(),
79
				TYPES.MULTIPOINT);
80
		geoMan.registerGeometryOperation(NAME, new AggregateDraw(),
81
				TYPES.MULTICURVE);
82
		geoMan.registerGeometryOperation(NAME, new AggregateDraw(),
83
				TYPES.MULTISURFACE);
84
		geoMan.registerGeometryOperation(NAME, new AggregateDraw(),
85
				TYPES.MULTISOLID);
86

  
87
	}
88

  
89
}
0 90

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/java/org/gvsig/fmap/geom/operation/DrawInts.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.geom.operation;
25

  
26
import java.awt.Graphics2D;
27
import java.awt.geom.AffineTransform;
28
import java.awt.geom.PathIterator;
29

  
30
import org.slf4j.Logger;
31
import org.slf4j.LoggerFactory;
32

  
33
import org.gvsig.fmap.geom.Geometry;
34
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
35
import org.gvsig.fmap.geom.GeometryException;
36
import org.gvsig.fmap.geom.GeometryLocator;
37
import org.gvsig.fmap.geom.GeometryManager;
38
import org.gvsig.fmap.geom.aggregate.MultiLine;
39
import org.gvsig.fmap.geom.aggregate.MultiPolygon;
40
import org.gvsig.fmap.geom.aggregate.MultiSurface;
41
import org.gvsig.fmap.geom.exception.CreateGeometryException;
42
import org.gvsig.fmap.geom.primitive.Curve;
43
import org.gvsig.fmap.geom.primitive.GeneralPathX;
44
import org.gvsig.fmap.geom.primitive.Surface;
45
import org.gvsig.fmap.geom.type.GeometryType;
46
import org.gvsig.fmap.mapcontext.ViewPort;
47
import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport;
48
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
49
import org.gvsig.tools.task.Cancellable;
50

  
51
/**
52
 * @author gvSIG Team
53
 *
54
 */
55
public class DrawInts extends GeometryOperation {
56
	private static final GeometryManager geomManager = GeometryLocator.getGeometryManager();
57
	public static final String NAME = "drawInts";
58
	public static int CODE = Integer.MIN_VALUE;
59

  
60
	final static private Logger logger = LoggerFactory.getLogger(DrawInts.class);
61

  
62
	public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException{
63
		DrawOperationContext doc=(DrawOperationContext)ctx;
64
		ViewPort viewPort = doc.getViewPort();
65
		ISymbol symbol = doc.getSymbol();
66
		Graphics2D g=doc.getGraphics();
67
		Cancellable cancel=doc.getCancellable();
68
        try {
69
            if (doc.hasDPI()) {
70
                double previousSize = ((CartographicSupport) symbol).toCartographicSize(viewPort, doc.getDPI(), geom);
71
                // draw it as normally
72
                Geometry transformedGeometry;
73
                transformedGeometry = transformGeometry(geom.cloneGeometry(), viewPort.getAffineTransform());
74

  
75
                // the AffineTransform has to be null because the transformToInts method reprojects the geometry
76
                symbol.draw(g, null, transformedGeometry, doc.getFeature(), cancel);
77

  
78
                // restore previous size
79
                ((CartographicSupport) symbol).setCartographicSize(previousSize, geom);
80
            } else {
81
                // Geometry decimatedShape = transformToInts(geom, viewPort.getAffineTransform());
82
                Geometry transformedGeometry = transformGeometry(geom.cloneGeometry(), viewPort.getAffineTransform());
83
                symbol.draw(g, viewPort.getAffineTransform(), transformedGeometry, doc.getFeature(), cancel);
84
            }
85
        } catch (GeometryException e) {
86
		    throw new GeometryOperationException(e);
87
		}
88

  
89
		return null;
90
	}
91

  
92
	/**
93
     * @param geom
94
     * @param affineTransform
95
     * @return
96
	 * @throws GeometryException
97
     */
98
    private Geometry transformGeometry(Geometry geom, AffineTransform affineTransform) throws GeometryException {
99
        if(geom.canBeTransformed(affineTransform)){
100
            geom.transform(affineTransform);
101
            return geom;
102
        }
103
        if(geom instanceof Curve || geom instanceof Curve){
104
            MultiLine lines = geom.toLines();
105
            lines.transform(affineTransform);
106
            return lines;
107
        }
108
        if(geom instanceof Surface || geom instanceof MultiSurface){
109
            MultiPolygon polygons = geom.toPolygons();
110
            polygons.transform(affineTransform);
111
            return polygons;
112
        }
113
        return null;
114
    }
115

  
116
    public int getOperationIndex() {
117
		return CODE;
118
	}
119

  
120
	private Geometry transformToInts(Geometry gp, AffineTransform at) throws CreateGeometryException {
121
		GeneralPathX newGp = new GeneralPathX();
122
		double[] theData = new double[6];
123
		double[] aux = new double[6];
124

  
125
		// newGp.reset();
126
		PathIterator theIterator;
127
		int theType;
128
		int numParts = 0;
129

  
130
		java.awt.geom.Point2D ptDst = new java.awt.geom.Point2D.Double();
131
		java.awt.geom.Point2D ptSrc = new java.awt.geom.Point2D.Double();
132
		boolean bFirst = true;
133
		int xInt, yInt, antX = -1, antY = -1;
134

  
135

  
136
		theIterator = gp.getPathIterator(null); //, flatness);
137
		int numSegmentsAdded = 0;
138
		while (!theIterator.isDone()) {
139
			theType = theIterator.currentSegment(theData);
140

  
141
			switch (theType) {
142
			case PathIterator.SEG_MOVETO:
143
				numParts++;
144
				ptSrc.setLocation(theData[0], theData[1]);
145
				at.transform(ptSrc, ptDst);
146
				antX = (int) ptDst.getX();
147
				antY = (int) ptDst.getY();
148
				newGp.moveTo(antX, antY);
149
				numSegmentsAdded++;
150
				bFirst = true;
151
				break;
152

  
153
			case PathIterator.SEG_LINETO:
154
				ptSrc.setLocation(theData[0], theData[1]);
155
				at.transform(ptSrc, ptDst);
156
				xInt = (int) ptDst.getX();
157
				yInt = (int) ptDst.getY();
158
				if ((bFirst) || ((xInt != antX) || (yInt != antY)))
159
				{
160
					newGp.lineTo(xInt, yInt);
161
					antX = xInt;
162
					antY = yInt;
163
					bFirst = false;
164
					numSegmentsAdded++;
165
				}
166
				break;
167

  
168
			case PathIterator.SEG_QUADTO:
169
				at.transform(theData,0,aux,0,2);
170
				newGp.quadTo(aux[0], aux[1], aux[2], aux[3]);
171
				numSegmentsAdded++;
172
				break;
173

  
174
			case PathIterator.SEG_CUBICTO:
175
				at.transform(theData,0,aux,0,3);
176
				newGp.curveTo(aux[0], aux[1], aux[2], aux[3], aux[4], aux[5]);
177
				numSegmentsAdded++;
178
				break;
179

  
180
			case PathIterator.SEG_CLOSE:
181
				if (numSegmentsAdded < 3) {
182
					newGp.lineTo(antX, antY);
183
				}
184
				newGp.closePath();
185

  
186
				break;
187
			} //end switch
188

  
189
			theIterator.next();
190
		} //end while loop
191

  
192
		Geometry geom = null;
193
		GeometryType geometryType = gp.getGeometryType();
194

  
195
		if(geometryType.isTypeOf(Geometry.TYPES.POINT)){
196
		    geom = geomManager.createPoint(ptDst.getX(), ptDst.getY(), SUBTYPES.GEOM2D);
197
		} else if(geometryType.isTypeOf(Geometry.TYPES.MULTIPOINT)){
198
            geom = geomManager.createMultiPoint(newGp, SUBTYPES.GEOM2D);
199
		} else if(geometryType.isTypeOf(Geometry.TYPES.CURVE)){
200
		    geom = geomManager.createCurve(newGp, SUBTYPES.GEOM2D);
201
        } else if(geometryType.isTypeOf(Geometry.TYPES.MULTICURVE)){
202
            geom = geomManager.createMultiCurve(newGp, SUBTYPES.GEOM2D);
203
		} else if(geometryType.isTypeOf(Geometry.TYPES.SURFACE)){
204
		    geom = geomManager.createSurface(newGp, SUBTYPES.GEOM2D);
205
        } else if(geometryType.isTypeOf(Geometry.TYPES.MULTISURFACE)){
206
            geom = geomManager.createMultiSurface(newGp, SUBTYPES.GEOM2D);
207
		}
208
		return geom;
209
	}
210

  
211
	/**
212
	 *
213
	 */
214
	public static void register() {
215

  
216
		GeometryManager gm = GeometryLocator.getGeometryManager();
217
		CODE = gm.getGeometryOperationCode(NAME);
218
		geomManager.registerGeometryOperation(NAME, new DrawInts());
219
	}
220

  
221

  
222
}
0 223

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.fmap.geom.operation.MapContextGeomOperationsLibrary
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.operation/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<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/maven-v4_0_0.xsd">
4
  <modelVersion>4.0.0</modelVersion>
5
  <artifactId>org.gvsig.fmap.mapcontext.operation</artifactId>
6
  <packaging>jar</packaging>
7
  <name>${project.artifactId}</name>
8
  <parent>
9
      <groupId>org.gvsig</groupId>
10
      <artifactId>org.gvsig.fmap.mapcontext</artifactId>
11
       <version>2.0.327-SNAPSHOT</version>
12
  </parent>
13
  <dependencies>
14
    <dependency>
15
      <groupId>org.gvsig</groupId>
16
      <artifactId>org.gvsig.tools.lib</artifactId>
17
      <scope>compile</scope>
18
    </dependency>
19
    <dependency>
20
      <groupId>org.gvsig</groupId>
21
      <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
22
      <scope>compile</scope>
23
    </dependency>
24
    <dependency>
25
      <groupId>org.gvsig</groupId>
26
      <artifactId>org.gvsig.compat.api</artifactId>
27
      <scope>compile</scope>
28
    </dependency>
29
    <dependency>
30
      <groupId>org.gvsig</groupId>
31
      <artifactId>org.gvsig.projection.api</artifactId>
32
      <scope>compile</scope>
33
    </dependency>
34
    <dependency>
35
      <groupId>org.gvsig</groupId>
36
      <artifactId>org.gvsig.fmap.geometry.api</artifactId>
37
      <scope>compile</scope>
38
    </dependency>
39
    <dependency>
40
      <groupId>org.gvsig</groupId>
41
      <artifactId>org.gvsig.fmap.dal.api</artifactId>
42
      <scope>compile</scope>
43
    </dependency>
44
    <dependency>
45
      <groupId>org.gvsig</groupId>
46
      <artifactId>org.gvsig.timesupport.lib.api</artifactId>
47
      <scope>compile</scope>
48
    </dependency>
49
    <dependency>
50
      <groupId>org.slf4j</groupId>
51
      <artifactId>slf4j-api</artifactId>
52
      <scope>compile</scope>
53
    </dependency>
54

  
55

  
56

  
57
  </dependencies>
58

  
59
</project>
60

  
0 61

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<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/maven-v4_0_0.xsd">
4
  <modelVersion>4.0.0</modelVersion>
5
  <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
6
  <packaging>jar</packaging>
7
  <name>${project.artifactId}</name>
8
  <parent>
9
      <groupId>org.gvsig</groupId>
10
      <artifactId>org.gvsig.fmap.mapcontext</artifactId>
11
      <version>2.0.415</version>
12
  </parent>
13
  
14
  <dependencies>
15
    <dependency>
16
      <groupId>org.gvsig</groupId>
17
      <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
18
      <scope>compile</scope>
19
    </dependency>
20
  </dependencies>
21
  
22
</project>
23

  
0 24

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.fmap.mapcontext.layers.order.impl.BasicLayerOrderLibrary
2
org.gvsig.fmap.mapcontext.raster.impl.MapContextRasterLibrary
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/hsltorgb/HSLToRGBOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="HSLToRGBOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>HSLToRGBOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
19
          defaultValue="true" group="Basic">
20
          <description>Marked if it must copy the unprocessed bands</description>
21
        </field>
22
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
23
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
24
          hidden="true">
25
          <description></description>
26
        </field>
27
      </fields>
28
    </class>
29

  
30
  </classes>
31
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/rgbtohsl/RGBToHSLOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="RGBToHSLOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>RGBToHSLOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
19
          defaultValue="true" group="Basic">
20
          <description>Marked if it must copy the unprocessed bands</description>
21
        </field>
22
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
23
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
24
          hidden="true">
25
          <description></description>
26
        </field>
27
      </fields>
28
    </class>
29

  
30
  </classes>
31
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/equalization/EqualizationOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="EqualizationOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>EqualizationOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true"
12
          group="Basic"
13
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
14
          hidden="true">
15
          <description></description>
16
          <tags>
17
            <valueItem name="lookupParameter" value="output_color_interpretation" />
18
          </tags>
19
          <description></description>
20
        </field>
21
        <field name="statistics" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.buffer.api.statistics.Statistics" hidden="true">
22
          <description></description>
23
        </field>
24
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
25
          defaultValue="true" group="Basic">
26
          <description>Marked if it must copy the unprocessed bands</description>
27
        </field>
28
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
29
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
30
          hidden="true">
31
          <description></description>
32
        </field>
33
      </fields>
34
    </class>
35

  
36
  </classes>
37
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/colortable/ColorTableOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="ColorTableOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>ColorTableOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
19
          defaultValue="true" group="Basic">
20
          <description>Marked if it must copy the unprocessed bands</description>
21
        </field>
22
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
23
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
24
          hidden="true">
25
          <description></description>
26
        </field>      </fields>
27
    </class>
28

  
29
  </classes>
30
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/brightness/BrightnessOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="BrightnessOperationParameters">
7
      <extends>
8
      </extends>
9
      <description>BrightnessOperationParameters</description>
10
      <fields>
11
        <field name="brightness" type="integer" mandatory="true" group="Basic"
12
          minValue="-255" maxValue="255" defaultValue="0">
13
          <description>Integer value [-255,255]</description>
14
        </field>
15
        <field name="color_interpretation" type="object" mandatory="true"
16
          group="Basic"
17
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
18
          hidden="true">
19
          <tags>
20
            <valueItem name="lookupParameter" value="output_color_interpretation" />
21
          </tags>
22
          <description></description>
23
        </field>
24
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
25
          defaultValue="true" group="Basic">
26
          <description>Marked if it must copy the unprocessed bands</description>
27
        </field>
28
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
29
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
30
          hidden="true">
31
          <description></description>
32
        </field>
33
      </fields>
34
    </class>
35

  
36
  </classes>
37
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/grayscale/GrayScaleOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="GrayScaleOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>GrayScaleOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
19
          defaultValue="true" group="Basic">
20
          <description>Marked if it must copy the unprocessed bands</description>
21
        </field>
22
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
23
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
24
          hidden="true">
25
          <description></description>
26
        </field>
27
      </fields>
28
    </class>
29

  
30
  </classes>
31
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/colorbalancehsl/ColorBalanceHSLOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="ColorBalanceHSLOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>ColorBalanceHSLOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="hue" type="double" mandatory="true" group="Basic" minValue="-180" maxValue="180" defaultValue="0">
19
          <description>Double value [-180,180]</description>
20
        </field>
21
        <field name="lightness" type="double" mandatory="true" group="Basic" minValue="-100" maxValue="100" defaultValue="0">
22
          <description>Double value [-100,100]</description>
23
        </field>
24
        <field name="saturation" type="double" mandatory="true" group="Basic" minValue="-100" maxValue="100" defaultValue="0">
25
          <description>Double value [-100,100]</description>
26
        </field>
27
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
28
          defaultValue="true" group="Basic">
29
          <description>Marked if it must copy the unprocessed bands</description>
30
        </field>
31
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
32
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
33
          hidden="true">
34
          <description></description>
35
        </field>
36

  
37
      </fields>
38
    </class>
39

  
40
  </classes>
41
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/colorbalancecmy/ColorBalanceCMYOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="ColorBalanceCMYOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>ColorBalanceCMYOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="cyan" type="integer" mandatory="true" group="Basic" minValue="0" maxValue="100" defaultValue="0">
19
          <description>Integer value [0,100]</description>
20
        </field>
21
        <field name="magenta" type="integer" mandatory="true" group="Basic" minValue="0" maxValue="100" defaultValue="0">
22
          <description>Integer value [0,100]</description>
23
        </field>
24
        <field name="yellow" type="integer" mandatory="true" group="Basic" minValue="0" maxValue="100" defaultValue="0">
25
          <description>Integer value [0,100]</description>
26
        </field>
27
        <field name="luminosity" type="boolean" mandatory="false" group="Basic" defaultValue="false">
28
          <description>Marked if it must respect the luminosity</description>
29
        </field>
30
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
31
          defaultValue="true" group="Basic">
32
          <description>Marked if it must copy the unprocessed bands</description>
33
        </field>
34
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
35
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
36
          hidden="true">
37
          <description></description>
38
        </field>
39

  
40
      </fields>
41
    </class>
42

  
43
  </classes>
44
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/contrast/ContrastOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="ContrastOperationParameters">
7
      <extends>
8
      </extends>
9
      <description>ContrastOperationParameters</description>
10
      <fields>
11
        <field name="contrast" type="integer" mandatory="true" group="Basic"
12
          minValue="-255" maxValue="255" defaultValue="0">
13
          <description>Integer value [-255,255]</description>
14
        </field>
15
        <field name="color_interpretation" type="object" mandatory="true"
16
          group="Basic"
17
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
18
          hidden="true">
19
          <description></description>
20
          <tags>
21
            <valueItem name="lookupParameter" value="output_color_interpretation" />
22
          </tags>
23
          <description></description>
24
        </field>
25
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
26
          defaultValue="true" group="Basic">
27
          <description>Marked if it must copy the unprocessed bands</description>
28
        </field>
29
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
30
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
31
          hidden="true">
32
          <description></description>
33
        </field>
34

  
35
      </fields>
36
    </class>
37

  
38
  </classes>
39
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/pansharpening/PansharpeningOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="PansharpeningOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>PansharpeningOperationParameters</description>
10
      <fields>
11
        <field name="statistics" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.buffer.api.statistics.Statistics">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
19
          <description></description>
20
        </field>
21
        <!-- <field name="bands_to_process" type="List" typeOfItems="integer" mandatory="false" group="Basic">
22
          <description></description>
23
        </field> -->
24
      </fields>
25
    </class>
26

  
27
  </classes>
28
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/colorbalancergb/ColorBalanceRGBOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="ColorBalanceRGBOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>ColorBalanceRGBOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="red" type="integer" mandatory="true" group="Basic" minValue="0" maxValue="100" defaultValue="50">
19
          <description>Integer value [-100,100]</description>
20
        </field>
21
        <field name="green" type="integer" mandatory="true" group="Basic" minValue="0" maxValue="100" defaultValue="50">
22
          <description>Integer value [-100,100]</description>
23
        </field>
24
        <field name="blue" type="integer" mandatory="true" group="Basic" minValue="0" maxValue="100" defaultValue="50">
25
          <description>Integer value [-100,100]</description>
26
        </field>
27
        <field name="luminosity" type="boolean" mandatory="false" group="Basic" defaultValue="false">
28
          <description>Marked if it must copy the unprocessed bands</description>
29
        </field>
30
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
31
          defaultValue="true" group="Basic">
32
          <description>Marked if it must copy the unprocessed bands</description>
33
        </field>
34
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
35
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
36
          hidden="true">
37
          <description></description>
38
        </field>
39

  
40

  
41
      </fields>
42
    </class>
43

  
44
  </classes>
45
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/cmyktorgb/CMYKToRGBOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="CMYKToRGBOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>CMYKToRGBOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
19
          defaultValue="true" group="Basic">
20
          <description>Marked if it must copy the unprocessed bands</description>
21
        </field>
22
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
23
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
24
          hidden="true">
25
          <description></description>
26
        </field>      </fields>
27
    </class>
28

  
29
  </classes>
30
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/raster/lib/legend/impl/operations/rgbtocmyk/RGBToCMYKOperationParameters.xml
1
<?xml version="1.0"?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5

  
6
    <class name="RGBToCMYKOperationParameters">
7
       <extends>
8
      </extends>
9
      <description>RGBToCMYKOperationParameters</description>
10
      <fields>
11
        <field name="color_interpretation" type="object" mandatory="true" group="Basic" classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation" hidden="true">
12
          <description></description>
13
          <tags>
14
            <valueItem name="lookupParameter" value="output_color_interpretation" />
15
          </tags>
16
          <description></description>
17
        </field>
18
        <field name="copy_unprocessed_bands" type="boolean" mandatory="false"
19
          defaultValue="true" group="Basic">
20
          <description>Marked if it must copy the unprocessed bands</description>
21
        </field>
22
        <field name="output_color_interpretation" type="object" mandatory="false" group="Basic"
23
          classOfValue="org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation"
24
          hidden="true">
25
          <description></description>
26
        </field>      </fields>
27
    </class>
28

  
29
  </classes>
30
</definitions>
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/fmap/mapcontext/impl/i18n/text.properties
1
_Raster_at_bottom_then_polygons_lines_points=Capas de im?genes en el fondo, despu?s pol?gonos, l?neas y puntos
2
_Raster_Polygon_Line_Point_order_manager=Orden Im?genes-Pol?gonos-L?neas-Puntos
3
_Default_order=Orden por defecto
4
_Layers_are_placed_always_on_top=Las capas se colocan siempre sobre las existentes
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/resources/org/gvsig/fmap/mapcontext/impl/i18n/text_en.properties
1
_Raster_at_bottom_then_polygons_lines_points=Raster layers at bottom, then polygon, linear and point layers
2
_Raster_Polygon_Line_Point_order_manager=Raster-Polygon-Line-Point order
3
_Default_order=Default order
4
_Layers_are_placed_always_on_top=Layers are placed always on top
5

  
0 6

  
tags/org.gvsig.desktop-2.0.415/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.impl/src/main/java/org/gvsig/fmap/mapcontext/layers/order/impl/TrivialLayerOrderManager.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.mapcontext.layers.order.impl;
25

  
26
import org.gvsig.fmap.mapcontext.layers.FLayer;
27
import org.gvsig.fmap.mapcontext.layers.FLayers;
28
import org.gvsig.fmap.mapcontext.layers.order.LayerOrderManager;
29
import org.gvsig.i18n.Messages;
30
import org.gvsig.tools.ToolsLocator;
31
import org.gvsig.tools.dynobject.DynStruct;
32
import org.gvsig.tools.persistence.PersistenceManager;
33
import org.gvsig.tools.persistence.PersistentState;
34
import org.gvsig.tools.persistence.exception.PersistenceException;
35

  
36
public class TrivialLayerOrderManager implements LayerOrderManager {
37

  
38
	public static final String TRIVIAL_LAYER_ORDER_MANAGER_PERSISTENCE_NAME =
39
			"TRIVIAL_LAYER_ORDER_MANAGER_PERSISTENCE_NAME";
40

  
41
	public TrivialLayerOrderManager() {
42
		
43
	}
44
	
45
	public int getPosition(FLayers target, FLayer newLayer) {
46
		/*
47
		 * Always on top
48
		 */
49
		return target.getLayersCount();
50
	}
51

  
52
	public String getName() {
53
		return Messages.getText("_Default_order");
54
	}
55

  
56
	public String getDescription() {
57
		return Messages.getText("_Layers_are_placed_always_on_top");
58
	}
59

  
60
	public String getCode() {
61
		return this.getClass().getName();
62
	}
63
	
64
	public void loadFromState(PersistentState state) throws PersistenceException {
65
	}
66

  
67
	public void saveToState(PersistentState state) throws PersistenceException {
68
		state.set("name", this.getName());
69
	}
70
	
71
	public static void registerPersistent() {
72
		PersistenceManager manager = ToolsLocator.getPersistenceManager();
73
		if (manager.getDefinition(TRIVIAL_LAYER_ORDER_MANAGER_PERSISTENCE_NAME) == null) {
74
			DynStruct def = manager.addDefinition(
75
					TrivialLayerOrderManager.class,
76
					TRIVIAL_LAYER_ORDER_MANAGER_PERSISTENCE_NAME,
77
					TRIVIAL_LAYER_ORDER_MANAGER_PERSISTENCE_NAME +" Persistence definition",
78
					null, 
79
					null);
80
			def.addDynFieldString("name").setMandatory(true);
81
		}			
82
	}
83
	
84
	public Object clone() throws CloneNotSupportedException {
85
		return new TrivialLayerOrderManager();
86
	}
87

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff