Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

There seems to be an "impedance mismatch" (if I can borrow the term) between similar classes in ArcObjects and the WPF runtime libraries. For example, there is a ESRI.ArcGIS.Client.Geometry.Polyline in the WPF runtime and a ESRI.ArcGIS.Geometry.IPolyline (and corresponding PolylineClass) in ArcObjects.

I want to be able to do something like this (or at least similar):

var poly = new ESRI.ArcGIS.Client.Geometry.Polyline();
var ipoly = new ESRI.ArcGIS.Geometry.PolylineClass();

// stuff happens

poly = ipoly;

Is there an easy way to convert between the two? Or am I going to have to write some deep copy methods?

share|improve this question
    
usually I do something like IPoly = new PolyClass(), and then look the inheritance chain to see if I can cast IPoly into someother IObject. –  patrick Sep 20 '12 at 21:39
    
Me too. But in this case, it appears there are no common ancestors since they are in different assemblies. And there is actually a Polyline class in ESRI.ArcGIS.Geometry, but that doesn't match the one in ...Client... –  Keith G Sep 20 '12 at 22:24
    
I am wanting to know about this myself. The link below did not help. If anyone has a suggestion, please post. Thanks! –  Renee Cammarere Jan 26 '13 at 11:39

1 Answer 1

This article looks like it might help: Serializing JSON Geometry Objects between Silverlight, WPF and ArcObjects

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.