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)
PyTorch implementation of ''Background Activation Suppression for Weakly Supervised Object Localization''.

Background Activation Suppression for Weakly Supervised Object Localization PyTorch implementation of ''Background Activation Suppression for Weakly S

34 Dec 27, 2022
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
A toolbox for processing earth observation data with Python.

eo-box eobox is a Python package with a small collection of tools for working with Remote Sensing / Earth Observation data. Package Overview So far, t

13 Jan 06, 2022
Streamlit Component for rendering Folium maps

streamlit-folium This Streamlit Component is a work-in-progress to determine what functionality is desirable for a Folium and Streamlit integration. C

Randy Zwitch 224 Dec 30, 2022
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 03, 2023
Focal Statistics

Focal-Statistics The Focal statistics tool in many GIS applications like ArcGIS, QGIS and GRASS GIS is a standard method to gain a local overview of r

Ifeanyi Nwasolu 1 Oct 21, 2021
A multi-page streamlit app for the geospatial community.

A multi-page streamlit app for the geospatial community.

Qiusheng Wu 522 Dec 30, 2022
🌐 Local tile server for viewing geospatial raster files with ipyleaflet or folium

🌐 Local Tile Server for Geospatial Rasters Need to visualize a rather large (gigabytes) raster you have locally? This is for you. A Flask application

Bane Sullivan 192 Jan 04, 2023
GeoIP Legacy Python API

MaxMind GeoIP Legacy Python Extension API Requirements Python 2.5+ or 3.3+ GeoIP Legacy C Library 1.4.7 or greater Installation With pip: $ pip instal

MaxMind 230 Nov 10, 2022
Client library for interfacing with USGS datasets

USGS API USGS is a python module for interfacing with the US Geological Survey's API. It provides submodules to interact with various endpoints, and c

Amit Kapadia 104 Dec 30, 2022
WebGL2 powered geospatial visualization layers

deck.gl | Website WebGL2-powered, highly performant large-scale data visualization deck.gl is designed to simplify high-performance, WebGL-based visua

Vis.gl 10.5k Jan 08, 2023
Simple, concise geographical visualization in Python

Geographic visualizations for HoloViews. Build Status Coverage Latest dev release Latest release Docs What is it? GeoViews is a Python library that ma

HoloViz 445 Jan 02, 2023
When traveling in the backcountry during winter time, updating yourself on current and recent weather data is important to understand likely avalanche danger.

Weather Data When traveling in the backcountry during winter time, updating yourself on current and recent weather data is important to understand lik

Trevor Allen 0 Jan 02, 2022
iNaturalist observations along hiking trails

This tool reads the route of a hike and generates a table of iNaturalist observations along the trails. It also shows the observations and the route of the hike on a map. Moreover, it saves waypoints

7 Nov 11, 2022
gpdvega is a bridge between GeoPandas and Altair that allows to seamlessly chart geospatial data

gpdvega gpdvega is a bridge between GeoPandas a geospatial extension of Pandas and the declarative statistical visualization library Altair, which all

Ilia Timofeev 49 Jul 25, 2022
A python package that extends Google Earth Engine.

A python package that extends Google Earth Engine GitHub: https://github.com/davemlz/eemont Documentation: https://eemont.readthedocs.io/ PyPI: https:

David Montero Loaiza 307 Jan 01, 2023
Create Siege configuration files from Cloud Optimized GeoTIFF.

cogeo-siege Documentation: Source Code: https://github.com/developmentseed/cogeo-siege Description Create siege configuration files from Cloud Optimiz

Development Seed 3 Dec 01, 2022
Specification for storing geospatial vector data (point, line, polygon) in Parquet

GeoParquet About This repository defines how to store geospatial vector data (point, lines, polygons) in Apache Parquet, a popular columnar storage fo

Open Geospatial Consortium 449 Dec 27, 2022
Python module and script to interact with the Tractive GPS tracker.

pyTractive GPS Python module and script to interact with the Tractive GPS tracker. Requirements Python 3 geopy folium pandas pillow usage: main.py [-h

Dr. Usman Kayani 3 Nov 16, 2022
Imperial Valley Geomorphology Map

Roughly maps the extent of basins, basin edges, and mountains in the Imperial Valley by grouping terrain classes from the Iwahashi et al. 2021 California terrian classification model.

0 Dec 13, 2022