peterstace / simplefeatures

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification
MIT License
127 stars 19 forks source link

Fix bug in Envelope's TransformXY method #554

Closed peterstace closed 11 months ago

peterstace commented 11 months ago

Description

The bug occurs when the transform function doesn't preserve the property that the envelopes min and max points remain the min and max points after the transformation. There is no expectation that this transform will preserve this property (e.g. WGS84 to WebMercator doesn't preserve the ordering due to the inverted Y-axis of WebMercator pixel space).

The fix is to reorder the min/max before constructing the new envelope.

Check List

Have you:

Related Issue