Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Error using shp2dta

From   Taavi Lai <>
Subject   st: Error using shp2dta
Date   Fri, 05 May 2006 13:55:32 +0300

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,

. 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

end of do-file

* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index