Blender addons to make the bridge between Blender and geographic data

Overview

Blender GIS

Blender minimal version : 2.8

Mac users warning : currently the addon does not work on Mac with Blender 2.80 to 2.82. Please do not report the issue here, it's already solved with Blender 2.83. Check the bug report.

Wiki - FAQ - Quick start guide - Flowchart

Functionalities overview

GIS datafile import : Import in Blender most commons GIS data format : Shapefile vector, raster image, geotiff DEM, OpenStreetMap xml.

There are a lot of possibilities to create a 3D terrain from geographic data with BlenderGIS, check the Flowchart to have an overview.

Exemple : import vector contour lines, create faces by triangulation and put a topographic raster texture.

Grab geodata directly from the web : display dynamics web maps inside Blender 3d view, requests for OpenStreetMap data (buildings, roads ...), get true elevation data from the NASA SRTM mission.

And more : Manage georeferencing informations of a scene, compute a terrain mesh by Delaunay triangulation, drop objects on a terrain mesh, make terrain analysis using shader nodes, setup new cameras from geotagged photos, setup a camera to render with Blender a new georeferenced raster.

Comments
  • Add compatibility with dxf importer

    Add compatibility with dxf importer

    https://wiki.blender.org/index.php/User:Cnd/Extensions:2.6/Py/Scripts/Import-Export/DXF_Importer

    it use pyproj to convert coords on the fly SRID info is stored in scene

    enhancement 
    opened by domlysz 48
  • SRTM error on 2.90

    SRTM error on 2.90

    Blender 2.90.1 official release on Windows 10

    Cannot retrieve SRTM data that I was able to retrieve last night. I've tried reading the error log to see if it's simply not reaching the server but can't see this as the same as your warning for submissions.

    So I was having this problem with Blender 2.92 Alpha...no big surprise there. I performed a clean install of 2.90.1 along with clean config files. I've tried opening Blender as Admin, with factory defaults and only BlenderGIS enabled as an addon and I get the following message:

    Traceback (most recent call last): File "C:\Users\John\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\BlenderGIS-master\operators\io_get_srtm.py", line 44, in invoke return self.execute(context)#context.window_manager.invoke_props_dialog(self) File "C:\Users\John\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\BlenderGIS-master\operators\io_get_srtm.py", line 108, in execute with urlopen(rq) as response, open(filePath, 'wb') as outFile: File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\urllib\request.py", line 525, in open response = self._open(req, data) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\urllib\request.py", line 543, in _open '_open', req) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\urllib\request.py", line 503, in _call_chain result = func(*args) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\urllib\request.py", line 1362, in https_open context=self._context, check_hostname=self._check_hostname) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\urllib\request.py", line 1322, in do_open r = h.getresponse() File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\http\client.py", line 1344, in getresponse response.begin() File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\http\client.py", line 306, in begin version, status, reason = self._read_status() File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\http\client.py", line 267, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\socket.py", line 589, in readinto return self._sock.recv_into(b) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\ssl.py", line 1071, in recv_into return self.read(nbytes, buffer) File "C:\Program Files\Blender Foundation\Blender\2.90\python\lib\ssl.py", line 929, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out

    location: :-1

    opened by unity2k 38
  • Basemap crash

    Basemap crash

    I'm attempting to use the Basemap feature of BGIS in Blender 2.79 and no matter which provider I choose, the program crashes to desktop. I did manage to capture the error once, although it's in a screenshot (sorry, I wish it was written to a text file somewhere) - see attached. blender_gis_error

    opened by iblueyonder 37
  • SHP Export failure

    SHP Export failure

    Blender and OS versions

    version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d49d, type: Release build date: 2019-12-04, 14:30:40 platform: Windows 10 64bit professional

    PYTHON INTERACTIVE CONSOLE 3.7.4 (default, Aug 13 2019, 14:10:15) [MSC v.1916 64 bit (AMD64)]

    installed GDAL and numpy from links @ installation instructions

    Describe the bug

    Can not export .shp files

    How to Reproduce

    imported basemap, selected area, imported some roads OSM data and tried to export that out.

    Error message

    Traceback (most recent call last): File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\BlenderGIS-master\operators\io_export_shp.py", line 162, in execute if v.lstrip("-+").isdigit(): AttributeError: 'IDPropertyGroup' object has no attribute 'lstrip'

    location: :-1

    opened by HorribleGoat 35
  • Adding Mac OSX & Linux support in documentation

    Adding Mac OSX & Linux support in documentation

    Hi Dominique,

    I saw your great Wiki and the installation for gdal python bindings inside blender ont this page : https://github.com/domlysz/BlenderGIS/wiki/How-to-install-GDAL It's very helpfull but there is windows only installation. I don't use Windows. According to you, I would want to add other plateform to your wiki.

    Mac Osx Tested on Yosemite 10.10 and Blender 2.74 1) Install Xcode and Macports from this link : https://www.macports.org/install.php

    2) Install gdal and gdal python bindings Open a terminal from spotlight or from Applications => Utilities => Terminal Then type with administratives rights :

    sudo port install gdal py34-gdal

    3) Copy osgeo folder from python bindings to blender

    cp -rf /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/osgeo /where_you_put_blender_on_your_mac/Blender/blender.app/Contents/Resources/2.74/scripts/modules/

    Replace where_you_put_blender_on_your_mac with the path where you run or install Blender

    Test it in Blender Python console like windows installation.


    I think there is a mistake in the wiki with this : Finally, to get GDAL working in Blender, just copy osgeo folder in Python tree folder of Blender (C:\Program Files\Blender Foundation\Blender\2.70\python\lib\site-packages). If I put the osgeo folder in the same path like you recommand (python/lib/site-packages), I'm not able to launch gdal from blender. When I put osgeo in blender's module folder, It works !

    Sorry for my poor english, I'm french ...

    Sincerely,

    Sylvain

    opened by kikislater 23
  • No imageIO module

    No imageIO module

    No imaging library available. ImageIO module was not correctly installed. Please reinstall it or try to install Python GDAL or Pillow module

    this is my problem,when i start BlenderGIS reinstall it 3 times thank you

    opened by nijiushi1 22
  • Gaps between DEM's when trying to achieve tiled terrain project

    Gaps between DEM's when trying to achieve tiled terrain project

    I'm working to take assets imported using BlenderGIS and then work on them with Armory, so I can interact with the terrain and fly through it. Due to the size of some of the rasters 20000+ pixels I am hitting WebGL limitations within Armory exports.

    To resolve this, I attempted to cut my Heightmap up in QGIS and load individual tiles with BlenderGIS, but I got the following gaps between DEM's which were impossible to join: edgegap

    I spotted this had been mentioned before in following posts: https://github.com/domlysz/BlenderGIS/issues/24 https://github.com/domlysz/BlenderGIS/issues/98

    So I switched between pxLoc='CENTER' and Loc='CORNER' in operators/io_import_georaster.py but neither made a difference.

    So I took your advice in one of the posts and just imported the whole heightmap and looked for another route to tile. Having found this script I was able to slice up the mesh into 16 tiles (seperate objects):

    import bpy, bmesh
    from bpy import context
    from  mathutils import Vector
    # bounding box helper methods
    def bbox(ob):
        return (Vector(b) for b in ob.bound_box)
    
    def bbox_center(ob):
        return sum(bbox(ob), Vector()) / 8
    
    def bbox_axes(ob):
        bb = list(bbox(ob))
        return tuple(bb[i] for i in (0, 4, 3, 1))
    
    def slice(bm, start, end, segments):
        if segments == 1:
            return
        def geom(bm):
            return bm.verts[:] + bm.edges[:] + bm.faces[:]
        planes = [start.lerp(end, f / segments) for f in range(1, segments)]
        #p0 = start
        plane_no = (end - start).normalized() 
        while(planes): 
            p0 = planes.pop(0)                 
            ret = bmesh.ops.bisect_plane(bm, 
                    geom=geom(bm),
                    plane_co=p0, 
                    plane_no=plane_no)
            bmesh.ops.split_edges(bm, 
                    edges=[e for e in ret['geom_cut'] 
                    if isinstance(e, bmesh.types.BMEdge)])
    
    
    bm = bmesh.new()
    ob = context.object
    me = ob.data
    bm.from_mesh(me)
    
    o, x, y, z = bbox_axes(ob)        
    
    x_segments = 4
    y_segments = 4
    z_segments = 1
    
    slice(bm, o, x, x_segments)
    slice(bm, o, y, y_segments)
    slice(bm, o, z, z_segments)    
    bm.to_mesh(me)
    
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.separate(type='LOOSE')
    bpy.ops.object.mode_set()
    

    And started importing sat images that I had already split into tiles within QGIS, this appeared to look nice and worked well: whole

    However when I zoomed into the edges I had a similar gap issue: edge

    I feel like I'm getting closer but would appreciate a little help trying to reduce the gap issues.

    The entire sat image in this test is 10000 x 10000 and each tile is 2500 x 2500.

    I'm using the following python extract the square HM from the source asc:

    import os
    os.system(r'''gdalwarp -t_srs EPSG:32758 -wo SOURCE_EXTRA=1000 -tr 8.0 8.0 -dstnodata "0.0" -r cubic -ot Float32 -of GTiff -te 644784.498133 4979531.810674 654784.498133 4989531.810674 "D:/Arma/QGIS/NZ/Doubtful_Sounds/DEM/nz-8m-digital-elevation-model-2012.asc" D:/Arma/QGIS/NZ/Doubtful_Sounds/grid/DEM/square.tif''')
    

    And the following to generate tiled sat images:

    import os
    os.system(r'''gdalwarp -t_srs EPSG:32758 -wo SOURCE_EXTRA=1000 -tr 1.0 1.0 -r cubic -of GTiff -te 644784.498133 4987031.810674 647284.498133 4989531.810674  D:/Arma/QGIS/NZ/Doubtful_Sounds/11_05_19/merged_sat.tif D:/Arma/QGIS/NZ/Doubtful_Sounds/grid/DEM/sat1a.tif''')
    

    I'm running Blender 2.8 with your latest BlenderGIS build. Projection on the project is QGS 84 / UTM zone58S

    .blend file for reference: https://1drv.ms/u/s!AjCedBZJ5Eh4i3-eifFqf19IZefa

    A couple of the Sat tiles: https://1drv.ms/u/s!AjCedBZJ5Eh4jADXJQmz8O3lyLja

    Entire square .asc heightmap: https://1drv.ms/u/s!AjCedBZJ5Eh4jADXJQmz8O3lyLja

    opened by rossoe 21
  • Place the Georef Cam higher

    Place the Georef Cam higher

    Sometimes I get black holes when I render the image:

    screen shot 2016-05-30 at 21 25 32

    This happens when there is a single peak that is higher than surrounding terrain. Is it possible to have the camera higher by default, so it's above all parts of the DEM?

    opened by turban 18
  • Get SRTM TimeoutError: [WinError 10060]

    Get SRTM TimeoutError: [WinError 10060]

    I got this error loading the SRTM file, i try another locations but is the same error.

    2020-02-18 (2)

    TimeoutError: [WinError 10060]An error occurred during the connection attempt since the connected party did not respond properly after a period of time, or an error occurred in the established connection since the connected host could not respond.

    opened by Rhrode 17
  • no map appear on 2.79b

    no map appear on 2.79b

    Hi , I encounter a little problem, i add your addon in blender 2.79b on mac and install gdal. When I try to make same thing of quick start, no map appear, I don't understand why, i try to increase clap to 1m to 25km but nothing seems to work. I don't have error. I can zoom and it seems to be upload new map. It's never work, I'm sure it's my fault but I don't understand what is my mistable (I'm newbie on blender).

    Sorry for my english, I'm from Lyon.

    Thanks you in advance, Best regards

    mac 
    opened by yann-insa 16
  • OpenTopology.org requests are failing

    OpenTopology.org requests are failing

    Blender and OS versions

    Blender 3.0.1, Windows 11 Home 64-bit

    Describe the bug

    All HTTP requests to OpenTopology.org are failing. The site appears to have been replaced by a template webpage.

    How to Reproduce

    Add a basemap, then attempt to add elevation data SRTM from OpenTopology.org

    Error message

    DEBUG:BlenderGIS-master.operators.io_get_dem:103:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL1&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff ERROR:BlenderGIS-master.operators.io_get_dem:120:Http request fails url:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL1&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff, code:401, error:401 DEBUG:BlenderGIS-master.operators.io_get_dem:103:http://www.gmrt.org/services/GridServer?west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&layer=topo&format=geotiff&resolution=high DEBUG:BlenderGIS-master.operators.io_get_dem:103:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL1&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff ERROR:BlenderGIS-master.operators.io_get_dem:120:Http request fails url:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL1&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff, code:401, error:401 DEBUG:BlenderGIS-master.operators.io_get_dem:103:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL3&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff ERROR:BlenderGIS-master.operators.io_get_dem:120:Http request fails url:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL3&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff, code:401, error:401 DEBUG:BlenderGIS-master.operators.io_get_dem:103:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL3&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff ERROR:BlenderGIS-master.operators.io_get_dem:120:Http request fails url:https://portal.opentopography.org/API/globaldem?demtype=SRTMGL3&west=-64.72245898433626&east=-64.64155468658375&south=32.340841356991774&north=32.3819614643209&outputFormat=GTiff, code:401, error:401

    opened by thelabcat 14
  •  check separate object typeerror:invalid id-property type datetime.date not supported

    check separate object typeerror:invalid id-property type datetime.date not supported

    Blender and OS versions

    window blender 3.2

    Describe the bug

    shp import is work,but check separate object throw error in file io_import_shp.py in class IMPORTGIS_OT_shapefile

    error line

    obj[fieldName] = record[i-1]
    

    typeerror:invalid id-property type datetime.date not supported

    How to Reproduce

    this need a shp file in qq group 456247757

    Error message

    shp import is work,but check separate object throw error obj[fieldName] = record[i-1] typeerror:invalid id-property type datetime.date not supported

    opened by qssq1 0
  • My viewport and renders look terrible

    My viewport and renders look terrible

    Hi, Whenever I use the Web Geodata, it's fine, but the aftermath is that my viewport looks like I'm playing on a game with the lowest settings possible. It looks blurry, parts of meshes disappeared, and every time I try to zoom in, meshes and stuff disappear as well.

    wtf

    opened by Unixety 0
  • I am receving error

    I am receving error "Overpass query failed, ckeck logs for more infos." while trying to get OSM data from "Blender"

    Hi, I am trying to get OSM data on my base map using blender 3.4 but while trying to get the OSM data I will receive this message every time "Overpass query failed, check logs for more info." can you please let me know what can I do?

    opened by ErfaanRz 0
  • Cannot reach OpenTopography web service, check logs for more infos - Error when trying to Get SRTM

    Cannot reach OpenTopography web service, check logs for more infos - Error when trying to Get SRTM

    I am using Blender 3.3 on Windows 11 Cannot reach OpenTopography web service, check logs for more infos - Error when trying to Get SRTM

    GIS > WEB GEODATA > GET SRTM > Then that error pops up

    opened by ivicnunez 0
  • Bad setting for

    Bad setting for "invoke_props_dialog" in "nodes_terrain_analysis_reclassify.py"

    The "invoke_props_dialog" routine does not admit "height" parameter. To solve this problem, just comment out the parameters after "self" or remove the "height" param.

    opened by PierreArchambeau 0
Releases(228)
Simple CLI for Google Earth Engine Uploads

geeup: Simple CLI for Earth Engine Uploads with Selenium Support This tool came of the simple need to handle batch uploads of both image assets to col

Samapriya Roy 79 Nov 26, 2022
QLUSTER is a relative orbit design tool for formation flying satellite missions and space rendezvous scenarios

QLUSTER is a relative orbit design tool for formation flying satellite missions and space rendezvous scenarios, that I wrote in Python 3 for my own research and visualisation. It is currently unfinis

Samuel Low 9 Aug 23, 2022
A set of utility functions for working with GeoJSON annotations in Kaibu

kaibu-utils A set of utility functions for working with Kaibu. Create a new repository Create a new repository and select imjoy-team/imjoy-python-temp

ImJoy Team 0 Dec 12, 2021
Map Ookla server locations as a Kernel Density Estimation (KDE) geographic map plot.

Ookla Server KDE Plotting This notebook was created to map Ookla server locations as a Kernel Density Estimation (KDE) geographic map plot. Currently,

Jonathan Lo 1 Feb 12, 2022
Python project to generate Kerala's distrcit level panchayath map.

Kerala-Panchayath-Maps Python project to generate Kerala's distrcit level panchayath map. As of now, geojson files of Kollam and Kozhikode are added t

Athul R T 2 Jan 10, 2022
Xarray backend to Copernicus Sentinel-1 satellite data products

xarray-sentinel WARNING: this product is a "technology preview" / pre-Alpha Xarray backend to explore and load Copernicus Sentinel-1 satellite data pr

B-Open 191 Dec 15, 2022
A utility to search, download and process Landsat 8 satellite imagery

Landsat-util Landsat-util is a command line utility that makes it easy to search, download, and process Landsat imagery. Docs For full documentation v

Development Seed 681 Dec 07, 2022
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

Jazzband 765 Jan 06, 2023
Simulation and Parameter Estimation in Geophysics

Simulation and Parameter Estimation in Geophysics - A python package for simulation and gradient based parameter estimation in the context of geophysical applications.

SimPEG 390 Dec 15, 2022
Hapi is a Python library for building Conceptual Distributed Model using HBV96 lumped model & Muskingum routing method

Current build status All platforms: Current release info Name Downloads Version Platforms Hapi - Hydrological library for Python Hapi is an open-sourc

Mostafa Farrag 15 Dec 26, 2022
Script that allows to download data with satellite's orbit height and create CSV with their change in time.

Satellite orbit height ◾ Requirements Python = 3.8 Packages listen in reuirements.txt (run pip install -r requirements.txt) Account on Space Track ◾

Alicja Musiał 2 Jan 17, 2022
Implemented a Google Maps prototype that provides the shortest route in terms of distance

Implemented a Google Maps prototype that provides the shortest route in terms of distance, the fastest route, the route with the fewest turns, and a scenic route that avoids roads when provided a sou

1 Dec 26, 2021
This repository contains the scripts to derivate the ENU and ECEF coordinates from the longitude, latitude, and altitude values encoded in the NAD83 coordinates.

This repository contains the scripts to derivate the ENU and ECEF coordinates from the longitude, latitude, and altitude values encoded in the NAD83 coordinates.

Luigi Cruz 1 Feb 07, 2022
Open Data Cube analyses continental scale Earth Observation data through time

Open Data Cube Core Overview The Open Data Cube Core provides an integrated gridded data analysis environment for decades of analysis ready earth obse

Open Data Cube 410 Dec 13, 2022
Python library to decrypt Airtag reports, as well as a InfluxDB/Grafana self-hosted dashboard example

Openhaystack-python This python daemon will allow you to gather your Openhaystack-based airtag reports and display them on a Grafana dashboard. You ca

Bezmenov Denys 19 Jan 03, 2023
Python package for earth-observing satellite data processing

Satpy The Satpy package is a python library for reading and manipulating meteorological remote sensing data and writing it to various image and data f

PyTroll 882 Dec 27, 2022
Python 台灣行政區地圖 (2021)

Python 台灣行政區地圖 (2021) 以 python 讀取政府開放平台的 ShapeFile 地圖資訊。歡迎引用或是協作 另有縣市資訊、村里資訊與各種行政地圖資訊 例如: 直轄市、縣市界線(TWD97經緯度) 鄉鎮市區界線(TWD97經緯度) | 政府資料開放平臺: https://data

WeselyOng 12 Sep 27, 2022
Use Mapbox GL JS to visualize data in a Python Jupyter notebook

Location Data Visualization library for Jupyter Notebooks Library documentation at https://mapbox-mapboxgl-jupyter.readthedocs-hosted.com/en/latest/.

Mapbox 620 Dec 15, 2022
ArcGIS Python Toolbox for WhiteboxTools

WhiteboxTools-ArcGIS ArcGIS Python Toolbox for WhiteboxTools. This repository is related to the ArcGIS Python Toolbox for WhiteboxTools, which is an A

Qiusheng Wu 190 Dec 30, 2022
Raster processing benchmarks for Python and R packages

Raster processing benchmarks This repository contains a collection of raster processing benchmarks for Python and R packages. The tests cover the most

Krzysztof Dyba 13 Oct 24, 2022