POST
|
Do you ever have problems editing a TIN when the TIN is saved to a network drive? I am attempting to figure out why it would be slow. We have i7 processors, high-end separate graphics cards, lots of RAM, SSD hard-drives etc. Other than a TIN being lots of records and a network, i can't figure out how to improve editing performance. Any thoughts?
... View more
06-01-2015
01:26 PM
|
0
|
0
|
1088
|
POST
|
I'm using ESRI ArcServer 10.0 and Visual Studio 2010 c#.NET. We've done a spatial query using ArcObjects and are now trying to load the results from an ifeatureclass or igeofeature to the MapResrouceManager. When we do this we can sometimes get the TOC to display the one .sde shapefile and layer name "Results". but we can never see the layers in the map. See attached word document for pictures. // Display FeatureClass in ArcServer Map1 if (!MapResourceManager1.Initialized) { MapResourceManager1.Initialize(); } ESRI.ArcGIS.ADF.Web.UI.WebControls.Map pMap1 = (ESRI.ArcGIS.ADF.Web.UI.WebControls.Map)Page.FindControl("Map1"); ESRI.ArcGIS.ADF.Web.UI.WebControls.Map mapctrl = (ESRI.ArcGIS.ADF.Web.UI.WebControls.Map) pMap1; ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality mf = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality)mapctrl.GetFunctionality(0); ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal mapres = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal)mf.MapResource; ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal mrl = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal)MapResourceManager1.GetResource(0); IServerContext iServerContext = mapres.ServerContextInfo.ServerContext; ESRI.ArcGIS.Carto.IMapServer2 pMapServer = iServerContext.ServerObject as ESRI.ArcGIS.Carto.IMapServer2; ESRI.ArcGIS.Carto.IMapServerObjects2 pMapServerObjects = pMapServer as ESRI.ArcGIS.Carto.IMapServerObjects2; ESRI.ArcGIS.Carto.IMap pMap = pMapServerObjects.get_Map(pMapServer.DefaultMapName); IMapServer ms = (IMapServer)mrl.ServerContextInfo.ServerContext.ServerObject; //(IMapServer)GetServerContext().ServerObject;// IMapServerObjects2 mso = (IMapServerObjects2)ms; //***IMap map = mso.get_Map(ms.DefaultMapName); IFeatureLayer pFeatureLayer = (IFeatureLayer)mrl.ServerContextInfo.ServerContext.CreateObject("esriCarto.FeatureLayer"); //new FeatureLayerClass(); IGeoFeatureLayer geoLayer = (IGeoFeatureLayer)pFeatureLayer; // pFeatureLayer.FeatureClass = pResultsFeatureClass; //pFeatureWorkspace.OpenFeatureClass("GRIDSDE2.DBO.SMCBoundary");// pFeatureLayer.FeatureClass = pResultsFeatureClass2; pFeatureLayer.Name = "Results"; //IGeoFeatureLayer geoLayer = (IGeoFeatureLayer)pFeatureLayer; IFeatureRenderer renderer = geoLayer.Renderer; ISimpleRenderer simpleRenderer = (ISimpleRenderer)renderer; IRgbColor pRgbColor = new RgbColorClass(); pRgbColor.Red = 0; pRgbColor.Green = 0; pRgbColor.Blue = 210; ESRI.ArcGIS.Geometry.esriGeometryType geometryType = pFeatureLayer.FeatureClass.ShapeType; if (geometryType == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPoint) { ISimpleMarkerSymbol simpleMarkerSymbol = (ISimpleMarkerSymbol)simpleRenderer.Symbol; simpleMarkerSymbol.Color = (IColor)pRgbColor; } else if (geometryType == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline) { ISimpleLineSymbol simpleLineSymbol = (ISimpleLineSymbol)simpleRenderer.Symbol; simpleLineSymbol.Color = (IColor)pRgbColor; } else if (geometryType == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon) { ISimpleFillSymbol simpleFillSymbol = (ISimpleFillSymbol)simpleRenderer.Symbol; simpleFillSymbol.Color = (IColor)pRgbColor; } else { throw new Exception("No renderer or symbol selected. Shape type undetermined."); } pMapServerObjects.get_Map(pMapServer.DefaultMapName).AddLayer(pFeatureLayer); //pMap.AddLayer(pFeatureLayer); //*** map.AddLayer(pFeatureLayer); int test = pMap.LayerCount; ESRI.ArcGIS.Carto.IActiveView pactiveview = (ESRI.ArcGIS.Carto.IActiveView)pMap; pactiveview.Refresh(); //pMap.ActiveGraphicsLayer., null, null); mso.RefreshServerObjects(); pMapServerObjects.RefreshServerObjects(); // // //mapres.RefreshServerObjects(); Map1.RefreshResource(mf.Resource.Name); Session["addedlayersid"] = mso.get_LayerID(ms.DefaultMapName, pFeatureLayer); mapres.RefreshServerObjects(); // mapctrl.RefreshResource(mf.Resource.Name); //mapctrl.RefreshResource(mapres.Name); //mapctrl.RefreshResource(mrl.Name); Toc1.Refresh(); Map1.CallbackResults.CopyFrom(Toc1.CallbackResults); Map1.Refresh(); Map1.Reset(); Map1.Rotation = 45; //Map1.Refresh(); //mapctrl.Refresh(); pAoInitialize.Shutdown(); mapres.Dispose(); mf.Dispose(); Toc1.Dispose(); Map1.Dispose(); }
... View more
11-25-2013
02:36 PM
|
0
|
1
|
644
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|