Select to view content in your preferred language

How to convert a graphic to geometry ?

1039
2
06-08-2017 07:30 AM
ManelKEDDAR
Deactivated User

Hello ,

I have a feature table with geometry index  and in my Sceneview i have a 3D cone i've created it using the following code 

   var location = new MapPoint(-4.04, 70, 1000, SpatialReferences.Wgs84);

var coneSymbole = new SimpleMarkerSceneSymbol
{
Style=SimpleMarkerSceneSymbolStyle.Cone,
Color=Colors.Yellow,
Height=3000,
Width=1000,
Depth=3000,

AnchorPosition=SceneSymbolAnchorPosition.Bottom

};

var coneGraphic = new Graphic(location , coneSymbole);

 MySceneView.GraphicsOverlays[0].Graphics.Add(coneGraphic);

and i need to add this graphics to my feature table as a geometry so i need to create a newfeature that contains the 3D geometry of the cone but i don't know how to convert graphics to geometry cause createFeature(attributes, geometry) have a geometry parameter and not a graphics parameter any on can tell me what to do , thanks advanced 

0 Kudos
2 Replies
NagmaYasmin
Esri Contributor

Hi Manel,

You may use coneGraphic.Geometry to get the geometry of the newly created feature.

Regards,

Nagma

0 Kudos
dotMorten_esri
Esri Notable Contributor

A thing to note here is that the "Cone" isn't the geometry - the location point of the code is. It's merely a symbol used to represent the point.

FeatureLayers does not at this point support rendering 3D symbols.