question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrating from 1.7 to 2.0 Questions

See original GitHub issue

Novice 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.

  1. 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?

  2. Getting the intersection or difference between to polygon features - 1.7 code used feature1 = feature2.Intersection(feature3); Migrated to featrue1 = feature2.Intersection(feature3.Geometry); Will this generate the same result both Intersection() and Difference()?

  3. 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?

  4. Centroid of polygon feature - IFeature.Centroid() is no longer available - migrated to IFeature.Geometry.Centriod

Thanks Ted

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jany-tenajcommented, Nov 14, 2017

This should do the same without having to depend on Envelope.

Coordinate coordMin = ConvertCoordinate(new Coordinate(extent.MinX, extent.MinY), pStart, pEnd);
Coordinate coordMax = ConvertCoordinate(new Coordinate(extent.MaxX, extent.MaxY), pStart, pEnd);

return new Extent(coordMin.X, coordMin.Y, coordMax.X, coordMax.Y);
1reaction
jany-tenajcommented, Nov 12, 2017

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().

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration from Nixops 1.7 to 2.0 and <deployment>.nix ...
I got the conversion done by doing the following steps for each deployment: I moved the file ${deploymentname}.nix to ...
Read more >
Migrate from magento 1.7 to 2.0
Hi there, For a while I've been trying to export/import data such as customers,products, categories, orders, etc. from my old Magento 1.7.2 ......
Read more >
Need to upgrade from 1.7.2 to 2.0.3 | General Discussion
I need to upgrade a site from CI V 1.7.2 to the latest version, which is V 2.0.3 as I write this. It...
Read more >
Velocity upgrade from 1.7 to 2.0
I am trying to migrate from velocity 1.7 where I use LogChute interface. In my current implementation I have used the log method...
Read more >
I want to migrate Magento 1.7.x to magento 2.x
Before you start the tool installation, make sure that the version of Magento 2 store and Data Migration Tool match.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found