I am using DotSpatial 1.9 and I have a feature (sourced from a shapefile).

According to the docs, I should be able to call: ToString() on IFeature.

    // Summary:
    //     Returns the Well-known Text representation of this Geometry. For a definition
    //     of the Well-known Text format, see the OpenGIS Simple Features Specification.
    // Returns:
    //     The Well-known Text representation of this Geometry.

But what I getting is the name of the type:


What am I missing?


I think this is a bug caused by an incorrectly implemented IBasicGeometry.ToString method.

But the WKT is obtainable by: feature.BasicGeometry.ToString();

Example tests, GeometryToWktTest and GeometryToWktTest_2:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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