[Addons] ESRI Shapefile import/export and georeferenced raster importer

Hi. I’ve only just discovered these scripts, but from what I’ve tried so far, they seem like they could be very useful to me. I have one question, though. Was there a technical reason for not incorporating multipatch support? As multipatches are probably the most useful format for 3D when in the ESRI environment, it seems curious that they have been excluded here.

Anyhow, thanks for what you’ve already achieved with this.

Guy

@corpus
I’m sorry for this clipping problem, do you tried to scale all your model ?

I’m not sure, but I don’t think it’s possible to launch a script by this way. If it’s possible maybe the script needs some modifications but I don’t know what.

@GbH
The Multipatch Geometry Type seems to be very close to ESRI environment:
-a multipatch can save the textures only if it’s stored in an ESRI file geodatabase. Unlike shapefile, the specifications of these type of files have not been published. There isn’t open source lib to read and write them.
-a multipatch stored in a shapefile can’t save the textures, so I didn’t really found what a multipatch can do that a polygonZ doesn’t

I think ESRI users have more powerful tools to work with 3D files and multipatchs.

Hi Domlysz,

I don’t know whether this is a bad installation or Blender 2.67, but georef images are not working for me now. This happens for all images I’m trying…

Traceback (most recent call last):
  File "/Users/sorbus/Library/Application Support/Blender/2.67/scripts/addons/io_import_georaster.py", line 472, in execute
    addTexture(mat, img, uvTxtLayer)
  File "/Users/sorbus/Library/Application Support/Blender/2.67/scripts/addons/io_import_georaster.py", line 216, in addTexture
    tex_image = node_tree.nodes.new('TEX_IMAGE')
RuntimeError: Error: Node type TEX_IMAGE undefined

location: <unknown location>:-1

Any idea what I’m not doing correctly?

Thanks once again,

Sorbus

Hi,

Blender 2.67 introduce new node name. You can edit the file io_import_georaster.py and replace the line

tex_image = node_tree.nodes.new('TEX_IMAGE')

by

tex_image = node_tree.nodes.new('ShaderNodeTexImage')

Hope it’s help

It works for me now, thank you!

Hi again Domlysz,

One other thing I’ve noticed is that geotifs with null value cells (such as ocean, rivers or no data voids, I assume as -9999m) are imported as 0m, with the rest of the terrain flat at +10,000m elevation. Is this something you’ve found? If it occurs for you too, perhaps it’s something the script can detect or it’s worth mentioning in your readme pdf that voids need to be pre-processed out in GIS.

Here’s an image of what I have been able to produce with your tool:


Many thanks!

Sorbus

Hi,

Sorry for the delay.

Nodata values can be represented in many forms. Often in a 16 bits tiff nodata value is set to 65535 pixel value ; but it can be any value and some GIS format store nodata in other ways than simply assign a pixel value.

So the result depends on the value assign to nodata and in many case it will display lot of terrain distortion.

You’re right the best way to manage nodata values is to do some GIS pre-processing because it’s hard to manage this in the script without over complicate the code.

I’ll try to update the pdf, thanx for the feed back !

thanks, this addon functions i look for.

Hi!

Great add-on, it seems to be very useful for me… If I can get it to work! LOL
I’ve managed to enable the “Object manage Georef” add-on, but not the other two. I keep clicking on their enable boxes but nothing happens. I’m using blender 2.62 on win 7 64 bits, could this have anything to do with the problem I’m having?

Many thanks!

Hi,

Try with the latest version of Blender, the scripts requires Blender >=2.63

Amazing work, please add this to default blender distribution.

Hi,

I’m new to blender and am probably do something wrong that is incredibly obvious. I import a geo-referenced raster using the plugin on a plane and ticking adjust grid size. It loads up the image fine and I adjust the camera so it is nicely in view. But when I look through the camera there is nothing, just grey. When I render, there is nothing, just grey. When I add another object into the scene (a cube) there is nothing through the camera or when it renders, just grey. Any idea what might be going on? This fantastic tool would be incredibly valuable to me if I could get it to work.

Hi,
I think you have wrong camera settings and object view settings. You should have to learn more how to use blender.

It was the clipping distance. These are massive images. Sorted. Fun times ahead.

Hi, sorry to bug again but I have run into another problem. I am using DEMs from Aster which come with: dem.tif, dem.tif.aux.xml and num.tif. When I try and import the dem.tif blender says it can’t read the world file. Is this normal? Do I have to do some pre-processing of the image in a GIS so it is exported in a friendly format?

Hi, one more thing. Because blender said it could not read the world file for the dem tiff that I was trying to load, I tried to load it with clip and packed ticked. I have GDAL installed. But then blender delivers an error message saying “GDAL fails”. Any idea why?

I’ve tried exporting many different formats from QGIS for DEM including world files and always run into the same problem. Without clip and pack, I always get

ErrorTraceback (most recent call last):
File"/Applications/blender.app/Contents/MacOS/2.66/scripts/addons/io_import_georaster.py", line636, in execute bpy.ops.object_set(mode=‘EDIT’)
File"/Applications/blender.app/Contents/MacOS/2.66/scripts/modules/bpy/ops.py", line188, in_call_ret = op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: enum “EDIT” not found in (‘OBJECT’) location: <unknown location>:-1

With clip and pack I always get error message GDAL fails

Hi,

If you don’t have a .wld or .tfw there is no worldfile … Then it is a geotiff with worldfile embeded.
Nevertheless, you could create it with gdal_translate :
gdal_translate -co “TFW=YES” in.tif out.tif

Hi,

I updated the script, there was a bug when a wrong object is active before launch a raster import (on mesh or as DEM option) this is why the script crash when it tries to toggle EDIT mode (for example if active object is a camera then the script tries to toggle EDIT mode for the camera and crash…). Now the script sets correctly the active object whatever the initial selection.

For GDAL, are you sure system that variables are correctly setup ?

Hi all, new update today, I’ve added a tool to produce georef render. documentation has also been updated.