Open UliEgger opened 1 year ago
I guess gaiaImport.GetDouble has still to be called four times at that place, but without creating the evelope.
If I use the current version of GaiaGeoWriter to write the geometry, the problem does not occur. It occurs in case of the blob has been wirtten by an earlier version.
It looks like current version created a null envelope for a Point with X = 550123 and Y = double.NaN
and this envelope is valid.
Currently used version is 2.0.0 Previously used version, where the bug did not occur when reading but wirtes blobs that cannot be read with the current version was 1.14.4
In the earlier used version of NetTopologySuite the constructor of envelope / Init method did not throw an exception when using double.NaN.
I have created a pull request
Dear developers,
It seems to be normal, that a Coordinate can contain an Ordinate double.NaN as defined in NetTopologySuite.Geometries.Coordinate.NullOrdinate
public const double NullOrdinate = NaN
https://nettopologysuite.github.io/NetTopologySuite/api/NetTopologySuite.Geometries.Coordinate.html
A point that contains such a Coordinate can be stored to a database as a blob unsing GaiaGeoWriter.Write(Geometry geom)
However when using GaiaGeoReader.Read to get back the Geometry from the blob value (when reading from database), an exception is thrown at this location:
Evenlope.Init
Further down in the call stack, we see that an Envelope is created but not used in GaiaGeoReader.Read:
Would it be possible that this is removed and a new version of the nuget-Package can be provided ?
Thank you very much, best regards, Ulrich Egger