Skip to content

Instantly share code, notes, and snippets.

@mkpaa
mkpaa / gist:e8a5b349d02c6677e38d9ac505019312
Last active January 18, 2023 08:28
Running standalone QGIS3 Python scripts in MacOS/OSX

Getting started with QGIS 3.12 and Python standalone scripts in MacOS

I spent several hours to get everything working as I wanted. Here is what I did. I kind of hope someone shows up telling "there is already a tool for that", but at least I was not able to find clear instructions how to do this. Any additions/corrections are welcome.

What I tried to achieve

  • Use pyenv on command line to switch between other Python versions and the one included in QGIS
  • Use QGIS features from external Python script to visualize and process spatial data
  • Use editor of my choice, in this case Visual studio code
@mkpaa
mkpaa / daynight.kml
Created November 26, 2018 21:43
KML route with different line style for day and night
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"><Document><Style id="dayMarker">
<IconStyle>
<Icon>
<href>http://localhost:4000/img/circlemarker/wb1.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="nightMarker">
<IconStyle>
<Icon>