Re: [geos-devel] [GEOS] #1049: Inconsistency with POINT(nan nan)

2020-12-09 Thread GEOS
#1049: Inconsistency with POINT(nan nan)
+---
 Reporter:  Mike Taves  |   Owner:  geos-devel@…
 Type:  defect  |  Status:  closed
 Priority:  major   |   Milestone:  3.10.0
Component:  Default | Version:  master
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:  |
+---
Changes (by Paul Ramsey ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"693c1aa855263198d42153da0d12f56b2b7a6991/git" 693c1aa/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="693c1aa855263198d42153da0d12f56b2b7a6991"
 Correctly return isEmpty for hand-built empty points, closes #1049
 }}}

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel


[geos-devel] [GEOS] #1049: Inconsistency with POINT(nan nan)

2020-09-23 Thread GEOS
#1049: Inconsistency with POINT(nan nan)
+--
 Reporter:  Mike Taves  |  Owner:  geos-devel@…
 Type:  defect  | Status:  new
 Priority:  major   |  Milestone:
Component:  Default |Version:  master
 Severity:  Unassigned  |   Keywords:
+--
 Consider two points that use the "NaN" convention to try and create `POINT
 EMPTY`. This example uses shapely:
 {{{
 from shapely import wkt
 from shapely.geometry import Point

 # two different ways to create a point with NaN
 point_nan_from_val = Point(float('nan'), float('nan'))
 point_nan_from_wkt = wkt.loads('point(nan nan)')

 point_nan_from_val.is_empty  # False
 point_nan_from_wkt.is_empty  # True

 point_nan_from_val.wkt  # POINT (nan nan)
 point_nan_from_wkt.wkt  # POINT EMPTY
 }}}
 And a similar example with PyGEOS (master), which side-steps #1048 by
 [https://github.com/pygeos/pygeos/pull/179 correctly writing WKB] for
 POINT EMPTY:
 {{{
 import pygeos

 point_nan_from_val = pygeos.points(float('nan'), float('nan'))
 point_nan_from_wkt = pygeos.Geometry('point(nan nan)')

 pygeos.is_empty(point_nan_from_val)  # False
 pygeos.is_empty(point_nan_from_wkt)  # True

 # Different WKT
 pygeos.to_wkt(point_nan_from_val)  # POINT (nan nan)
 pygeos.to_wkt(point_nan_from_wkt)  # POINT EMPTY

 # Same WKB
 pygeos.to_wkb(point_nan_from_val) == pygeos.to_wkb(point_nan_from_wkt)  #
 True
 }}}
 The two points behave very differently, with different WKT and same WKB
 (when #1048 is resolved).

 Seeing that `POINT EMPTY` is generally serialised in WKB as `POINT(nan
 nan)` (#1005), it could be expected that geometries created with nan
 coordinate values should be `POINT EMPTY` too, and not non-empty points
 with nan coordinates.

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel