Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: problem when using shp2dta with dbf file


From   kcrow@stata.com (Kevin H. Crow)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: problem when using shp2dta with dbf file
Date   Wed, 24 Feb 2010 13:58:58 -0600

Ann Vitorinoa <vitorino@wharton.upenn.edu> reported that the -shp2dta- command
issued an error when converting a shape file:
> I'm trying to convert a shp and a dbf files by following the instructions in http://www.stata.com/support/faqs/graphics/tmap.html
> 
> Unfortunately, when I type:
> 
> shp2dta using Cont_AAd_CAOP20090, database(ptdb) coordinates(ptcoord) genid(id)
> 
> I get the following error message
> 
> . shp2dta using Cont_AAd_CAOP20090, database(ptdb) coordinates(ptcoord) genid(id)
>              st_addvar():  3300  argument out of range
>               read_dbf():     -  function returned error
>                  <istmt>:     -  function returned error
> r(3300);
> 
> Am I doing anything wrong? If anyone would be kind enough to try this, the shp and dbf files can be downloaded from
> 
> http://dl.dropbox.com/u/1563490/Archive.zip

I tried to convert the files to dta format and also could not.  It looks like
the dBASE file has several string variables with a length greater than Stata's
limit of 244.  If Ann can, she should resave the dBASE file in question and
remove or shorten the string data in question.  If this is not possible Ann
can contact me and I can help her code a solution using Mata. 

Kevin
kcrow@stata.com

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index