How to Install the Basemap and the GEOS Library?

In summary, you are having trouble with the third step of the installation process, which is to install the GEOS library. You need to try installing it from the source code included with basemap, or using a different distribution with its own package manager.
  • #1
ecastro
254
8
I have been following this procedure on installing the basemap and the GEOS library: https://matplotlib.org/basemap/users/installing.html

I have searched through other alternatives, but they seem to provide the same procedure. I need help on understanding the "Installation" process. I am using Python 3.6.1 on Windows 10.
 
Technology news on Phys.org
  • #2
ecastro said:
I have been following this procedure on installing the basemap and the GEOS library: https://matplotlib.org/basemap/users/installing.html

I have searched through other alternatives, but they seem to provide the same procedure. I need help on understanding the "Installation" process. I am using Python 3.6.1 on Windows 10.
Which part are you having trouble with?
 
  • #3
I have trouble specifically on the third step, but I am not sure.

I have 'matplotlib' and 'numpy' installed in my Python, but I don't know how to install the 'PROJ4' item under the requirements (however, I did not see this item on other references), so I am not sure if I am already done on the first step of the 'Installation' process, i.e. "Install pre-requisite requirements.". I had downloaded the basemap-tar file and extracted it, and I guess the "cd to the basemap-X.Y.Z directory" means that I need to open a command prompt inside the directory of the basemap folder. The third step says "Install the GEOS library", but I don't know how. The step shows that I need the command prompt to be go inside the 'geos-3.3.3' folder, which I did and then 'export GEOS_DIR=</usr/local/>', but the command prompt doesn't seem to process this line, it just says that the syntax of the command is incorrect.
 
  • #4
ecastro said:
then 'export GEOS_DIR=</usr/local/>'
I don't believe you're supposed to type the angle brackets or the quotes.

Install the GEOS library. If you already have it on your system, just set the environment variable GEOS_DIR to point to the location of libgeos_c and geos_c.h (if libgeos_c is in /usr/local/lib and geos_c.h is in /usr/local/include, set GEOS_DIR to /usr/local). Then go to next step. If you don’t have it, you can build it from the source code included with basemap by following these steps:
I would look to see if the GEOS library is already installed. If it is, you don't need to to the export step.
 
  • #5
I also tried it without the brackets and it said that the 'export' syntax is undefined.

How do I know if it is installed?
 
  • #6
This is a command to export an environment variable under Linux. Windows doesn't know this command. I'm not familiar with this modules, but it seems that you need a compiler for it.

With Windows it's often better to use this Scientific Python Distributions with their own package manager like Anaconda: https://anaconda.org/anaconda/basemap
 
  • #7
Thank you!
 

1. What is the Basemap and GEOS Library?

The Basemap and GEOS Library are two important tools used in geographic data analysis and visualization. The Basemap is a Python library that allows for the creation of high-quality maps and figures, while the GEOS Library is a C++ library used for geometric operations on geographic data such as points, lines, and polygons.

2. How do I install the Basemap and GEOS Library?

The installation process for the Basemap and GEOS Library depends on your operating system. For Windows users, the easiest way to install is through the Anaconda distribution. For Mac and Linux users, you can use the pip command in the terminal to install both libraries.

3. Are there any dependencies or requirements for installing the Basemap and GEOS Library?

Yes, there are a few dependencies and requirements that need to be installed before the Basemap and GEOS Library can be installed. These include Python, NumPy, and Matplotlib. It is recommended to have the latest versions of these dependencies to avoid any potential conflicts.

4. Can I use the Basemap and GEOS Library with other programming languages?

Yes, you can use the Basemap and GEOS Library with other programming languages such as R and Java. However, the installation process may differ and you may need to use different commands or packages to install the libraries.

5. Are there any tutorials or resources available for learning how to use the Basemap and GEOS Library?

Yes, there are many tutorials and resources available online for learning how to use the Basemap and GEOS Library. Some useful resources include the official documentation for both libraries, online tutorials and courses, and community forums where you can ask for help and guidance from experienced users.

Similar threads

  • Programming and Computer Science
Replies
15
Views
5K
  • Programming and Computer Science
Replies
25
Views
2K
  • Programming and Computer Science
Replies
1
Views
913
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
4
Views
420
  • Programming and Computer Science
Replies
8
Views
881
  • Programming and Computer Science
Replies
7
Views
496
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
2
Views
744
Back
Top