[OpenMap Users] Re: Re: Newbie problems with shape files

From: Jan Peters-Anders <petersja_at_gmx.at>
Date: Tue, 10 Aug 2004 12:05:18 +0200 (MEST)

Hello Don, hello all,

thanks to Don I got my program to load my shape files, but now I get a
different error:

java.lang.NumberFormatException: For input string: "***********"

Here's the code, the error happens at

mapBean.add(esriLayer);

****************************************************************

public class SimpleMap {
        
        
        
    
    public static void main(String args[]) {

        // Create a Swing frame
        JFrame frame = new JFrame("Simple Map");

        // Size the frame appropriately
        frame.setSize(640, 480);

        // Create a MapBean
        MapBean mapBean = new MapBean();

       
                /*
                try{
                   File dbf = new File("akt_nutz_dez03.dbf");
                   File shp = new File("akt_nutz_dez03.shp");
                   File shx = new File("akt_nutz_dez03.shx");
                   EsriPlugIn epi = new EsriPlugIn("name", dbf.toURL(), shp.toURL(),
shx.toURL());
                                                         PlugInLayer pil = new PlugInLayer();
                                                         pil.setPlugIn(epi);
                }
                                catch (Exception e){
                                           System.err.println("Error reading the input string from shape
file");
                                                                           }
                */
                
                
                String dbf = "";
                String shp = "";
            String shx = "";
                      
        try{
        dbf = "y:/peters/openMapData/akt_nutz_dez03.dbf";
                shp = "y:/peters/openMapData/akt_nutz_dez03.shp";
                shx = "y:/peters/openMapData/akt_nutz_dez03.shx";
                }
                catch (Exception e){
                           System.err.println("Error reading the input string from shape file");
                                                           }
                
                try {
                        EsriLayer esriLayer = new EsriLayer("name", dbf, shp, shx,
DrawingAttributes.DEFAULT);
                        mapBean.add(esriLayer);
                }
                catch (MalformedURLException e1) {
                        e1.printStackTrace();
                }
        
       
        

        // Add the map to the frame
        frame.getContentPane().add(mapBean);

        frame.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
                }});

        // Display the frame
        frame.setVisible(true);
    }
}
 


Thanks again

Jan

-- 
Remember, Linux is a wigwam: No Windows. No Gates. Apache inside. 
.
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Aug 10 2004 - 06:13:08 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:05 EDT