您的位置:首页 > 其它

IDL 绘制图像分割结果--矢量多边形

2016-08-20 23:46 513 查看

Displaying Shapes on Maps


shapefile = Filepath(subdir=['examples','data'], 'states.shp')
cgDisplay, 800, 700
cgMap_Set, 37.5, -117.5, /Albers, /IsoTropic, Limit=[30, -125, 45, -108], $
Position=[0.05, 0.05, 0.95, 0.95]
cgDrawShapes, shapefile, AttrName='STATE_ABBR', $
AttrValues=['CA', 'OR', 'WA', 'AZ', 'UT', 'ID', 'NV'], Thick=1, $
FColors=['firebrick', 'grn4', 'pur4', 'tan4', 'steel blue', 'org4', 'yellow'], $
Fill = Replicate(1, 7), Colors='charcoal'
cgMap_Grid, LatDel = 2.0, LonDel = 2.0, /Box_Axes, Color='charcoal'


shapefile = 'C:\IDL\data\shapefiles\co_counties.shp'
cgDisplay, 500, 500, Title='County Boundaries'
map = Obj_New('cgMap', 'UTM', Datum=8, Zone=13, Position=[0.05, 0.05, 0.95, 0.95])
cgDrawShapes, shapefile, AttrName='COUNTY', MapCoord=map, /Projected_XY
cgMap_Grid, LatDel = 2.0, LonDel = 2.0, /Box_Axes, Color='charcoal', $
Map_Structure=map




Drawing Shapes Automatically


shapefile = 'C:\IDL\data\shapefiles\co_counties.shp'
cgDrawShapes, shapefile, /AutoDraw


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: