Hi all,
I noticed that GeoAPI defines some basic value types like Coordinate and Envelope as reference types (class) instead of value types (struct).
I suppose this is a consequence of the Java port. Changing these to value types would cause a lot of other changes in the code, maybe even some bugs (if the compiler fails to identify some of the problems caused by the conversion). But this is an important change that I think GeoAPI/NTS could benefit a lot from in the long run. Value types reduce memory usage and usually improve performance. Reducing memory usage is especially important for mobile devices. And in cases where for some reason a reference type is required, the code could work with interfaces (ICoordinate, IEnvelope) which would cause the values to be boxed.
I also suppose this would deviate further the C# code from the original Java library and make future synchronization harder. Still, when porting from Java to C# it makes sense to put to work all the extra tools that .NET provides.
I just noticed that the Interval type is already defined as a struct, so there has been some experience with this matter. But maybe that type is less used and it has been easier to convert.
Best regards,
Ivan