basemap099.4 and geos

Hello, all,
I have some problem with basemap and geos, and can not use Basemap。
In the below I list the information about basemap and geos in my computer. Hope someone would help me to figure out why it does not work. Many thanks in adance !

  1. I type:
    —from mpl_toolkits.basemap import Basemap;
    —mpl_toolkits.basemap.path
    —mpl_toolkits.basemap.version
    The results:
    /usr/local/lib/python2.6/dist-packages/mpl_toolkits/basemap

‘0.99.4’

  1. I also checked the same for matplotlib:
    /usr/lib/pymodules/python2.6/matplotlib
    0.99.0

  2. I type: locate _geoslib:

/home/xiaoni/software/basemap-0.99.3/build/lib.linux-i686-2.6/_geoslib.so
/home/xiaoni/software/basemap-0.99.3/build/temp.linux-i686-2.6/src/_geoslib.o
/home/xiaoni/software/basemap-0.99.3/src/_geoslib.c
/home/xiaoni/software/basemap-0.99.3/src/_geoslib.pyx

/usr/local/lib/python2.6/dist-packages/_geoslib.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/build/lib.linux-i686-2.6/_geoslib.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/src/_geoslib.c
/home/xiaoni/software/temp/basemap-0.99.3-backup/src/_geoslib.pyx

  1. I type: locate
    libgeos.so

/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/geom/.libs/libgeos.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/geom/.libs/libgeos.so.2
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/geom/.libs/libgeos.so.2.2.3
/home/xiaoni/software/temp/geos-3.2.0rc1/source/.libs/libgeos.so
/home/xiaoni/software/temp/lib/libgeos.so
/home/xiaoni/software/temp/lib/libgeos.so.2
/home/xiaoni/software/temp/lib/libgeos.so.2.2.3
/usr/lib/libgeos.so
/usr/local/lib/libgeos.so
/usr/local/lib/backup2/libgeos.so
/usr/local/lib/backup2/libgeos.so.2
/usr/local/lib/backup2/libgeos.so.2.2.3

  1. locate
    libgeos_c.so

/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so.1
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so.1.1.1
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so.1.1.1T
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so.1
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so.1.6.0
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so.1.6.0T
/home/xiaoni/software/temp/lib/libgeos_c.so
/home/xiaoni/software/temp/lib/libgeos_c.so.1
/home/xiaoni/software/temp/lib/libgeos_c.so.1.1.1
/usr/lib/libgeos_c.so
/usr/lib/libgeos_c.so.1
/usr/lib/libgeos_c.so.1.5.0
/usr
/local/lib/libgeos_c.so.1
/us
r/local/lib/libgeos_c.so.1.6.0
/usr/local/lib/backup2/libgeos_c.so
/usr/local/lib/backup2/libgeos_c.so.1
/usr/local/lib/backup2/libgeos_c.so.1.1.1

  1. I also type:
    ls -l /usr/local/lib/python2.6/dist-packages/_geoslib.so
    It does not linked to any files (no pointer)

  2. ls -l /usr/local/lib/libgeos.so
    /usr/local/lib/libgeos.so -> libgeos-3.2.0.so

  3. ls -l /usr/local/lib/libgeos.so
    /usr/local/lib/libgeos.so -> libgeos-3.2.0.so

  4. ls -l /usr/local/lib/backup2/libgeos.so.2
    /usr/local/lib/backup2/libgeos.so.2 -> libgeos.so.2.2.3

  5. ls -l /usr/local/lib/backup2/libgeos.so.2.2.3
    /usr/local/lib/backup2/libgeos.so.2.2.3, no
    links

It seems that Basemap can not be used because of something wrong with the installation of GEOS ? Anyone would give some hints for help ? I appreciate it a lot !!

xiaoni

xiaoni wrote:

Hello, all,
     I have some problem with basemap and geos, and can not use Basemap。
In the below I list the information about basemap and geos in my computer. Hope someone would help me to figure out why it does not work. Many thanks in adance !

1) I type:
---from mpl_toolkits.basemap import Basemap;
---mpl_toolkits.basemap.__path__
---mpl_toolkits.basemap.__version__
The results:
    /usr/local/lib/python2.6/dist-packages/mpl_toolkits/basemap
    '0.99.4'

2) I also checked the same for matplotlib:
    /usr/lib/pymodules/python2.6/matplotlib
    0.99.0

3) I type: locate _geoslib:

/home/xiaoni/software/basemap-0.99.3/build/lib.linux-i686-2.6/_geoslib.so
/home/xiaoni/software/basemap-0.99.3/build/temp.linux-i686-2.6/src/_geoslib.o
/home/xiaoni/software/basemap-0.99.3/src/_geoslib.c

/home/xiaoni/software/basemap-0.99.3/src/_geoslib.pyx /usr/local/lib/python2.6/dist-packages/_geoslib.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/build/lib.linux-i686-2.6/_geoslib.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/src/_geoslib.c
/home/xiaoni/software/temp/basemap-0.99.3-backup/src/_geoslib.pyx

4) I type: locate libgeos.so <http://libgeos.so/>

/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/geom/.libs/libgeos.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/geom/.libs/libgeos.so.2
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/geom/.libs/libgeos.so.2.2.3
/home/xiaoni/software/temp/geos-3.2.0rc1/source/.libs/libgeos.so
/home/xiaoni/software/temp/lib/libgeos.so
/home/xiaoni/software/temp/lib/libgeos.so.2
/home/xiaoni/software/temp/lib/libgeos.so.2.2.3
/usr/lib/libgeos.so
/usr/local/lib/libgeos.so
/usr/local/lib/backup2/libgeos.so
/usr/local/lib/backup2/libgeos.so.2
/usr/local/lib/backup2/libgeos.so.2.2.3

5) locate libgeos_c.so <http://libgeos_c.so/>

/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so.1
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so.1.1.1
/home/xiaoni/software/temp/basemap-0.99.3-backup/geos-2.2.3/source/capi/.libs/libgeos_c.so.1.1.1T
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so.1
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so.1.6.0
/home/xiaoni/software/temp/geos-3.2.0rc1/capi/.libs/libgeos_c.so.1.6.0T
/home/xiaoni/software/temp/lib/libgeos_c.so
/home/xiaoni/software/temp/lib/libgeos_c.so.1
/home/xiaoni/software/temp/lib/libgeos_c.so.1.1.1
/usr/lib/libgeos_c.so
/usr/lib/libgeos_c.so.1
/usr/lib/libgeos_c.so.1.5.0
/usr /local/lib/libgeos_c.so.1
/us r/local/lib/libgeos_c.so.1.6.0
/usr/local/lib/backup2/libgeos_c.so
/usr/local/lib/backup2/libgeos_c.so.1
/usr/local/lib/backup2/libgeos_c.so.1.1.1

6) I also type:
ls -l /usr/local/lib/python2.6/dist-packages/_geoslib.so
It does not linked to any files (no pointer)

2) ls -l /usr/local/lib/libgeos.so
/usr/local/lib/libgeos.so -> libgeos-3.2.0.so <http://libgeos-3.2.0.so/>

3) ls -l /usr/local/lib/libgeos.so
/usr/local/lib/libgeos.so -> libgeos-3.2.0.so

4) ls -l /usr/local/lib/backup2/libgeos.so.2
/usr/local/lib/backup2/libgeos.so.2 -> libgeos.so <http://libgeos.so/>.2.2.3

5) ls -l /usr/local/lib/backup2/libgeos.so.2.2.3
/usr/local/lib/backup2/libgeos.so.2.2.3, no links

It seems that Basemap can not be used because of something wrong with the installation of GEOS ? Anyone would give some hints for help ? I appreciate it a lot !!

xiaoni

Xianoi: You never said what the actual problem is with basemap. I have seen segfaults when there are two versions of geos installed (version 2 and version 3) and you pick up the header from one version and lib from the other version. I suggest setting the GEOS_DIR env var to /usr/local/lib and re-running the basemap install (python setup.py install), after deleting the existing build directory. Hopefully then it will grab both the header and lib for version 3.2.0 (which by the way is a pre-release, as yet untested with basemap).

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg