/[projects]/dao/FuldDaekningWorker/src/main/java/dk/daoas/fulddaekning/osrm/OSRMHelper.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/main/java/dk/daoas/fulddaekning/osrm/OSRMHelper.java

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

revision 2743 by torben, Tue Oct 6 21:26:55 2015 UTC revision 2744 by torben, Wed Oct 7 19:32:00 2015 UTC
# Line 27  import com.google.gson.Gson; Line 27  import com.google.gson.Gson;
27  import dk.daoas.fulddaekning.Adresse;  import dk.daoas.fulddaekning.Adresse;
28  import dk.daoas.fulddaekning.HttpUtil;  import dk.daoas.fulddaekning.HttpUtil;
29    
30    /*
31  import dk.thoerup.osrmbinding.OSRMBinding;  import dk.thoerup.osrmbinding.OSRMBinding;
32  import dk.thoerup.osrmbinding.ViarouteResult;  import dk.thoerup.osrmbinding.ViarouteResult;
33    */
34    
35  public class OSRMHelper {  public class OSRMHelper {
36            
37            private static final boolean ENABLE_OSRM = false;
38    
39    
40          final static Logger logger = Logger.getLogger( OSRMHelper.class.toString() );          final static Logger logger = Logger.getLogger( OSRMHelper.class.toString() );
41    
42          Gson gson = new Gson();          Gson gson = new Gson();
43    
44          static OSRMBinding binding = null;          //static OSRMBinding binding = null;
45    
46          final String host = "127.0.0.1";          final String host = "127.0.0.1";
47          final int port = 5000;          final int port = 5000;
48          final String base_url = "http://" + host + ":" + port;          final String base_url = "http://" + host + ":" + port;
49    /*
50          private static synchronized void initOsrm() {          private static synchronized void initOsrm() {
51                  if (binding == null) {                  if (binding == null) {
52                          binding = new OSRMBinding("/home/openstreetmap/denmark-latest.osrm");                          binding = new OSRMBinding("/home/openstreetmap/denmark-latest.osrm");
53                  }                  }
54          }          }
55    */
56    
57          public Adresse getNearestTableHttp(Adresse a1, Collection<Adresse> haystack) {          public Adresse getNearestTableHttp(Adresse a1, Collection<Adresse> haystack) {
58    
# Line 93  public class OSRMHelper { Line 98  public class OSRMHelper {
98    
99                  return bedsteAdresse;                  return bedsteAdresse;
100          }          }
101    /*
102          public Adresse getNearestTableJni(Adresse a1, Collection<Adresse> haystack) {          public Adresse getNearestTableJni(Adresse a1, Collection<Adresse> haystack) {
103                  if (binding == null) {                  if (binding == null) {
104                          initOsrm();                          initOsrm();
# Line 133  public class OSRMHelper { Line 138  public class OSRMHelper {
138                  }                  }
139    
140                  return bedsteAdresse;                  return bedsteAdresse;
141          }          }*/
142                    
143          public Adresse getNearestViarouteHttp(Adresse a1, Collection<Adresse> haystack) {          public Adresse getNearestViarouteHttp(Adresse a1, Collection<Adresse> haystack) {
144                  int bedsteAfstand = Integer.MAX_VALUE;                  int bedsteAfstand = Integer.MAX_VALUE;
# Line 200  public class OSRMHelper { Line 205  public class OSRMHelper {
205                  return bedsteAdresse;                  return bedsteAdresse;
206          }          }
207    
208            /*      
209          public Adresse getNearestViarouteJni(Adresse a1, Collection<Adresse> haystack) {          public Adresse getNearestViarouteJni(Adresse a1, Collection<Adresse> haystack) {
210    
211                  if (binding == null) {                  if (binding == null) {
# Line 239  public class OSRMHelper { Line 244  public class OSRMHelper {
244                          }                                                }                      
245    
246                  return bedsteAdresse;                  return bedsteAdresse;
247          }          }*/
248  }  }
249    
250    

Legend:
Removed from v.2743  
changed lines
  Added in v.2744

  ViewVC Help
Powered by ViewVC 1.1.20