Open Source Computing and GIS in the UK

Travels in a digital world

Extending Portable GIS

| Comments

I was asked recently how someone could add new libraries, python programmes etc to their copy of Portable GIS. It’s fairly simple, but here’s a quick guide. I’ll use ogr2osm as an example.

ogr2osm is a tool for converting any ogr-readable data source into an osm file for loading into openstreetmap. It requires gdal with python bindings, and lxml, both of which are included in PortableGIS.

To install, simply download the zip file from github and unzip it into the apps folder in your PortableGIS installation.

To run it, open a command prompt by clicking the “Loader” button from the menu. This is completely non-intuitive, and I apologise- in the next version I will call it something more generic! Anyhow, clicking the Loader button opens a command prompt with all the necessary environment variables set.

To ensure that you use the correct version of Python, you need to call it with the path to the Portable Python executable in your PortableGIS installation. So… let’s assume PortableGIS is installed in the F drive, then in your Loader command prompt you would type the following (substituting your own path to the shapefile or other spatial format you wish to convert):

F:\usbgis\apps\python27\App\python.exe F:\usbgis\apps\ogr2osm\ path\to\your\shapefile

See the instructions for ogr2osm for all the different parameters you can use.