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)
Owner
null
Fiona reads and writes geographic data files

Fiona Fiona reads and writes geographic data files and thereby helps Python programmers integrate geographic information systems with other computer s

null 987 Jan 4, 2023
Python tools for geographic data

GeoPandas Python tools for geographic data Introduction GeoPandas is a project to add support for geographic data to pandas objects. It currently impl

GeoPandas 3.5k Jan 3, 2023
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

django-rest-framework-gis Geographic add-ons for Django Rest Framework - Mailing List. Install last stable version from pypi pip install djangorestfra

OpenWISP 981 Jan 3, 2023
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

OpenWISP 982 Jan 6, 2023
Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

mmdb-server mmdb-server is an open source fast API server to lookup IP addresses

Alexandre Dulaunoy 67 Nov 25, 2022
A Jupyter - Leaflet.js bridge

ipyleaflet A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook. Usage Selecting a basemap for a leaflet map: Loading a geojso

Jupyter Widgets 1.3k Dec 27, 2022
A Python interface between Earth Engine and xarray

eexarray A Python interface between Earth Engine and xarray Description eexarray was built to make processing gridded, mesoscale time series data quic

Aaron Zuspan 159 Dec 23, 2022
Constraint-based geometry sketcher for blender

Geometry Sketcher Constraint-based sketcher addon for Blender that allows to create precise 2d shapes by defining a set of geometric constraints like

null 1.7k Jan 2, 2023
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 6, 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
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
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.

OSMnx OSMnx is a Python package that lets you download geospatial data from OpenStreetMap and model, project, visualize, and analyze real-world street

Geoff Boeing 4k Jan 8, 2023
python toolbox for visualizing geographical data and making maps

geoplotlib is a python toolbox for visualizing geographical data and making maps data = read_csv('data/bus.csv') geoplotlib.dot(data) geoplotlib.show(

Andrea Cuttone 976 Dec 11, 2022
Tool to suck data from ArcGIS Server and spit it into PostgreSQL

chupaESRI About ChupaESRI is a Python module/command line tool to extract features from ArcGIS Server map services. Name? Think "chupacabra" or "Chupa

John Reiser 34 Dec 4, 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
EOReader is a multi-satellite reader allowing you to open optical and SAR data.

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and index.

ICube-SERTIT 152 Dec 30, 2022
GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.

Table of Contents What is GeoNode? Try out GeoNode Install Learn GeoNode Development Contributing Roadmap Showcase Most useful links Licensing What is

GeoNode Development Team 1.2k Dec 26, 2022
GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences. The data can be generated randomly or with respect to user-defined constraints, for example a specific element concentration within minerals and rocks or the order of units within a complete lithological profile.

Maximilian Beeskow 16 Nov 29, 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