Revision 27064 branches/v2_0_0_prep/libraries/libGeocoding/src/org/gvsig/geocoding/styles/DoubleRange.java
DoubleRange.java | ||
---|---|---|
66 | 66 |
private RelationsComponent lastRightNumber; |
67 | 67 |
|
68 | 68 |
/** |
69 |
* Get relation component that define the field of data source that it has |
|
70 |
* the first left number of the feature |
|
69 | 71 |
* |
70 | 72 |
* @return |
71 | 73 |
*/ |
... | ... | |
74 | 76 |
} |
75 | 77 |
|
76 | 78 |
/** |
79 |
* Set relation component that define the field of data source that it has |
|
80 |
* the first left number of the feature |
|
77 | 81 |
* |
78 | 82 |
* @param firstLeftNumber |
79 | 83 |
*/ |
... | ... | |
82 | 86 |
} |
83 | 87 |
|
84 | 88 |
/** |
89 |
* Get relation component that define the field of data source that it has |
|
90 |
* the first right number of the feature |
|
85 | 91 |
* |
86 | 92 |
* @return |
87 | 93 |
*/ |
... | ... | |
90 | 96 |
} |
91 | 97 |
|
92 | 98 |
/** |
99 |
* Set relation component that define the field of data source that it has |
|
100 |
* the first right number of the feature |
|
93 | 101 |
* |
94 | 102 |
* @param firstRightNumber |
95 | 103 |
*/ |
... | ... | |
98 | 106 |
} |
99 | 107 |
|
100 | 108 |
/** |
109 |
* Get relation component that define the field of data source that it has |
|
110 |
* the last left number of the feature |
|
101 | 111 |
* |
102 | 112 |
* @return |
103 | 113 |
*/ |
... | ... | |
106 | 116 |
} |
107 | 117 |
|
108 | 118 |
/** |
119 |
* Set relation component that define the field of data source that it has |
|
120 |
* the last left number of the feature |
|
109 | 121 |
* |
110 | 122 |
* @param lastLeftNumber |
111 | 123 |
*/ |
... | ... | |
114 | 126 |
} |
115 | 127 |
|
116 | 128 |
/** |
129 |
* Get relation component that define the field of data source that it has |
|
130 |
* the last right number of the feature |
|
117 | 131 |
* |
118 | 132 |
* @return |
119 | 133 |
*/ |
... | ... | |
122 | 136 |
} |
123 | 137 |
|
124 | 138 |
/** |
139 |
* Set relation component that define the field of data source that it has |
|
140 |
* the last right number of the feature |
|
125 | 141 |
* |
126 | 142 |
* @param lastRightNumber |
127 | 143 |
*/ |
... | ... | |
169 | 185 |
} |
170 | 186 |
|
171 | 187 |
/** |
188 |
* spatial search over the geometries |
|
172 | 189 |
* |
190 |
* @param lists |
|
191 |
* list of lists with ScoredFeatures |
|
192 |
* @param address |
|
193 |
* @return |
|
173 | 194 |
*/ |
174 | 195 |
@Override |
175 |
public Set<GeocodingResult> match(List<List<ScoredFeature>> inLists, Address address) { |
|
196 |
public Set<GeocodingResult> match(List<List<ScoredFeature>> inLists, |
|
197 |
Address address) { |
|
176 | 198 |
|
177 | 199 |
Set<GeocodingResult> outFeats = new TreeSet<GeocodingResult>(); |
178 | 200 |
|
... | ... | |
184 | 206 |
.getFirstRightNumber().getValue(); |
185 | 207 |
FeatureAttributeDescriptor lastRightNumberDesc = this |
186 | 208 |
.getLastRightNumber().getValue(); |
187 |
|
|
209 |
|
|
188 | 210 |
// get the list |
189 | 211 |
List<ScoredFeature> inFeats = inLists.get(0); |
190 | 212 |
|
191 | 213 |
int number = ((NumberAddress) address).getNumber(); |
192 | 214 |
|
193 | 215 |
for (ScoredFeature feat : inFeats) { |
194 |
|
|
216 |
|
|
195 | 217 |
int firstL = feat.getInt(firstLeftNumberDesc.getName()); |
196 | 218 |
int lastL = feat.getInt(lastLeftNumberDesc.getName()); |
197 | 219 |
int firstR = feat.getInt(firstRightNumberDesc.getName()); |
... | ... | |
248 | 270 |
} |
249 | 271 |
|
250 | 272 |
/** |
273 |
* Calculate the relative distance in line |
|
251 | 274 |
* |
252 | 275 |
* @param number |
253 | 276 |
* @param first |
... | ... | |
261 | 284 |
} |
262 | 285 |
|
263 | 286 |
/** |
287 |
* calculate the position |
|
264 | 288 |
* |
265 | 289 |
* @param feat |
266 | 290 |
* @param number |
... | ... | |
288 | 312 |
} |
289 | 313 |
|
290 | 314 |
/** |
315 |
* Calculate the position with a offset positive or negative |
|
291 | 316 |
* |
292 | 317 |
* @param feat |
293 | 318 |
* @param number |
Also available in: Unified diff