<HTML dir=ltr><HEAD><TITLE>[Gvsig_italian] leggere .shp</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText51295 dir=ltr>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>Ciao,</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>I dati alfanumerici sono contenuti in un file DBF con lo stesso nome:</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>comuni.shp --> COMUNI.DBF</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>DBF è il vecchio formato usato da dBASE III, etc. In gvSIG puoi usare la clase DBFDriver per leggere gli attributi. Questo codice dovrebbe funzionare :</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>DBFDriver test = new DBFDriver();</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>try {</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>  test.open(new File("c:\\datatest\\comuni.dbf"));<BR>  int n = test.getFieldCount();<BR>  System.out.println("numero di attributi : " + n);<BR>  test.close();</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>  } catch (Exception e) {<BR>    e.printStackTrace();<BR>  }</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>Guarda i metodi della classe DBFDriver per saperne di più. Qui ho solo chiesto quanti attributi ci sono. Come vedi, non ti serve il file SHP per fare questo. DBF è un formato indipendente. Il collegamento tra SHP e DBF, se non mi sbaglio, è semplicemente un questione d'ordine. La prima geometria del file SHP corrisponde al primo registro del file DBF, etc.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>Saluti,</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3></FONT> </DIV></DIV>
<DIV id=idSignature81356 dir=ltr>
<DIV>Juan Lucas Domínguez Rubio<BR>Prodevelop SL, Valencia (España)<BR>Tlf.: 96.351.06.12 -- Fax: 96.351.09.68<BR><A href="http://www.prodevelop.es/">http://www.prodevelop.es</A></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De:</B> gvsig_italian-bounces@lists.gvsig.org en nombre de gaghi<BR><B>Enviado el:</B> mié 23/04/2008 11:45<BR><B>Para:</B> gvsig_italian@lists.gvsig.org<BR><B>Asunto:</B> [Gvsig_italian] leggere .shp<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2>sapete quali classi vengono utilizzate per leggere i dati contenuti nei .shp.<BR>io dovrei aprirli per potere determinare se all'interno c'è una determinata<BR>stringa o cmq leggerne il contenuto in forma testuale.<BR>--<BR>View this message in context: <A href="http://www.nabble.com/leggere-.shp-tp16833576p16833576.html">http://www.nabble.com/leggere-.shp-tp16833576p16833576.html</A><BR>Sent from the gvSIG Italian mailing list archive at Nabble.com.<BR><BR>_______________________________________________<BR>Gvsig_italian mailing list<BR>Gvsig_italian@lists.gvsig.org<BR><A href="https://gvsig.org/lists/mailman/listinfo/gvsig_italian">https://gvsig.org/lists/mailman/listinfo/gvsig_italian</A><BR></FONT></P></DIV></BODY></HTML>