144 |
|
|
145 |
return new ConcurrentLinkedQueue<Adresse>(postListe); |
return new ConcurrentLinkedQueue<Adresse>(postListe); |
146 |
} |
} |
|
|
|
147 |
|
|
148 |
public Adresse[] hentDaekkedeAdresserCache( BoundingBox bbox) { |
public Adresse[] hentDaekkedeAdresserCache( BoundingBox bbox, Adresse adresseListe[] ) { |
149 |
long start = System.currentTimeMillis(); |
long start = System.currentTimeMillis(); |
150 |
ArrayList<Adresse> list = new ArrayList<Adresse>(); |
ArrayList<Adresse> list = new ArrayList<Adresse>(); |
151 |
for (Adresse a : alleAdresser) { |
for (Adresse a : adresseListe) { |
152 |
if ( a.latitude > bbox.latitudeMin && a.latitude< bbox.latitudeMax && a.longitude> bbox.longitudeMin && a.longitude < bbox.longitudeMax) { |
if ( a.latitude > bbox.latitudeMin && a.latitude< bbox.latitudeMax && a.longitude> bbox.longitudeMin && a.longitude < bbox.longitudeMax) { |
153 |
list.add(a); |
list.add(a); |
154 |
} |
} |
157 |
logger.info("Elapsed cache: " + (stop - start)); |
logger.info("Elapsed cache: " + (stop - start)); |
158 |
return list.toArray( new Adresse[ list.size() ] ); |
return list.toArray( new Adresse[ list.size() ] ); |
159 |
} |
} |
160 |
|
|
161 |
|
|
162 |
|
public Adresse[] hentDaekkedeAdresserCache( BoundingBox bbox) { |
163 |
|
return hentDaekkedeAdresserCache(bbox, alleAdresser); |
164 |
|
} |
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
|
169 |
public Adresse[] hentAlleDaekkedeAdresser() throws SQLException { |
public Adresse[] hentAlleDaekkedeAdresser() throws SQLException { |