I am looking to work with hosted GeoJSON data within QGIS. I have read a number of posts, such as add GeoJSON content in QGIS that shows very easily how to load GeoJSON into QGIS. I have had limited success with this process, however, for the most part I have not been able to consistently load hosted GeoJSON data into QGIS. I have tested with a few sources, including hosting my own data in Github with the same results (see the link below). I repeatedly get a not a valid data source error on load. My question, is there a standard for hosted GeoJSON data in order to load into QGIS, or are there settings that must be configured within QGIS?


1 Answer 1


the problem is your link points to a web page on github, you need to link to the raw content. if you use curl on that url you'll see html content coming back.

if you click the 'raw' button on the Github page you'll get https://raw.githubusercontent.com/ryangarnett/geodata/master/locations.geojson

Just tried this in qgis 2.18.7, loading with the 'protocol'/'geojson' setting and it loads fine.

EDIT If it works at home but not at work, check with your IT people. It may be that they're using a proxy. Typically browsers get set up to work with a proxy, but they may not have done that for QGIS. You can set this up in Settings > Network > Use a proxy for web access. A quick way to check is to try opening the plugin manager in your work setting. If it fails to connect, it's probably a proxy issue. See this answer for suggested settings.

  • Thanks for the info, but I cannot seem to replicate. I used the same URL and process. Only difference...QGIS 2.18.6 and potentially different encoding. I tried "system" and "ISO-8859-1" Jun 5, 2017 at 12:19
  • I also tried to verify with data from geojson.xyz ...unsuccessful using the direct url location Jun 5, 2017 at 12:27
  • 1
    i'd suggest using 'utf-8' as the encoding, that's the default in 2.18.7 and it works well for github raw links and direct links on geojson.xyz
    – Steven Kay
    Jun 5, 2017 at 13:08
  • Thanks...still the same thing. Are there settings within QGIS that need to be altered? Jun 5, 2017 at 13:33
  • Update...I have been testing at work with no luck. I just tried at home and it works! Maybe a firewall setting? Will continue to test and share back...thanks! Jun 5, 2017 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.