Skip to content

Instantly share code, notes, and snippets.

@Joonalai
Joonalai / readme.md
Last active March 23, 2020 14:14 — forked from AsgerPetersen/readme.md
PyCharm remote debug of QGIS on OSX

Based heavily on this old guide by TimLinux http://linfiniti.com/2012/09/remote-debugging-qgis-plugins-using-pycharm/

  • In PyCharm click menu "Run -> Edit Configurations" (Or click Edit Configurations in the dropdown in the toolbar)
  • Click the plus to add a new "Python Remote Debug" config
  • Name the config. Use port 53100 (Could probably be any high port)
  • Add to the python code:
import sys
sys.path.append('/home/j/.IntelliJIdea2019.3/config/plugins/python/pydevd-pycharm.egg')
@Joonalai
Joonalai / globe_view.py
Last active January 16, 2020 18:26
Simple script to have load countries in a globe view similar to the globe image in https://www.gispo.fi/en/blog/the-power-of-community-30daymapchallenge/
'''
Open the script in QGIS Python Console editor window, run it and run the command load_globe_view() in the
QGIS Python console.
Inspired by blog posts at http://www.statsmapsnpix.com/2019/09/globe-projections-and-insets-in-qgis.html
and https://www.gispo.fi/en/blog/the-power-of-community-30daymapchallenge/.
'''
NATURAL_EARTH_BASE_URL = "https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/"
def load_natural_earth_data():