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)
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
ESMAC diags - Earth System Model Aerosol-Cloud Diagnostics Package

Earth System Model Aerosol-Cloud Diagnostics Package This Earth System Model (ES

Pacific Northwest National Laboratory 1 Jan 04, 2022
r.cfdtools 7 Dec 28, 2022
Get Landsat surface reflectance time-series from google earth engine

geextract Google Earth Engine data extraction tool. Quickly obtain Landsat multispectral time-series for exploratory analysis and algorithm testing On

Loïc Dutrieux 50 Dec 15, 2022
Deal with Bing Maps Tiles and Pixels / WGS 84 coordinates conversions, and generate grid Shapefiles

PyBingTiles This is a small toolkit in order to deal with Bing Tiles, used i.e. by Facebook for their Data for Good datasets. Install Clone this repos

Shoichi 1 Dec 08, 2021
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
Track International space station with python

NASA-ISS-tracker Track International space station with python Modules import json import turtle import urllib.request import time import webbrowser i

Nikhil Yadav 8 Aug 12, 2021
An API built to format given addresses using Python and Flask.

An API built to format given addresses using Python and Flask. About The API returns properly formatted data, i.e. removing duplicate fields, distingu

1 Feb 27, 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
List of Land Cover datasets in the GEE Catalog

List of Land Cover datasets in the GEE Catalog A list of all the Land Cover (or discrete) datasets in Google Earth Engine. Values, Colors and Descript

David Montero Loaiza 5 Aug 24, 2022
Read images to numpy arrays

mahotas-imread: Read Image Files IO with images and numpy arrays. Mahotas-imread is a simple module with a small number of functions: imread Reads an

Luis Pedro Coelho 67 Jan 07, 2023
A public data repository for datasets created from TransLink GTFS data.

TransLink Spatial Data What: TransLink is the statutory public transit authority for the Metro Vancouver region. This GitHub repository is a collectio

Henry Tang 3 Jan 14, 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
Extract GoPro highlights and GPMF data.

Python script that parses the gpmd stream for GOPRO moov track (MP4) and extract the GPS info into a GPX (and kml) file.

Chris Auron 2 May 13, 2022
ColoringMapAlgorithm-CSP- - Graphical Coloring of Countries with Condition Satisfaction Algorithm

ColoringMapAlgorithm-CSP- Condition Satisfaction Algorithm Output Condition

Kerem TAN 2 Jan 10, 2022
The geospatial toolkit for redistricting data.

maup maup is the geospatial toolkit for redistricting data. The package streamlines the basic workflows that arise when working with blocks, precincts

Metric Geometry and Gerrymandering Group 60 Dec 05, 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
pure-Python (Numpy optional) 3D coordinate conversions for geospace ecef enu eci

Python 3-D coordinate conversions Pure Python (no prerequistes beyond Python itself) 3-D geographic coordinate conversions and geodesy. API similar to

Geospace code 292 Dec 29, 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
Daily social mapping project in November 2021. Maps made using PyGMT whenever possible.

Daily social mapping project in November 2021. Maps made using PyGMT whenever possible.

Wei Ji 20 Nov 24, 2022