Comments (13)
Unfortunately, it's not possible to proceed like this because the real issue behind the offset trick is that Blender stores coordinates as single precision (float32) number which has about 7 significant digits of precision. On the other hand, geographic data must be represented as double precision (float64) number. Without the offset, coordinates will be rounded and we will lose accuracy.
A workaround for this use case will be to create an addon that just compute the deltas between the 2 origins offset and apply it to the appended objects.
from blendergis.
Your workarround is exactly what i'm looking for !
Basemap addon move objects and update scene dx dy, but i cant keep a consistant dx dy across multiple files. And setting dx dy by hand is not possible at this time (as far as i can tell). Osm also use the dx dy to import data. Maybe an option is to allow keeping a consistant dx dy as it when set, and import maps and data at center of window.
Also another usefull tool we should have is to create a plane with the background map as texture, so we can import more than 1 map at time to get better resolution.
I'm aware of the 32 bits precision probs, allready facing with it in late 97 under 3dsmax 3.
On the other hand, when an object pivot position is greater than 100k, only the final representation of offset+local coords is wrong, as internally the mesh vertices coords stay the same (as long as you don't apply location), whenever the object pivot is.
So centering such object just improve the final precision, without any loose.
from blendergis.
Some tricks that may help
- it's possible to lock the origin location in basemaps options
- it's also possible to set the offset by hand, values are just stored in scene custom properties :
so you can preset the origin before using the different tools and get something consistent by preventing basemaps updating the origin.
if you want to update the offset for a scene which already contains some objects you can use this snippet, it will move the objects according to the new offset values
import bpy
#import BlenderGIS modules depends on how the package is named
#if the addon is installed through github zip archive
#then the name contains an illegal hyphen
#bellow an hacky workaround
import sys
sys.modules['BlenderGIS'] = __import__('BlenderGIS-master')
from BlenderGIS.geoscene import GeoScene
scn = bpy.context.scene
geoscn = GeoScene(scn)
#define here the new origin values
ox, oy = -55500, 5448000
dx = ox - geoscn.crsx
dy = oy - geoscn.crsy
geoscn.moveOriginPrj(dx, dy)
print(geoscn.getOriginPrj())
Also another usefull tool we should have is to create a plane with the background map as texture, so we can import more than 1 map at time to get better resolution.
yes this feature is already in my roadmap, high priority
On the other hand, when an object pivot position is greater than 100k, only the final representation of offset+local coords is wrong, as internally the mesh vertices coords stay the same (as long as you don't apply location), whenever the object pivot is.
So centering such object just improve the final precision, without any loose.
Very interesting, this solution can help to deal with some situations where we need to release the offset, for example if we want to use the dxf exporter to get a correctly georef dxf file.
from blendergis.
Great, you made my dreams comes true !
Was working with Qgis but your add-on greatly improves the workflow.
Maps and osm reprojected imports right in blender are invaluables !
I only encounter a crash issue while setting up GDAL wheel under windows 10 due to a wrong GDAL_DATA environnement variable.
The trick with > 100k pivot position and scene georef is to ensure the precision by taking account of the 7 significant digits of offset so you lower the risk to loose precision, even with larger offsets.
from blendergis.
Very interesting the manual offset, thanks Dominique.
For DXF I make a translation in draftsight but I have to open drafsight, it's a little bit boring ...
libopencad is new and in a few time released. There is also an implementation for Qgis with Gdal https://github.com/sandyre/libopencad
from blendergis.
an open source lib for dwg that's great ! It's so sad there is no strong open source cad app, librecad development seems so slow...
from blendergis.
Yes It's great. About what I heard, anytime sometimes want to create an opensource version, autodesk bring this to the court, the big company win and then project died ...
This one shoudl be good because there is a ton of aim from different opensource communities !
from blendergis.
Fork it 1000 times so it take 100 years to autodesk to bring everyone to the court.
from blendergis.
👍
Interesting ^_^
from blendergis.
todo list for fixing this issue:
- add an append tool that take georef into account
- add a tool to force georef origin to an user def value and move objects accordingly
from blendergis.
Reference links to link/append.
http://blender.stackexchange.com/questions/23926/how-to-show-open-dialog-box-that-can-navigate-to-blender-datablocks
https://www.blender.org/api/blender_python_api_2_77_release/bpy.types.BlendDataLibraries.html
from blendergis.
now origin location is editable in geoscene panel
from blendergis.
I confirm as an architect that i systematicaly choose a point near my project and relocate all plans with wich i work. Here is the workflow i use.
- Open survey file and delimitate the zone (could be a part of the city) i need by drawing a rectangle.
- place it so project zone is in the more or less in the middle but the lower left corner should get an integer coordinate like 756 600, 456 200
- Select all and bring this point to 0,0
Now you can work easily with your plan in bim software.
Seems your not far from it, would be cool to get this rectangle (or any other shape) perimeter wich could then crop all imported data a bit like in Qgis.
By the way nice job. you plugin is really impressive.
from blendergis.
Related Issues (20)
- [basemap] Crash at zoom 22
- Question not issue
- Error when Extruding HOT 4
- Python type error while generating map plane after hitting E HOT 7
- Not Letting Me Use NASA SRTM Data And Forcing Me To Have A API Key For Open Topography
- Links to Christoph Gohlke's GDAL and Numpy packages are dead on GDAL wiki page
- Crashing with 4.02 with python errors when using control E over a new location. HOT 8
- STRM data not saved HOT 2
- [MAC] BlenderGIS 2.2.8 and Blender 4.02 not loading any of the maps HOT 5
- Geometry export fails on Blender 4.0.2 ( 'ValueError: 1-2 args execution context is supported') HOT 6
- ValueError: 1-2 args execution context is supported HOT 3
- Non-integer randomheight value will result in crash HOT 1
- Export Shape Objects to feature not working
- Error when try to extract map HOT 4
- Error prompt when pressing the E key HOT 7
- SRTM loaded but not displaying elevations.
- export failing HOT 5
- MacOS - no basemap HOT 3
- When I deselect the plugin on Blender's plugin page and try to enable it again, I get the following error, does anyone know how to fix it?
- Blender 4.0 and 4.1.1 After loading basemap cant access any menu option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blendergis.