Getting WKT/GeoJSON from shapefile


I’m trying to read a shapefile and thereby highlighting the feature as selected by using this.

sf.set_ShapeSelected(shapes[i], true);

I want to get the GeoJSON or WKT of this selected feature so that I can go ahead and integrate that feature in my next workflow.

Please let me know if there is any way where we can get this or any workaround for this.


Found it

Shape shp;
shp = sf.Shape[shapes[i]];
if (shp != null)
selectedAOI = shp.ExportToWKT();