| | |
| | | try { |
| | | // type: 0-Clip, 1-Fill, 2-NullValue |
| | | var project = TerraBuilder.OpenProject("E:\\terrait\\TianJin\\ExportMap\\ExportMap\\TerraBuilder\\tb.tbp"); |
| | | var project = TerraBuilder.OpenProject("E:\\terrait\\TianJin\\ExportMap\\ExportMap\\TerraBuilder\\tb01.tbp"); |
| | | var shp = "D:\\LF\\data\\shp\\buffer_midline.shp"; |
| | | |
| | | var imgLayer = project.Layers.InsertLayer("D:\\LF\\data\\DOM\\CABQ_0641.tif", "imagery"); |
| | | if (null != imgLayer) { |
| | | imgLayer.ImageryPyramidFormat = 0; |
| | | |
| | | var poly1 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | poly1.AttachToLayer(imgLayer); |
| | | poly1.type = 2; |
| | | //var poly1 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | //poly1.AttachToLayer(imgLayer); |
| | | //poly1.type = 2; |
| | | |
| | | var poly2 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | poly2.AttachToLayer(imgLayer); |
| | |
| | | if (null != eleLayer) { |
| | | eleLayer.ElevationPyramidFormat = 0; |
| | | |
| | | var poly1 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | poly1.AttachToLayer(eleLayer); |
| | | poly1.type = 1; |
| | | poly1.ElevationFillBehavior = 1; |
| | | //var poly1 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | //poly1.AttachToLayer(eleLayer); |
| | | //poly1.type = 1; |
| | | //poly1.ElevationFillBehavior = 1; |
| | | |
| | | var poly2 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | poly2.AttachToLayer(eleLayer); |
| | | poly2.type = 2; |
| | | //var poly2 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | //poly2.AttachToLayer(eleLayer); |
| | | //poly2.type = 2; |
| | | |
| | | var poly3 = VBArray(project.Polygons.ImportPolygons(shp)).toArray()[0]; |
| | | poly3.AttachToLayer(eleLayer); |
| | | poly3.type = 0; |
| | | } |
| | | |
| | | //project.Settings.MPTFileName = "D:\\LF\\data\\mpt\\0A.MPT"; |
| | | project.CreateResolutionPyramids(); |
| | | //project.Settings.MPTFileName = "D:\\LF\\data\\mpt\\0A.MPT"; |
| | | |
| | | project.Save(); |
| | | //project.CreateMPT(); |
| | | project.CreateMPT(); |
| | | |
| | | TerraBuilder.ExitWhenFinished(); |
| | | } catch (ex) { |