Skip to content

ortho projection with lat_0>45 fails #484

Closed
@akubaryk

Description

@akubaryk

I don't know if this issue belongs upstream, so apologies in advance if this isn't basemap's problem.

I compiled geos 3.9.0 from source and then installed Basemap from https://github.com/matplotlib/basemap/archive/master.zip -- my pip freeze shows basemap 1.2.1 and matplotlib 3.1.1. The base install is Anaconda 2019.10 (Python 3.7.4).

Creating any Basemap with projection='ortho' and lat_0>45 produces an error in the GEOS lib before segfaulting.

Example:

$ python -c "from mpl_toolkits.basemap import Basemap; m = Basemap(projection='ortho',lon_0=0,lat_0=45.1)"
GEOS_ERROR: b'IllegalArgumentException: CGAlgorithmsDD::orientationIndex encountered NaN/Inf numbers'
Segmentation fault (core dumped)

Strangely, this is a non-issue with lat_0 < -45.

I am more than happy to compile other versions of geos (I note 3.3.3 is included in this repo), or do whatever to help debug this.

Edit: Tried to reinstall basemap with the repo's geos-3.3.3 and the error is different, but the result is the same.

$ python -c "from mpl_toolkits.basemap import Basemap; m = Basemap(projection='ortho',lon_0=0,lat_0=44.9)"
$ python -c "from mpl_toolkits.basemap import Basemap; m = Basemap(projection='ortho',lon_0=0,lat_0=45.1)"
GEOS_ERROR: b'IllegalArgumentException: RobustDeterminant encountered non-finite numbers '
Segmentation fault (core dumped)

Another edit... pyproj 1.9.6 works with both of the above commands while 2.4.2-post1 does not.

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