/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Database.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Database.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2423 by torben, Tue Mar 3 08:30:02 2015 UTC revision 2424 by torben, Tue Mar 3 08:52:39 2015 UTC
# Line 144  public class Database { Line 144  public class Database {
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                          }                          }
# Line 158  public class Database { Line 157  public class Database {
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 {

Legend:
Removed from v.2423  
changed lines
  Added in v.2424

  ViewVC Help
Powered by ViewVC 1.1.20