Examples of CityBlock


Examples of wolf.city.block.CityBlock

        }
       
        rm.asOBJ(obj);
       
        for(int i=0; i<bm.blocks.size(); i++){
          CityBlock cb = bm.blocks.get(i);
          for(int j=0; j<cb.lots.size(); j++){
            cb.lots.get(j).asOBJ(obj);
          }
        }
       
        obj.save("data/city.obj");
      }else{
        OBJ obj = new OBJ(false);
        for(int i=0; i<fb.buildings.size(); i++){
          fb.buildings.get(i).asOBJ(obj);
        }

        obj.save("data/city.obj");

        OBJ objRoads = new OBJ(false);
        rm.asOBJ(objRoads);

        objRoads.save("data/roads.obj");

        OBJ objLots = new OBJ(false);
        for(int i=0; i<bm.blocks.size(); i++){
          CityBlock cb = bm.blocks.get(i);
          for(int j=0; j<cb.lots.size(); j++){
            cb.lots.get(j).asOBJ(objLots);
          }
        }
View Full Code Here

Examples of wolf.city.block.CityBlock

      s.executeUpdate("DROP TABLE IF EXISTS BLOCKS;");
      s.executeUpdate("CREATE TABLE BLOCKS (id, polygon, lots);");

      PreparedStatement p = con.prepareStatement("INSERT INTO BLOCKS VALUES (?, ?, ?);");
      for(int i=0; i<c.bm.blocks.size(); i++){
        CityBlock b = c.bm.blocks.get(i);
        p.setInt(1, i);
        p.setString(2, b.shape.toString());
        p.setString(3, b.lots.toString());
        p.addBatch();
      }

      p.executeBatch();
    }

    //lots
    {
      s.executeUpdate("DROP TABLE IF EXISTS LOTS;");
      s.executeUpdate("CREATE TABLE LOTS (blockid, polygon, buildingpolygon, buildingheight);");

      PreparedStatement p = con.prepareStatement("INSERT INTO LOTS VALUES (?, ?, ?, ?);");
      for(int i=0; i<c.bm.blocks.size(); i++){
        CityBlock b = c.bm.blocks.get(i);
        for(int j=0; j<b.lots.size(); j++){
          Lot l = b.lots.get(j);
         
          p.setInt(1, i);
          p.setString(2, l.shape.toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.