Revision 28375 branches/v2_0_0_prep/libraries/libGeocoding/src/org/gvsig/geocoding/styles/impl/SimpleCentroid.java
SimpleCentroid.java | ||
---|---|---|
36 | 36 |
import java.util.TreeSet; |
37 | 37 |
|
38 | 38 |
import org.gvsig.fmap.dal.exception.DataException; |
39 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
40 | 39 |
import org.gvsig.fmap.geom.Geometry; |
41 | 40 |
import org.gvsig.fmap.geom.primitive.Point; |
42 | 41 |
import org.gvsig.fmap.geom.util.Converter; |
... | ... | |
58 | 57 |
import org.slf4j.LoggerFactory; |
59 | 58 |
|
60 | 59 |
/** |
61 |
* Geocoding style with search by centroid. Search of the centroid of points, |
|
60 |
* Implemented Geocoding style with search by centroid. Search of the centroid of points,
|
|
62 | 61 |
* lines or polygons geometries. |
63 | 62 |
* |
64 | 63 |
* @author <a href="mailto:jsanz@prodevelop.es"> Jorge Gaspar Sanz Salinas</a> |
... | ... | |
89 | 88 |
// to make the dissolve process |
90 | 89 |
RelationsComponent rComp0 = (RelationsComponent) this |
91 | 90 |
.getRelationsLiteral().get(0); |
92 |
FeatureAttributeDescriptor descriptDissol = (FeatureAttributeDescriptor) rComp0 |
|
93 |
.getValue(); |
|
91 |
String descriptDissol = rComp0.getValue(); |
|
94 | 92 |
|
95 | 93 |
// Get the first list |
96 | 94 |
List<ScoredFeature> firstListFeatures = inLists.get(0); |
... | ... | |
153 | 151 |
* @return list with dissolved features |
154 | 152 |
* @throws DataException |
155 | 153 |
*/ |
156 |
private List<DissolveResult> dissolveScoredFeatures( |
|
157 |
FeatureAttributeDescriptor field, List<ScoredFeature> features) |
|
158 |
throws DataException { |
|
154 |
private List<DissolveResult> dissolveScoredFeatures(String field, |
|
155 |
List<ScoredFeature> features) throws DataException { |
|
159 | 156 |
|
160 | 157 |
List<DissolveResult> listResults = new ArrayList<DissolveResult>(); |
161 | 158 |
|
... | ... | |
211 | 208 |
for (Object obj : relLiteral) { |
212 | 209 |
RelationsComponent rel = (RelationsComponent) obj; |
213 | 210 |
String key = rel.getKeyElement(); |
214 |
FeatureAttributeDescriptor desc = rel.getValue(); |
|
215 |
String fieldName = desc.getName(); |
|
211 |
String fieldName = rel.getValue(); |
|
216 | 212 |
Object object = null; |
217 | 213 |
String value = ""; |
218 | 214 |
try { |
... | ... | |
265 | 261 |
* @param state |
266 | 262 |
*/ |
267 | 263 |
public void saveToState(PersistentState state) throws PersistenceException { |
268 |
|
|
264 |
super.saveToState(state); |
|
269 | 265 |
} |
270 | 266 |
|
271 | 267 |
/** |
... | ... | |
274 | 270 |
* @param state |
275 | 271 |
*/ |
276 | 272 |
public void setState(PersistentState state) throws PersistenceException { |
277 |
|
|
273 |
super.setState(state); |
|
278 | 274 |
} |
279 | 275 |
} |
Also available in: Unified diff