我想制作一张尼泊尔地区地图。
我从ArcGIS下载了名为NP_75DWGS84
的相应shapefile,并继续使用以下Stata命令:
cd "$original_dta/NP_75DWGS84"
shp2dta using NP_75DWGS84, database(data) coordinates(coord) genid(id) replace
但是,一旦我要求描述数据,就会出现以下输出:
Contains data
obs: 0
vars: 0
size: 0
Sorted by:
您知道为什么要删除观察结果吗?
答案 0 :(得分:1)
命令shp2dta
是社区贡献的,可以从SSC下载:
. ssc install shp2dta
位于Stata工作文件夹中的data (解压缩)中,语法为:
. shp2dta using NP_75DWGS84, database(data) coordinates(coord) genid(id) replace
type: 5
在那里创建以下两个数据集:
但是,它不会自动加载其中的任何一个
. describe
Contains data
obs: 0
vars: 0
size: 0
Sorted by:
您只需要自己使用use
:
. use data.dta
. describe
Contains data from data.dta
obs: 75
vars: 8
size: 3,450
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DIST_ID byte %10.0g DIST_ID
DISTRICT str14 %14s DISTRICT
ZONE_NAME str10 %10s ZONE_NAME
REGION str11 %11s REGION
DISS byte %10.0g DISS
Xc float %9.0g Xc
Yc float %9.0g Yc
id byte %12.0g
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by: id
. use coord.dta
. describe
Contains data from coord.dta
obs: 337,488
vars: 3
size: 5,737,296
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
storage display value
variable name type format label variable label
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_ID byte %12.0g
_X double %10.0g
_Y double %10.0g
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by: _ID