PullImages.java :  » Image » matsu-project » org » occ » utilities » Java Open Source

Java Open Source » Image » matsu project 
matsu project » org » occ » utilities » PullImages.java
package org.occ.utilities;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Hashtable;

import javax.imageio.ImageIO;

public class PullImages {

  public static void main(String[] args){
    String zk = "localhost";
    String zkp = "2181";
    InvestigateImages ivi = new InvestigateImages(zk, zkp);
    String layer = "eo1";
    String style = "021";
    int w = 512;
    int h = 256;
    String proj = "EPSG:4326";
//    String proj = "eqc";
//    String bb = "-72.50976562500_18.599853515625_-72.48779296875_18.610839843750";
//    String bb = "-72.00439453125_18.533935546875_-71.98242187500_18.544921875000";
//    String bb = "-72.50976562500_18.446044921875_-72.48779296875_18.457031250000";
//    String bb = "-72.8173828125_18.56689453125_-72.7734375_18.5888671875";
    
    String bb = "-72.00439453125_18.5009765625_-71.982421875_18.511962890625";
    
    
    try{
      //BufferedImage bi = ivi.getImage(bb, layer, style, proj, w, h);
      Hashtable<String, BufferedImage> list = ivi.getAllImages(layer, style, proj, w, h);
      for(String s : list.keySet()){
      
        ImageIO.write(list.get(s), "png", new File("/devel/data/jhb/" + s + ".png"));
      }
    } catch(IOException ioe){
      ioe.printStackTrace();
      return;
    }
    
  } // end main
  
} // end PullImages
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.