アットウィキロゴ

fusion tabls java

package table;
 
import tool.*;
 
public class pro {
 
    String urlx;
  int s,datanumber,number;
  String[] data=new String[50000];
     String[] code=new String[50000];
   double[] lat=new double[5000];
   double[] lon=new double[5000];
 
    public static void main(String[] args) {
        pro test=new pro();
    }
pro(){
 
    String id,key;
 
    id="1kqo0TFgcUV4pJwSXZ5npf9Q8PbR7k7oa_64UVfA";
    key="AIzaSyAH0WCAXRIdHdbI-6bnMSN4kVDDZZmGyqY";
 
String str1;
 
str1="%20";
 
urlx="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT";
        urlx=urlx+str1+"*"+str1+"FROM"+str1+id;
       urlx=urlx+"&key="+key;
 
 getdata sub=new getdata(); 
 sub.makedata(urlx,"UTF-8");
 data=sub.data;
 datanumber=sub.datanumber;
int h;
 
String str;
 
str="";
 for(s=1;s<datanumber+1;s++){
 str=str+data[s];
 }
 
 
 
 String[] x=str.split(" ],");
 String[] d=new String[4000];
 int sx,p1;
 
 sx=0;
 for(s=1;s<x.length;s++){
     sx=sx+1;
     p1=0;
     if(x[s].indexOf("rows")>-1)p1=x[s].indexOf("[ ");
     p1=x[s].indexOf("\"",p1);
     d[sx]=x[s].substring(p1,x[s].length());    
 }
 
 number=sx;
 
  for(s=1;s<number+1;s++){
 str=d[s];
 String[] y=str.split(",");
 code[s]=y[0];
 
 lat[s]=Double.parseDouble(y[1]);
 
 str=y[1].replace("] ]}","");
 
 lon[s]=Double.parseDouble(str);
  }
 
 
 for(s=1;s<number+1;s++){
  str=code[s];
  code[s]=str.replace("\"", "");
 
  System.out.println(code[s]);
 
 
 }
 
 
}
}
 
最終更新:2014年01月01日 00:15