1

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:

feature.ToString()
"DotSpatial.Data.Feature"

What am I missing?

1

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:
https://github.com/cumminsjp/Agema/tree/master/examples/dot-spatial-test

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.