Revision 27064 branches/v2_0_0_prep/libraries/libGeocoding/src/org/gvsig/geocoding/styles/SimpleRange.java
SimpleRange.java | ||
---|---|---|
63 | 63 |
private RelationsComponent lastNumber; |
64 | 64 |
|
65 | 65 |
/** |
66 |
* Set relation component that define the field of data source that it has |
|
67 |
* the first number of the feature |
|
66 | 68 |
* |
67 | 69 |
* @return |
68 | 70 |
*/ |
... | ... | |
71 | 73 |
} |
72 | 74 |
|
73 | 75 |
/** |
76 |
* Set relation component that define the field of data source that it has |
|
77 |
* the first number of the feature |
|
74 | 78 |
* |
75 | 79 |
* @param firstNumber |
76 | 80 |
*/ |
... | ... | |
79 | 83 |
} |
80 | 84 |
|
81 | 85 |
/** |
86 |
* get relation component that define the field of data source that it has |
|
87 |
* the last number of the feature |
|
82 | 88 |
* |
83 | 89 |
* @return |
84 | 90 |
*/ |
... | ... | |
87 | 93 |
} |
88 | 94 |
|
89 | 95 |
/** |
96 |
* Set relation component that define the field of data source that it has |
|
97 |
* the last number of the feature |
|
90 | 98 |
* |
91 | 99 |
* @param lastNumber |
92 | 100 |
*/ |
... | ... | |
129 | 137 |
} |
130 | 138 |
|
131 | 139 |
/** |
140 |
* spatial search over the geometries |
|
132 | 141 |
* |
142 |
* @param lists |
|
143 |
* list of lists with ScoredFeatures |
|
144 |
* @param address |
|
145 |
* @return |
|
133 | 146 |
*/ |
134 | 147 |
@Override |
135 |
public Set<GeocodingResult> match(List<List<ScoredFeature>> inLists, Address address) { |
|
148 |
public Set<GeocodingResult> match(List<List<ScoredFeature>> inLists, |
|
149 |
Address address) { |
|
136 | 150 |
Set<GeocodingResult> outFeats = new TreeSet<GeocodingResult>(); |
137 | 151 |
|
138 | 152 |
FeatureAttributeDescriptor firstNumberDesc = this.getFirstNumber() |
139 | 153 |
.getValue(); |
140 | 154 |
FeatureAttributeDescriptor lastNumbnerDesc = this.getLastNumber() |
141 | 155 |
.getValue(); |
142 |
|
|
143 |
//Get the list |
|
156 |
|
|
157 |
// Get the list
|
|
144 | 158 |
List<ScoredFeature> inFeats = inLists.get(0); |
145 | 159 |
|
146 |
for (ScoredFeature feat : inFeats) {
|
|
160 |
for (ScoredFeature feat : inFeats) { |
|
147 | 161 |
|
148 | 162 |
int number = ((NumberAddress) address).getNumber(); |
149 | 163 |
|
... | ... | |
162 | 176 |
} |
163 | 177 |
|
164 | 178 |
/** |
179 |
* Calculate point over the geometry (line) |
|
165 | 180 |
* |
166 | 181 |
* @param feat |
182 |
* feature |
|
167 | 183 |
* @param number |
184 |
* of address |
|
168 | 185 |
* @param first |
186 |
* number of feature geometry |
|
169 | 187 |
* @param last |
188 |
* number of feature geometry |
|
170 | 189 |
* @return |
171 | 190 |
*/ |
172 | 191 |
private GeomMatchResult calculatePosition(ScoredFeature feat, int number, |
... | ... | |
189 | 208 |
} |
190 | 209 |
|
191 | 210 |
/** |
211 |
* calculate relative position over line with number of address from initial |
|
212 |
* number and last number of the geom |
|
192 | 213 |
* |
193 | 214 |
* @param number |
215 |
* of address |
|
194 | 216 |
* @param first |
217 |
* number of geometry |
|
195 | 218 |
* @param last |
219 |
* number of geometry |
|
196 | 220 |
* @return |
197 | 221 |
*/ |
198 | 222 |
private int calculateRelativeDistance(int number, int first, int last) { |
Also available in: Unified diff