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)
Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Ayush Mishra 3 May 06, 2022
A multi-page streamlit app for the geospatial community.

A multi-page streamlit app for the geospatial community.

Qiusheng Wu 522 Dec 30, 2022
This app displays interesting statistical weather records and trends which can be used in climate related research including study of global warming.

This app displays interesting statistical weather records and trends which can be used in climate related research including study of global warming.

0 Dec 27, 2021
Solving the Traveling Salesman Problem using Self-Organizing Maps

Solving the Traveling Salesman Problem using Self-Organizing Maps This repository contains an implementation of a Self Organizing Map that can be used

Diego Vicente 3.1k Dec 31, 2022
Processing and interpolating spatial data with a twist of machine learning

Documentation | Documentation (dev version) | Contact | Part of the Fatiando a Terra project About Verde is a Python library for processing spatial da

Fatiando a Terra 468 Dec 20, 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
Advanced raster and geometry manipulations

buzzard In a nutshell, the buzzard library provides powerful abstractions to manipulate together images and geometries that come from different kind o

Earthcube Lab 30 Jun 20, 2022
Google Maps keeps old satellite imagery around for a while – this tool collects what's available for a user-specified region in the form of a GIF.

google-maps-at-88-mph The folks maintaining Google Maps regularly update the satellite imagery it serves its users, but outdated versions of the image

Noah Doersing 111 Sep 27, 2022
A Python tool to display geolocation information in the traceroute.

IP2Trace Python IP2Trace Python is a Python tool allowing user to get IP address information such as country, region, city, latitude, longitude, zip c

IP2Location 22 Jan 08, 2023
Manage your XYZ Hub or HERE Data Hub spaces from Python.

XYZ Spaces for Python Manage your XYZ Hub or HERE Data Hub spaces and Interactive Map Layer from Python. FEATURED IN: Online Python Machine Learning C

HERE Technologies 30 Oct 18, 2022
Geocode rows in a SQLite database table

Geocode rows in a SQLite database table

Chris Amico 225 Dec 08, 2022
Manipulation and analysis of geometric objects

Shapely Manipulation and analysis of geometric objects in the Cartesian plane. Shapely is a BSD-licensed Python package for manipulation and analysis

3.1k Jan 03, 2023
Python Data. Leaflet.js Maps.

folium Python Data, Leaflet.js Maps folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js

6k Jan 02, 2023
Creates 3D geometries from 2D vector graphics, for use in geodynamic models

geomIO - creating 3D geometries from 2D input This is the Julia and Python version of geomIO, a free open source software to generate 3D volumes and s

3 Feb 01, 2022
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
This GUI app was created to show the detailed information about the weather in any city selected by user

WeatherApp Content Brief description Tools Features Hotkeys How it works Screenshots Ways to improve the project Installation Brief description This G

TheBugYouCantFix 5 Dec 30, 2022
Imports VZD (Latvian State Land Service) open data into postgis enabled database

Python script main.py downloads and imports Latvian addresses into PostgreSQL database. Data contains parishes, counties, cities, towns, and streets.

Kaspars Foigts 7 Oct 26, 2022
A package to fetch sentinel 2 Satellite data from Google.

Sentinel 2 Data Fetcher Installation Create a Virtual Environment and activate it. python3 -m venv venv . venv/bin/activate Install the Package via pi

1 Nov 18, 2021
A service to auto provision devices in Aruba Central based on the Geo-IP location

Location Based Provisioning Service for Aruba Central A service to auto provision devices in Aruba Central based on the Geo-IP location Geo-IP auto pr

Will Smith 3 Mar 22, 2022
FDTD simulator that generates s-parameters from OFF geometry files using a GPU

Emport Overview This repo provides a FDTD (Finite Differences Time Domain) simulator called emport for solving RF circuits. Emport outputs its simulat

4 Dec 15, 2022