-
Notifications
You must be signed in to change notification settings - Fork 14
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
Updates for v2. #8
Conversation
I'm not positive about what to do to handle what used to be It's really specific to GeoJSON, so my current plan is to have GeoJSON use something like
Maybe it does make sense for it to go here instead, but it'll be easy enough to add later. |
I dislike the removal of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the removal of IFeature
and IAttributesTable
interfaces.
In my code I have lots of special purpose feature classes that I can't use anymore.
As this is not just a supporting library for NetTopologySuite.IO projects I prefer keeping them or at least provide a base class for feature.
OK. Assuming the idea is similar to I personally favor the way NetTopologySuite.IO.GPX handles |
Also move files around, no need for the sub-folder
Do we need to support modifying the feature through the interface? If not, then |
@FObermaier ping ^ Once |
Any news on this one? Thanks! |
OK, I haven't heard back in more than a couple of weeks, and I really want this to coincide with .NET Core 3.0, so I'm going to make a few decisions:
|
- IFeature is now read-write - IFeature.Attributes is now IDictionary<string, object>, with a base class to make it easier to implement
Sorry for the delay, I have been on vacation. |
Can you please elaborate on what the issue is, now that there's a |
Also, what about the idea of the
|
@airbreather neither I like the simplicity of How about: public interface IAttributesTable : IReadOnlyDictionary<string, object>
{
new object this [string key] { get; set; }
Type GetType(string name);
} |
Hmm, the concept of "unset/null" actually suggests that neither
Do we actually need to support editing an instance of If we do need to support editing via the interface (and I kinda hope we don't...), perhaps we should have more than one interface, something like these (names are tentative):
|
Why? I did get along with This interface has been around for quite some time and I'm sure there are implementations around (besides mine) that actively use it. We force everyone of these to make (substantial) adaptations to use NTS v2. I don't recall any NTS user complain about the |
I'm going to go ahead and bring back I'd still like to have a type hierarchy that's a better match for the problem(s) it's trying to solve, but I don't think the existing solution is bad enough to justify the costs of any of the alternatives I've considered over the course of this discussion. Responses below:
At first, I opened #6 to ask "why not?". It wasn't obvious what With v2 giving a rare opportunity to make intentional breaking changes, I didn't want to miss the opportunity to eliminate this, if it was indeed redundant with what the system already offers us. Through our discussions, you persuaded me that this interface is not fully redundant (sorry if this fact wasn't clear from my previous comment, I did rush through it), but after thinking through the things it offers that
So I posited that a better way to model this solution would encode that information in the type system... and noted that it might be good enough to just have the interface(s) support reading. That's what led up to my previous comment on this thread.
It's not just about that, it's about finding appropriate solutions to the problems that we set out to solve. A solution that solves the problem is infinitely better than one that doesn't.
#3 and #6 are complaints that resulted from me trying to work with these. #6 specifically is one I had a few years back when switching our application at work to use NTS, and never bothered to raise up because that part of the code doesn't really get used much anyway. |
With surface-level improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @airbreather for all your work on this and for pushing NTS to v2.
Perhaps we can bring back (and extend) AttributesTableTest
.
thanks @airbreather for this 👍 |
IFeature
instances are goneGetOptionalValue
(resolves Simplify fetching values for optional attributes in (I)AttributesTable #3)