Pessoal, estou tendo problemas com este código. O erro é o seguinte:
“O campo chamado name para o tipo chamado uk.ac.leeds.ccg.geotools.ShapefileReader$Loader não está visível”
Se alguém puder me ajudar… Este é o código…
[code]public class ShapefileReader extends java.lang.Object implements DataSource {
public static final String cvsid="$Id: ShapefileReader.java,v 1.33 2001/12/09 16:06:40 jmacgill Exp $";
private final static boolean DEBUG=false;
public Shapefile sf = null;
public Dbf dbf = null;
private int idCol = 3;//best general guess
private String name = “none”;
private MixedLayer map = new MixedLayer(this);
private Loader loader;
URL base;
int status = 0;
class AddDataWhenReady extends Thread{
SimpleGeoData data;
String colName;
int col;
public AddDataWhenReady(SimpleGeoData data,String colName){
this.data = data;
this.colName = colName;
}
public AddDataWhenReady(SimpleGeoData data,int col){
this.data = data;
this.colName = colName;
}
public void run(){
System.out.println("Waiting for data loader to finish");
try{
loader.join();
}
catch(InterruptedException ie){
System.err.println("AddDataWhenReady stuck because "+ie);
return;
}
System.out.println("Apparently data loader has now finished");
if(colName !=null){
col = dbf.getFieldNumber(colName);
}
if(col>=0){
readDataNow(data,col);
}
else{
if(DEBUG)System.err.println("SfR->Column "+colName+" not found in .dbf file");
}
//map.notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
}
private int ids[];
class Loader extends Thread{
public void run(){
//System.out.println("Hello from sf threaded loader!");
String sub="";
if(name.indexOf('?')>=0){sub = name.substring(name.indexOf( '?' ),name.lastIndexOf('/'));}
if(DEBUG)System.out.println("SfR->Sub "+sub);
map.setStatus(map.LOADING);
boolean shpZip = false, dbfZip = false;
}[/code]