Closed juliusfriedman closed 3 years ago
This constructor takes a GeometryFactory
.
Is this because you want to create an empty GeometryCollection
? If so, why not pass an empty Geometry array?
In any case, it is discouraged to use raw constructors. There is a GeometryFactory.createGeometryCollection()
method for creating empty collections.
The identify of the array is questionable, it must come from somewhere and if I have that in my hand and yet its also in the constructor then the identity becomes shared, The empty array would need to be allocated. I implement non homogenous geometry with a specific factory requirement for precision. This has complications.
Having a single factory always create the empty collection prevents me from having a reasonable left handed sentinel, although its arguable the concept alone could be sentinelized.
To be direct its more for implementing special types of collections which store either geography, geometry or idiomatically.
Thank you for your time and your library.
See also: https://github.com/NetTopologySuite/NetTopologySuite/issues/451
I find that the
GeometryCollection
lacks the constructor providing theGeometryFactory
.Would you please kindly explain why that is so?
Thank you for your time.