- 积分
- 165
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-9-13
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
fatal:MapRGDHDrawMapList: MDRGSF/MDRGOF - ERROR OPENING RANGS/GSHHS CAT FILE
fatal:PlotManagerDraw: error in plot draw
fatal:_NhlPlotManagerDraw: Draw error
中国轮廓图绘制时报错。请问是什么出了问题。出来的图什么都没有,只是阴影
segments = f->segments
geometry = f->geometry
segsDims = dimsizes(segments)
geomDims = dimsizes(geometry)
;-- get global attributes
geom_segIndex = f@geom_segIndex
geom_numSegs = f@geom_numSegs
segs_xyzIndex = f@segs_xyzIndex
segs_numPnts = f@segs_numPnts
numFeatures = geomDims(0)
;-- open workstation
wks = gsn_open_wks("png","plot_shapefile_plot")
;-- set resources for the map
res = True
res@gsnDraw = False ;-- don't draw the plot
res@gsnFrame = False ;-- don't advance frame yet
res@gsnMaximize = True ;-- maximize plot in frame
res@mpDataBaseVersion = "HighRes"
res@mpDataResolution = "Medium"
res@mpProjection = "Mercator" ;-- change projection
;-- select coordinates for Germany
res@mpLimitMode = "Corners"
res@mpLeftCornerLatF = 47.
res@mpRightCornerLatF = 55.
res@mpLeftCornerLonF = 5.
res@mpRightCornerLonF = 16.
res@tiMainString = "NCL Doc Example: Shapefile plot"
res@tiMainFontHeightF = 0.015
;-- generate map, but don't draw it
plot = gsn_csm_map(wks,res) ;-- draw map, but don't advance frame
;-- add polylines from the shape files to the plot
lines = new(segsDims(0),graphic) ;-- array to hold shapefile polylines
;-- set resources for the polylines
plres = True
plres@gsLineColor = "red"
;-- generate polylines, but don't draw it
lon = f->x
lat = f->y
segNum = 0
do i=0, numFeatures-1
startSegment = geometry(i, geom_segIndex)
numSegments = geometry(i, geom_numSegs)
do seg=startSegment, startSegment+numSegments-1
startPT = segments(seg, segs_xyzIndex)
endPT = startPT + segments(seg, segs_numPnts) - 1
lines(segNum) = gsn_add_polyline(wks, plot, lon(startPT:endPT),lat(startPT:endPT), plres)
segNum = segNum + 1
end do
end do
;-- draw the plot
draw(plot)
frame(wks)
|
|