| 
    
 |   | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Error using shp2dta
Taavi,
-shp2dta- can only convert polygon shapefiles (type 5).  There are many 
other types of shapefiles but these shapefiles will not work with -tmap-. 
You can read more about the different types of shapefiles at the below URL.
http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
Kevin
----- Original Message ----- 
From: "Taavi Lai" <[email protected]>
To: <[email protected]>
Sent: Friday, May 05, 2006 5:55 AM
Subject: st: Error using shp2dta
Dear statalist,
After downloading a number of Europe shape files I tried to convert all 
these to suite -tmap- using -shp2dta- but got an error message (output 
below).
That raised two questions:
1) do you have suggestions how to improve the code (or were to look for 
solution) so that the do file wouldn't abort in case of errors
2) I guess that shapefile causing the error is not of a type suitable 
for -shp2dta- and therefore - is there a way to make these suitable 
for -shp2dta-
Best regards,
Taavi
. fs  *.shp
bndnetarcs.shp    hydronetpols.shp  miscpolypols.shp  translnkarcs.shp 
transnetpols.shp
bndnetpols.shp    misclinkarcs.shp  poppointpnts.shp  translnknods.shp 
vegpolyarcs.shp
hydronetarcs.shp  misclinkpnts.shp  poppolyarcs.shp   translnkpnts.shp 
vegpolypols.shp
hydronetnods.shp  miscpolyarcs.shp  poppolypols.shp   transnetarcs.shp
.
. foreach f in `r(files)' {
 2.         local pos=strpos("`f'",".")
 3.         local f = substr("`f'",1,`pos'-1)
 4.         quiet: shp2dta using `f', database("`f'_database") 
coordinates("`f'_coordinates") replace
 5. }
bndnetarcs.shp: polygon shapefile required
r(610);
end of do-file
r(610);
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/