Introduction
A local clone or copy of a PyDev project can be imported to Eclipse either as a complete project, or by building a backbone PyDev project and copying and pasting selected parts. This post describes how to setup a PyDev backbone and then add packages and modules by copy and paste.
Another alternative is to clone the Framework directly into Eclipse from the repo on Karttur’s GitHub pages as described in the post on Git clone with Eclipse and no project.
Prerequisites
To follow this post you must have cloned Karttur’s GeoImagine Framework to your local machine. Described in the post on Git clone with GitHub Desktop and terminal. You must also have setup Eclipse for PyDev as described in the post on Setup Eclipse for PyDev.
Cloning Karttur’s GeoImagine Framework
The core of Karttur’s GeoImagine Framework is freely available at Github.com. At time of writing this (November 2021), the latest version available is GeoIamgineFrame03. If you did not clone the latest version, see the post on Git clone with GitHub Desktop and terminal.
Selecting packages to include
The easiest option when copying the Framework project packages from a local clone to an Eclipse project is to grab all the packages and drop them in Eclipse. But you can also chose a subset of packages if you are only working with specific datasets and/or using specific processes. You can for instance exclude data source specific packages:
- Copernicus
- Grace
- Landsat
- MODIS
- Sentinel
- SMAP
Most other spatial data sources are imported to the Framework using the ancillary package. Point data representing elevation and ground surveyed points or plots are imported separately (not yet available in the public version).
You can also skip some of the processes, for example:
- Basins (river basin delineation)
- Grass (link to GRASS-GIS processing)
Eclipse project
Start Eclipse and go inte your Workspace, or create a new Workspace. Create a new PyDev project in Eclipse as described in the blogpost Setup Eclipse for PyDev. Just create an empty PyDev project.
Copy packages and modules
The easiest way to add the resources (packages and modules) that you require is to use a file explorer and drag and drop the packages you want to include into the Eclipse project Navigation pane. You can also manually create packages and then drag and drop the individual modules into that package. This gives you more control and you can skip some additional modules, for example the database modules (in the postgresdb package) that links to data sources that you are not interested in.
Package naming
If you cloned Karttur’s GeoImagine Framework as descried in the post Git clone with GitHub Desktop and terminal all the packages in your local clone will have the correct name. The repos actually holding the individual packages are all named with prefix “geoimagineXX” followed by a hyphen (“-“) and then the actual name of the package. Thus, if you cloned or downloaded one of the submodules directly the naming is not correct.