Package com.lbslocal.cc.objects.v0.common

Examples of com.lbslocal.cc.objects.v0.common.MapInfo


    try {
      /*
       * chama webMethod getXY para saber a coordenada do endere�o
       * informado
       */
      Point point = getXY(address, idLicenca);

      if (point.getX() != 0 && point.getY() != 0) {
        /*
         * se as coordenadas do endere�o s�o diferentes de zero, cria
         * mapa com o raio informado
         */
        CommonMap commonMap;
View Full Code Here


            for (int i = 0; i < splitLines.length; i++) {
        if (splitLines[i].startsWith("%G1=")){
         
          Address address = new Address();
          splitField = splitLines[i].split("%");
          Point point = new Point();
          for (int j = 0; j < splitField.length; j++) {
            if (splitField[j].startsWith("G5")){
              address.setDistrict(splitField[j].substring(3));
            }
            if (splitField[j].startsWith("SN")){
              address.setStreet(splitField[j].substring(4));
            }
            if (splitField[j].startsWith("XSN")){
              address.setStreet(address.getStreet() + " com " + splitField[j].substring(5));
            }
            if (splitField[j].startsWith("XLL=")){
              xll = splitField[j].substring(4);
              point.setY(Double.parseDouble(xll.split(",")[0]));
              point.setX(Double.parseDouble(xll.split(",")[1]));
            }
          }
          address.setCity(city);
         
          listIL.add(new IntersectionLocation(address, point));
View Full Code Here

  }

  public AddressLocation() {
        address = new Address();
        address.setCity(new City());
        point = new Point();
        carAccess = true;
        zipL = "";
        zipR = "";
  }
View Full Code Here

  public POIDetails() {
    this.clientID = "";
    this.name = "";
    this.addressInfo = "";
    this.source = "";
    this.point = new Point();
  }
View Full Code Here

    CAddressFinderAPI cAf = new CAddressFinderAPI(cm.getAppSettings("MAQUINA"), cm.getAppSettings("SERVER"), 11188, cm.getAppSettings("OUTPUT"),
        cm.getAppSettings("DNS"), cm.getAppSettings("M_BASEDECARTA_MAPA"), cm.getAppSettings("M_BASEDECARTA_REVGEO"));

    CommonRest cr = new CommonRest();

    Point point = new Point(Double.parseDouble(request.getParameter("lng")), Double.parseDouble(request.getParameter("lat")));
    Double tolerance = 50D;
    AddressLocation al = new AddressLocation();

    try {
      al = cAf.getAddress(point, tolerance, Integer.parseInt(cm.getAppSettings("ID")));
    } catch (Exception e) {
      e.printStackTrace();
    }

    ObjectsHelper[] dependencyObjects = new ObjectsHelper[3];

    dependencyObjects[0] = cr.new ObjectsHelper();
    dependencyObjects[0].object = new Address();
    dependencyObjects[0].alias = "address";

    dependencyObjects[1] = cr.new ObjectsHelper();
    dependencyObjects[1].object = new Point();
    dependencyObjects[1].alias = "point";

    dependencyObjects[2] = cr.new ObjectsHelper();
    dependencyObjects[2].object = new AddressLocation();
    dependencyObjects[2].alias = "AddressLocation";
View Full Code Here

        AddressLocation al = new AddressLocation();

       
       
        Double tolerance = Double.valueOf(cr.getFieldFromXML(ph.XMLFile, "tolerance"));
        Point point = (Point) cr.getObjectFromXML(ph.XMLFile, "point", Point.class, null);

        try {
          al = cAf.getAddress(point, tolerance, id_licenca);
        } catch (Exception e) {
          e.printStackTrace();
        }

        ObjectsHelper[] dependencyObjects = new ObjectsHelper[3];

        dependencyObjects[0] = cr.new ObjectsHelper();
        dependencyObjects[0].object = new Address();
        dependencyObjects[0].alias = "address";

        dependencyObjects[1] = cr.new ObjectsHelper();
        dependencyObjects[1].object = new Point();
        dependencyObjects[1].alias = "point";

        dependencyObjects[2] = cr.new ObjectsHelper();
        dependencyObjects[2].object = new AddressLocation();
        dependencyObjects[2].alias = "AddressLocation";
View Full Code Here

    this.tollFee = "";
    this.tollFeeDetails = new TollFeeDetails();
    this.roadType = "";
    this.distance = 0;
    this.cumulativeDistance = 0;
    this.point = new Point();
    this.time = "";
  }
View Full Code Here

        RouteInfo ri = new RouteInfo();
       
        ObjectsHelper[] routeStopDependencyObjects = new ObjectsHelper[3];
       
        routeStopDependencyObjects[0] = cr.new ObjectsHelper();
        routeStopDependencyObjects[0].object = new Point();
        routeStopDependencyObjects[0].alias = "point";
       
        routeStopDependencyObjects[1] = cr.new ObjectsHelper();
        routeStopDependencyObjects[1].object = new RouteStop();
        routeStopDependencyObjects[1].alias = "RouteStop";
       
        routeStopDependencyObjects[2] = cr.new ObjectsHelper();
        routeStopDependencyObjects[2].object = new RouteStop[0];
        routeStopDependencyObjects[2].alias = "rs";
       
        ObjectsHelper[] routeOptionsDependencyObjects = new ObjectsHelper[7];
       
        routeOptionsDependencyObjects[0] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[0].object = new RouteDetails();
        routeOptionsDependencyObjects[0].alias = "routeDetails";
       
        routeOptionsDependencyObjects[1] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[1].object = new Vehicle();
        routeOptionsDependencyObjects[1].alias = "vehicle";
       
        routeOptionsDependencyObjects[2] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[2].object = new RouteLine[0];
        routeOptionsDependencyObjects[2].alias = "routeLine";
       
        routeOptionsDependencyObjects[3] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[3].object = new RouteLine();
        routeOptionsDependencyObjects[3].alias = "RouteLine";
       
        routeOptionsDependencyObjects[4] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[4].object = new Point[0];
        routeOptionsDependencyObjects[4].alias = "barrierPoints";
       
        routeOptionsDependencyObjects[5] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[5].object = new String[0];
        routeOptionsDependencyObjects[5].alias = "barriersList";
       
        routeOptionsDependencyObjects[6] = cr.new ObjectsHelper();
        routeOptionsDependencyObjects[6].object = new String[0];
        routeOptionsDependencyObjects[6].alias = "poiRoute";
       
        RouteStop[] rs = (RouteStop[]) cr.getObjectFromXML(ph.XMLFile, "rs", RouteStop.class, routeStopDependencyObjects);
        RouteOptions ro = (RouteOptions) cr.getObjectFromXML(ph.XMLFile, "ro", RouteOptions.class, routeOptionsDependencyObjects);
       
        try
        {
          ri = cRoute.getRoute(rs, ro, id_licenca);
          if (fullCoords.equals("true")){
            ri.setCoords(cRoute.getRouteFullCoords(ri.getRouteId()));
          }
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
       
        response.setContentType("text/xml");
        response.setCharacterEncoding("UTF-8");
       
        ObjectsHelper[] dependencyObjects = new ObjectsHelper[6];
       
        dependencyObjects[0] = cr.new ObjectsHelper();
        dependencyObjects[0].object = new MapInfo();
        dependencyObjects[0].alias = "MapInfo";
       
        dependencyObjects[1] = cr.new ObjectsHelper();
        dependencyObjects[1].object = new SegmentDescription();
        dependencyObjects[1].alias = "SegmentDescription";
       
        dependencyObjects[2] = cr.new ObjectsHelper();
        dependencyObjects[2].object = new RouteTotals();
        dependencyObjects[2].alias = "routeTotals";
       
        dependencyObjects[3] = cr.new ObjectsHelper();
        dependencyObjects[3].object = new RouteSummary();
        dependencyObjects[3].alias = "routeSummary";
       
        dependencyObjects[4] = cr.new ObjectsHelper();
        dependencyObjects[4].object = new RoadType();
        dependencyObjects[4].alias = "roadType";
       
        dependencyObjects[5] = cr.new ObjectsHelper();
        dependencyObjects[5].object = new RouteInfo();
        dependencyObjects[5].alias = "RouteInfo";

       
        response.getWriter().write("<?xml version='1.0' encoding='UTF-8'?>\n" + cr.getXMLFromObject(ri, dependencyObjects) + "");
      }
      if (ph.fields[0].equals("setRouteFence"))
      {
        String routeId = cr.getFieldFromXML(ph.XMLFile, "routeId");
        double meters = Double.parseDouble(cr.getFieldFromXML(ph.XMLFile, "meters"));
        boolean generate = true;
        try
        {
          generate = cRoute.setRouteFence(routeId, meters, id_licenca);
        }
        catch (Exception e)
        {
          generate = false;
          e.printStackTrace();
        }
        response.getWriter().write("<?xml version='1.0' encoding='UTF-8'?>\n<setRouteFence><FenceGenerate>" + generate + "</FenceGenerate></setRouteFence>");
       
      }
      if (ph.fields[0].equals("checkFence"))
      {
        boolean dentro = false;
        String routeId = cr.getFieldFromXML(ph.XMLFile, "routeId");
        Point point = (Point) cr.getObjectFromXML(ph.XMLFile, "point", Point.class, null);
        try
        {
          dentro = cRoute.checkFence(routeId, point, id_licenca);
        }
        catch (Exception e)
View Full Code Here

    Value[0] = 0;
    Value[1] = 0;

    try {
      ShapeDetect shp = new ShapeDetect();

      for (int x = 0; x < rs.length; x++) {
        try {
          shp = Functions.getCity(rs[x].getPoint(), _server, _port, _dataSource);
View Full Code Here

  public static ShapeDetect getCity(Point ptClick, String server, Integer port, String dataSource) throws Exception {
    if (ptClick.getX() == 0 && ptClick.getY() == 0) {
      throw (new Exception("Coordenadas do ponto devem ser informadas."));
    }

    ShapeDetect shp = new ShapeDetect();

    try {
      TCPClientDecarta tcpDecarta = new TCPClientDecarta(server, port);
      String response = tcpDecarta.Send("S2LN|%LL=" + String.valueOf(ptClick.getY()).replace(",", ".") + ","
          + String.valueOf(ptClick.getX()).replace(",", ".") + "|%RAD=m15%INTERPADDR%ALLATTRS%LL%DS=" + dataSource + "||");
View Full Code Here

TOP

Related Classes of com.lbslocal.cc.objects.v0.common.MapInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.