Statistics
| Revision:

gvsig-geoprocess / org.gvsig.sextante / trunk / org.gvsig.sextante.app / org.gvsig.sextante.app.algorithm / org.gvsig.sextante.app.algorithm.dissolve / src / main / java / org / gvsig / sextante / app / algorithm / dissolve / IDissolveRule.java @ 172

History | View | Annotate | Download (1.89 KB)

1
/*
2
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2010 Generalitat Valenciana.
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 2
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 */
20

    
21
package org.gvsig.sextante.app.algorithm.dissolve;
22

    
23
import com.vividsolutions.jts.geom.Geometry;
24

    
25
import org.gvsig.fmap.dal.feature.Feature;
26

    
27

    
28
/**
29
 * Forces to IDissolveCriteria to fetch geometries from 
30
 * ReadableVectorial (for performance reasons, once a criteria
31
 * has verified a spatial conditions, it caches IGeometry, to
32
 * avoid reading them many times)
33
 * @author azabala
34
 *
35
 */
36
public interface IDissolveRule {
37
        /**
38
         * Verifies if the given geometries will be dissolved 
39
         * @param g1
40
         * @param g2
41
         * @param f
42
         * @return true if the given geometries will be dissolved or false 
43
         * if not.
44
         */
45
        public boolean verifyIfDissolve(Geometry g1, Geometry g2, Feature f1, Feature f2);
46
        
47
        /**
48
         * Returns true if the selected function is included in the summary
49
         * @param func
50
         * @return
51
         */
52
        public boolean isFunctionIncluded(String func);
53
        
54
        /**
55
         * Returns the name of the field for the selected function
56
         * @return
57
         */
58
        public String getFieldName(String func);
59
        
60
        /**
61
         * Gets the index of the field to apply the dissolve rule
62
         * @return
63
         */
64
        public int getIndexField();
65
}
66