I needed some code that would convert a FGDB featureclass to GeoJson. I was able to find some (in C#) but needed it in vb.NET. I converted and all worked well except with the routine that converted the geometry (which is what I really need!). There is a place in the code where it's casting a shapebuffer to multipartshapebuffer. I keep getting this error message:
Unable to cast object of type 'Esri.FileGDB.ShapeBuffer' to type 'Esri.FileGDB.MultiPartShapeBuffer'
The line of code is pretty straight forward (where geometry is Esri.FileGDB.ShapeBuffer):
Dim pbuff As MultiPartShapeBuffer = geometry
Any ideas? Is this the correct syntax for vb.NET? Thanks!
BTW, I'm using VS 2010 Professional and tried it with both FGDB API versions 1.2 and 1.3
Well, still stuck using vb.NET so I tried converting it to C# and it worked fine. This will work for now. I guess there is a problem with the syntax, if anyone knows the correct syntax for vb.NET, that would be great!