POST
|
After looking online a bit it looks like the issue is resolving from loading a Feature Class from an existing GeoDatabase (GDB). Is this something others have seen? I need this ability to create MOLE Symbology and be able to switch back between MOLE Symbology and generic graphics that I draw when not enabling said symbology.
... View more
08-08-2012
07:09 AM
|
0
|
0
|
112
|
POST
|
Transitioning from 10.0 to 10.1 and creating MOLE symbology in ArcGlobe - the application crashes at the following line of code
Globe.AddLayerType(graphicsLayer.GlobeGraphicsLayer as ILayer , esriGlobeLayerType.esriGlobeLayerTypeUnknown, false);
Leading up to this I do the following: I have a custom class called 3DDataLayer which has the following properties: IForceElementLayer (named MoleLayer) , IGlobeGraphicsLayer (named GlobeGraphicsLayer) and other properties that aren't relevant. The first thing I do is create a workspace by doing the following
IFeatureWorkspace featureWorkspace;
myWorkspace = myWorkspaceFactory.CreateNewScratchWorkspace();
featureWorkspace = myWorkspace as IFeatureWorkspace;
myFields = new FieldsClass();
//... // Setting my field names and alianses and properties
featureWorkspace.CreateFeatureClass(inName, myFields, null , null , esriFeatureType.esriFTSimple , "Shape" , String.Empty);
//Create a mole layer
I create the mole layer as follows
IFeatureClass featureClass = LoadFeatureClass(inName);
IGeofeatureLayer featureLayer = new FeatureLayer() as IGeofeatureLayer;
featureLayer.FeatureClass = featureClass;
ICachedGraphicFeatureLayer moleLayer = new ForceElementLayer() as ICachedGraphicFeatureLayer;
moleLayer.FeatureLayer = featureLayer;
//Set properties such as size / 3d settings /
ILayer layer = moleLayer as ILayer;
layer.Name = inName;
Globe.AddLayerType(layer , esriGlobeLayerType.esriGlobeLayerTypeDraped, false);
myMoleFeatureClass = featureClass;
Any ideas why this is blowing up? I need this so I can turn on Military Symbology based upon certain trigger conditions.
... View more
08-07-2012
12:44 PM
|
0
|
1
|
396
|
POST
|
Try invalidating the spatial index. Here is another doc that goes into more detail on working with indexes I've tried invalidating the spatial index by doing the following: your suggestion in bold IPolygon poly = (IPolygon)myAxMap.TrackPolygon();
poly.SpatialReference = mySpatialReference;
IPointCollection p = poly as IPointCollection;
IGeometry geometry = p as IGeometry;
geometry.SpatialReference = mySpatialReference;
((IZaware)geometry).ZAware = false;
string shapeFileURL = CreateShapeFile(p , LayerName); //Where this generates a valid shp file and returns the full file path
AddLayer(shapeFileURL); //Where this creates the ILayer , sets the layer effects and adds it to a group in myTocControl
((ISpatialIndex)poly).Invaldiate(); Like I said, the layer shows up in the TOC Control (In the proper spot for indexing). If I close the app I can see the valid ShapeFile. I've inspected it manually and with the existing ESRI Tools that can be used to look at layers and the like and it's all good. If I re-open the app it's visible and the indexing is still the same . Any other ideas?
... View more
07-11-2012
01:04 PM
|
0
|
0
|
249
|
POST
|
I currently have an ArcToc Control and an ArcMap Control. Where I'm attempting to create a shapefile , have it saved (to disk) , display on the Table-Of-Contents and also on the Map. Currently, the Line/Polyline/Polygon/Ellipse all are created as proper shape files. They are also added to my TOC Control and show the name - the linestyle and I can properly view the properties (thickness/color/etc). However, they do not show up on the map initially. If I go to the TOC and change the line thickness from the default (1) to any higher number it shows.If I change the line style from solid to Dashes , zoom in and zoom out it also shows. Any idea why this is happening?
... View more
06-15-2012
08:37 AM
|
0
|
2
|
518
|
POST
|
Does anyone have any experience creating text using OpenGL? I'm trying to use the GDITextureFont with the CSGL OpenGL Wrapper but it's not working. Any help would be great. Basically, I don't want to use the 3D Markers on the globe and would rather use a 2D Type of Marker. I figured I could use the ESRI Font File, pull out the character and draw that on the globe. Any advice going forward, would be great.
... View more
08-11-2011
07:24 AM
|
0
|
0
|
1987
|
POST
|
I currently have a basic shapefile that I want to edit in ArcObjects in C#. I've created a shape file by creating a FeatureClass , Workspace and then obviously passing in my shape. In this case it's just a simple Polyline with a few points on it. What I'd like to do is have the ability to update this shapefile. I'm assuming I need to re-use that FeatureClass, Workspace and pass in a new shape. However, what I'm doing doesn't seem to work. This is where I'm at on the edit - any advice would be great. IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)inWorkspace; workspaceEdit.StartEditing(true); workspaceEdit.StartEditOperation(); ComReleaser comReleaser = new ComReleaser(); IFeatureCursor featureCursor = inFeatureClass.Update(null , true); IFeature feature = null; while((feature = featureCursor.NextFeature()) != null) { int id = feature.Fields.FindField("shape"); IFeatureBuffer featureBuffer = inFeatureClass.CreateFeatureBuffer(); featureCursor.DeleteFeature(); //Delete the old featureBuffer.Shape = (IGeometry)inShape; featureCursor.InsertFeature(featureBuffer); } workspaceEdit.StopEdidtOperation(); workspaceEdit.StopEditing(true);
... View more
03-08-2011
11:34 AM
|
0
|
1
|
3577
|
POST
|
I'm trying to leverage ArcGLobe to get an envelope or extent of what is visible to the user. Basically, if the globe loads up and I zoom to North America, I'd like to know the bounds of the globe are North America... I have the ability to place the mouse inside the globe and convert x,y mouse coordinates into Lat,Lon Coordinates; however, if the mouse is placed outside of the globe no value can be returned. Obviously this removes the ability to just get the extent based on the four corners of my screen. Is there a way to get the radius of the globe in pixels? If so I could just do some basic math and double the radius to get the diameter and know that based upon the diameter and the height/width of the globe control know the four corners of the globe to a certain degree with minimal error. Any ideas would be great. I'm not looking for code per-se but at least point me in the right direction or library would be helpful. Thanks
... View more
02-03-2011
05:10 AM
|
0
|
0
|
662
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|