public RequeteExtend() throws SQLException {
		
		tableaux.clear();
		srids.clear();
		taillePixel.clear();
		nomCouches.clear();


		
		nomCouches=FenetreExtend.getNomShape1();
		srids= FenetreExtend.getSrids();

	
		System.out.println("size: "+srids.size());
		
		for(String siz : srids){
			System.out.println("siz "+siz);
		}
		
		System.out.println("size2: "+nomCouches.size());

		for(int i=0;i<nomCouches.size();i++){
			System.out.println("nomCouches: "+nomCouches.get(i));
		}

		for(int i=0;i<srids.size();i++){

			System.out.println("test: "+ srids.get(i) +" "+ nomCouches.get(i));
		}
		//shapes=ConnexionUnion.getArrayy();


		this.setNomBase(ConnexionBaseDonnees.getNomBase());
		this.setHote(ConnexionBaseDonnees.getHote());
		this.setPort(ConnexionBaseDonnees.getPort());
		this.setNomUtilisateur(ConnexionBaseDonnees.getUser());
		this.setMotDePasse(ConnexionBaseDonnees.getPswd());

		//System.out.println("Test");
		Connection con = null;
		try{
			Class.forName("org.postgresql.Driver");
			con = DriverManager.getConnection("jdbc:postgresql://"+this.getHote()+":"+this.getPort()+"/"+this.getNomBase(),this.getNomUtilisateur(),this.getMotDePasse());


			for(int j=0;j<nomCouches.size();j++){
				if (con!=null){
					try{
						Statement st = con.createStatement();

						//st.execute("ALTER TABLE batiments DROP COLUMN surface_total ");
						
						
						st.execute("drop table if exists extend_"+nomCouches.get(j));

						st.execute("create table extend_"+nomCouches.get(j)+" as SELECT st_envelope(st_union(st_buffer("+srids.get(j)+",0))) from "+nomCouches.get(j));
						
						


						//					stmt = con.createStatement();
						//
						//					String query = "select SUM(surfpalu) from "+shapes.get(j)+" as sum";
						//					ResultSet rs = stmt.executeQuery(query);
						//					while (rs.next()) {
						//
						//						//  String coffeeName = rs.getString("abc");
						//						//  int test = rs.getInt("sum");
						//						this.setSurfaceTotale(rs.getDouble("sum"));
						//						//float test = rs.getFloat("sum");
						//						//float price = rs.getFloat("PRICE");
						//						// int sales = rs.getInt("SALES");
						//						// int total = rs.getInt("TOTAL");
						//						System.out.println("surface totalefeneraster pour:"+ shapes.get(j)+" "+this.getSurfaceTotale());
						//					}
						//					
						//					st.execute("ALTER TABLE "+shapes.get(j)+" DROP COLUMN surfpalu");


						//System.out.println("Base de donn�es "+database+" cr�e");
					}
					catch (SQLException s){
						s.printStackTrace();// JDBCTutorialUtilities.printSQLException(s);
					}
				}
			
		}
		}
		catch (Exception b){
			b.printStackTrace();
			JOptionPane.showMessageDialog(this,"Erreur : "+b,"Titre : exception",JOptionPane.ERROR_MESSAGE);
		}


		//	System.out.println("Surface: "+this.getSurfaceTotale());

		//new RequeteRasterVector2Points(fen);
	}