Migrating from 1.7 to 2.0 Questions
See original GitHub issueNovice geospatial programmer migrating a large code using 1.7 to 2.0 and running into a variety of issues. Not sure if this is the correct venue to ask them. Please advise
Is there any guidance out there that would help a migration from 1.7 to 2.0? I read some brief tips in the Wiki for the jump from 1.9 to 2.0. Anything addressing 1.7 to 1.9?
I have been formulating changes as I go using the DotSpatial documentation, but not 100% the changes will work just because Visual Studio says its happy with it. There are a lot of changes to make, but similar ones are coming up so I’ve collected the major ones.
-
Checking intersection between to polygon features - I ran into a similar problem with a Coordinate intersecting a polygon Feature - my solution was to create an Envelope from the Coordinate and use the IFeature.Intersects() method. How is this accomplished with two polygon Features?
-
Getting the intersection or difference between to polygon features - 1.7 code used
feature1 = feature2.Intersection(feature3);
Migrated tofeatrue1 = feature2.Intersection(feature3.Geometry);
Will this generate the same result both Intersection() and Difference()? -
Area of polygon Feature - The 1.7 code used the feature.Area() method. My solution with 2.0 was to use DotSpatial.Plugins.Taudem.Utils.AreaOfPart(feature,0); Is this correct? Is there a “better” approach?
-
Centroid of polygon feature - IFeature.Centroid() is no longer available - migrated to IFeature.Geometry.Centriod
Thanks Ted
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (10 by maintainers)
Top GitHub Comments
This should do the same without having to depend on Envelope.
This was moved to Feature.Geometry also. Check out Feature.Geometry.EnvelopeInternal.Minimum.
In case you need the extent for a Feature envelope just use Feature.Geometry.EnvelopeInternal.ToExtent().