Skip to content

Crash in WKT of MultiPoint including an empty Point #305

@jorisvandenbossche

Description

@jorisvandenbossche

Using the Python pygeos package to show the error (from pygeos/pygeos#134):

# creating a MultiPoint with that includes an empty Point
import pygeos

point = pygeos.points(1,1)  
box = pygeos.box(2,2,4,4) 
point_empty = pygeos.intersection(p, box)

mp_empty  = pygeos.multipoints([point, point_empty])                  

Converting to WKB raises an informative error:

>>> pygeos.to_wkb(mp_empty)      
...
GEOSException: IllegalArgumentException: Empty Points cannot be represented in WKB

However, converting to WKT crashes:

>>> pygeos.to_wkt(mp_empty)    
Segmentation fault (core dumped)

I am not 100% sure this is a GEOS issue, since there might be something wrong on the PyGEOS side. But posting here in case somebody knows or can confirm this is a GEOS bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions