vvoovv / blosm

Blosm addon for Blender. A few clicks import of Google 3D cities, OpenStreetMap, terrain. Global coverage. Source code is in the branch 'release'.
1.58k stars 185 forks source link

what projection/units do the imports come in? #265

Closed derekeden closed 3 years ago

derekeden commented 3 years ago

Hi, I purchased the premium add-on, and am trying to make a georeferenced scene with other georeferenced data I have outside of OSM.

I can't seem to figure out what projection the buildings/maps come in as? I am choosing a bounding box in latlon, but the units clearly seem to be meters or feet. Everything is always centered at 0,0 in my scene. I've also tried using the bpyproj add-on to specify a projection. The imports still come in the exact same spot.

How can I specify a target projection, or know what the projection is so I can reproject myself? How can I stop the data from importing at the scenes origin, and actually import in their georeferenced location?

Thank

vvoovv commented 3 years ago

By default the transverse Mercator projection is used. The central meridian of the projection comes through the center of the imported scene. That ensures that the distortions are negligible in the vicinity of the center of the imported scene. If import another area after the initial import, it will be made relative the initial import unless the option Ignore existing georeferencing is checked. Additional information can found here.

PROJ.4 parameters of the default projection:

+proj=tmerc +a=6378137 +b=6378137 +lat_0=<lat> +lon_0=<lon> +k_0=1 +x_0=0 +y_0=0 +units=m

where <lat> and <lon> are equal to the custom attributes lat and lon of the active Blender scene or to another center of the import

vvoovv commented 3 years ago

A custom map projection can be used with the bpyproj addon as described here.

ibaris commented 1 year ago

Can you clearly provide a way, on how to export an OBJ file with actual lat, lon or ECEF coordinates? Even with the PROJ4 string and the transformation with GDAL or PyProj, the coordinates get squashed and I am not able to use the converted OBJ file.

vvoovv commented 1 year ago

@ibaris

I replied to you via email.

ibaris commented 1 year ago

Oh 😄 Thank you for your kind help and patience!

rakeshshrestha31 commented 1 year ago

@vvoovv Great work with blosm! Is it possible to make the steps to export obj with WGS/ECEF coordinates public?

@ibaris

I replied to you via email.

vvoovv commented 1 year ago

@rakeshshrestha31

Please provide more details about your task.

rakeshshrestha31 commented 1 year ago

@vvoovv I want to overlay georeferenced 3D reconstructions from photogrammetry tools on top of the meshes from Google 3D tiles/OSM, for that I need the two meshes to be in same frame of reference (ideally WGS84). I’ll have to shift the two meshes closer to origin during visualization, but I need them to be in ECEF frame in the beginning

vvoovv commented 1 year ago

@rakeshshrestha31

It's up to you to decide which way to take:

The default projection used by the addon to represent OSM data is describe above.

Google 3D Tiles are in the ECEF coordinate system. Their transformation by the addon is described here.

rakeshshrestha31 commented 1 year ago

@vvoovv Thank you for the clarification. The raw glb files from Google 3D Tiles serves my purpose