Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic feature #85

Merged
merged 8 commits into from
Jul 25, 2017
Merged

Conversation

supermihi
Copy link
Contributor

Fixes #56.

@matt-lethargic appears that you've been just a day faster than me for once again on this! :) However, my approach also adds the geometrie's type as a generic parameter, which IMHO makes sense: a library consumer expecting a specific type of properties most probably will also expect a specific type of geometry.

If one doesn't want to specify the geometry type, one can use Feature<IGeometryObject, TProps>. Or perhaps it makes sense to keep both one- and two-parameter generic classes?

supermihi and others added 4 commits June 11, 2017 15:49
Allows to run unit tests in visual studio without installing the VSIX extension. This appears to be the recommended way of running tests within VS now. Also, in VS2017 it was the only way I managed to run the test (and only using the 3.8.0 alpha version of the package).
@matt-lethargic
Copy link
Member

Hey @supermihi sorry, was in the mood for coding the other night and did this. Have got the code for what I guess you are doing on my pc, but not committed, Will checkout your PR

@supermihi
Copy link
Contributor Author

@matt-lethargic Any news on this topic?

@matt-lethargic
Copy link
Member

@supermihi Sorry I've been pulled away from this for to long. There are conflicts in the PR, would you be able to fix them so that we can compare your changes V's the change I put in and can then have a discussion regarding your changes??

@supermihi
Copy link
Contributor Author

Sure. Basically, I have added another doubly-generic feature class, that specifies both the geometry and the properties types. I think there's no problem in keeping them both. The biggest issue IMHO is that #80 becomes a real problem here (see the in-code comment on Feature<TGeometry, TProps>.Equals).

@matt-lethargic
Copy link
Member

@supermihi I've had a look at this and am happy to merge it, thank you for providing tests.
With regards to #80 I completely understand where you coming from and perhaps we should be including a check on the id for the other feature classes. This could lead to a breaking change though, so I'm pondering this!

@matt-lethargic matt-lethargic merged commit 9d579d6 into GeoJSON-Net:master Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants