-
Notifications
You must be signed in to change notification settings - Fork 310
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
PrecisionModel issues #632
Comments
The You have to do that yourself. |
Ok, makes sense. However, still a bit confused about the output:
Example: var factory2 = new GeometryFactory();
var ring = factory2.CreateLinearRing(new Coordinate[]
{
new(5.53019009655585414, 65.32111738273543722),
new(5.59648652009346037, 65.39004588297750331),
new(5.6089682537873129, 65.26335043965949012),
new(5.53019009655585414, 65.32111738273543722)
});
var factoryPoly = factory2.CreatePolygon(ring);
// POLYGON ((5.530190096555854 65.32111738273544, 5.59648652009346 65.3900458829775, 5.608968253787313 65.26335043965949, 5.530190096555854 65.32111738273544)) So if it uses the custom precision model, it should have been 3 decimals.. and it's not using the default one either ? |
The coordinates assigned to the geometries are not rounded to the precision model. You can verify that by checking |
I am running into an issue I don't fully understand, using PrecisionModel (NetTopologySuite.Core/1.15.3).
By setting precision to 1000, I expect everything to be rounded off to 3 decimals. When using WktReader, I get expected roundoffs. However, creating the same geometry using factory or constructor, it seems to use 4 decimals.
Is this expected behaviour, or am I missing something here ?
Example code:
The text was updated successfully, but these errors were encountered: