[PLUGIN] OpenStreetMap importer

Thank you for your answer.
I did follow these steps, but I cant compile my project. (I`m not good at C++ so there is maybe something I messed up in the codes)
is it possible to get the EDIT files zipped ?

Hi, i need the osm plugin for 4.22

I can confirm, that it does work with 4.22 version, just follow steps Can't compile in 4.21.1 Windows 10 · Issue #60 · ue4plugins/StreetMap · GitHub, thank you! (Don’t forget to create cpp project and compile after copying plugin in your project/plugins/streetmap folder)

is it possible to get the lat and long data from this

In principal yes, currently no. It depends on your programming skills. The OSM data gets delivered in lat and long and the info gets lost during importing.
See StreetMapFactory.cpp L122 on my branch (thanks to Richard, the conversion its in a separate class, that on my branch is available at runtime, too):
The SpatialReferenceSystem class converts lat / long to local coordinates to they can be represented in floats. It also has functions to revert to lat / long
So you could either do that at runtime or add the info to the FStreetMapRoad struct during importing.

See this file, L114 for how to create this class in a functional callable at runtime (in this case in the editor but will work the same way at runtime).

Beware of floating point precision when working with lat and long, as it needs double precision to represent in lat and long. So this does not work in blueprint without converting the values to strings, though.

Hi - First of all awesome plugin - it’s great to be able to pull in open source 3D data into Unreal. Am very curious how this scales with city scale data.

I’m using Unreal 4.23 and I’m unable to open the plugin as I’m getting the following error:

Plugin failed to load because runtime “StreetMapRuntime” could not be found, Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.

I get this when opening the editor irrespective of any project being loaded C++ or otherwise.

Any help getting this up and running would be most appreciated. Have also raised it as an over at your repo

… or save yourself the hassle and just use this fork: GitHub - keru1264/StreetMap: Import OpenStreetMap data into Unreal Engine 4

Works right out of the box for me for 4.22.3 - thank you, keru1264!

/hauke

I can’t get it to work. It says the following modules are missing or built with a different version so I click yes to rebuild them and then it says “Try rebuilding from source manually.”
Are there any videos on this plugin?

Did this, but still getting this error:

Unhandled exception: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘E:\Unreal Engine Projects\streetmaptest\Plugins\StreetMap\Intermediate\Build\Win64\UE4Editor\Development\StreetMapRuntime\UE4Editor-StreetMapRuntime.lib.response’. streetmaptest E:\Unreal Engine Projects\streetmaptest\Intermediate\ProjectFiles\UnrealBuildTool 1

Trying on UE 4.24

did you have any luck on compiling on 4.24?

I made an PullRequest to fix the compile errors, take a look; fix compile for 4.24 by mbpictures · Pull Request #77 · ue4plugins/StreetMap · GitHub

thanks a lot!

Hi all,

TLDR: How to attach road meshes to StreetMapActor in correct spots after importing in OSM data to UE4.24?

Apologies if this is a basic question, but I’m currently trying to recreate a crash scenario by utilizing OSM data from the crash site and following the instructions under GitHub - ruichen-v/carla: Open-source simulator for autonomous driving research.. I was wondering if anyone happened to know how one would do this step in UE4 v4.24: “In Meshes category in StreetMapActor property, assign a road mesh to each StreetMapMeshTag slot in StaticMeshes.”

I’m not too familiar with UE4 but I did get the plugin to work since I have a StreetMapActor of my imported OSM map data. However, as seen in the screenshot, I don’t see any immediate way to access the StreetMapMeshTag’s onto which I would attach road meshes. Any help would be greatly appreciated, thanks!

Hi !

First, great work on this plugin !

I would like the extract street name’s and showing this on my map. What’s the way to do this please ? :slight_smile:

Have a nice day ^^

For some reason I cant get it to work on Unreal 4.26, building fails (in an otherwise fresh/clean project).


Build started...
1>------ Build started: Project: ICONS, Configuration: Development_Editor x64 ------
1>Creating makefile for ICONSEditor (no existing makefile)
1>UnrealBuildTool : error : Could not find definition for module 'ShaderCore', (referenced via Target -> StreetMapRuntime.Build.cs)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" ICONSEditor Win64 Development -Project="D:\ICONS\ICONS\ICONS.uproject" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "ICONS.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Has anyone encountered/solved this? Any pointers or advice is more than welcome.

Hey there, reviving an old thread because I’m trying to integrate this plugin in 4.25 and I’m having this when Building the mesh from the StreetMapComponent:
FMeshBatch was assigned a PrimitiveUniformBuffer even though Vertex Factory FLocalVertexFactory fetches primitive shader data through a Scene buffer. The assigned PrimitiveUniformBuffer cannot be respected. Use PrimitiveUniformBufferResource instead for dynamic primitive data, or leave both null to get FPrimitiveSceneProxy->UniformBuffer
line 1112 in SceneManagement.cpp

Any help will be appreciated and I would be happy to publish this new version if anyone is interested

You need to remove the module ShaderCore in both the importer module and the Runtime because it has been merged in another module already included

So I removed ShaderCore. But I still get many errors.

2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(9): error C2504: 'UActorFactory': base class undefined
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(13): error C3668: 'UStreetMapActorFactory::PostSpawnActor': method with override specifier 'override' did not override any base class methods
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(14): error C3668: 'UStreetMapActorFactory::PostCreateBlueprint': method with override specifier 'override' did not override any base class methods
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(15): error C3668: 'UStreetMapActorFactory::CanCreateActorFrom': method with override specifier 'override' did not override any base class methods
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(10): error C2440: 'return': cannot convert from 'UStreetMapActorFactory *' to 'UObject *'
2>  D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(10): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(75): error C2039: 'StaticConfigName': is not a member of 'UStreetMapActorFactory'
2>  D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(8): note: see declaration of 'UStreetMapActorFactory'
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(75): error C3861: 'StaticConfigName': identifier not found
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(75): error C2039: 'AddReferencedObjects': is not a member of 'UStreetMapActorFactory'
2>  D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapImporting/StreetMapActorFactory.h(8): note: see declaration of 'UStreetMapActorFactory'
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(75): error C2065: 'AddReferencedObjects': undeclared identifier
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(75): error C2027: use of undefined type 'UActorFactory'
2>  D:\EpicGames\UE_4.27\Engine\Source\Editor\UnrealEd\Public\EditorViewportClient.h(36): note: see declaration of 'UActorFactory'
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(75): error C3083: 'WithinClass': the symbol to the left of a '::' must be a type
2>D:/Unreal Projects/OpenStreenMap/Plugins/StreetMap/Intermediate/Build/Win64/UE4Editor/Inc/StreetMapImporting/StreetMapActorFactory.gen.cpp(81): error C2437: 'Super': has already been initialized
2>  [2/9] Module.StreetMapRuntime.gen.cpp
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapRuntime/Public/StreetMapComponent.h(7): fatal error C1083: Cannot open include file: 'StreetMapSceneProxy.h': No such file or directory
2>  [3/9] Module.StreetMapRuntime.cpp
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapRuntime\StreetMapRuntime.h(5): fatal error C1083: Cannot open include file: 'Classes/Engine/Engine.h': No such file or directory
2>  [4/9] Module.StreetMapImporting.cpp
2>D:\Unreal Projects\OpenStreenMap\Plugins\StreetMap\Source\StreetMapRuntime\Public\StreetMapComponent.h(7): fatal error C1083: Cannot open include file: 'StreetMapSceneProxy.h': No such file or directory
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command "D:\EpicGames\UE_4.27\Engine\Build\BatchFiles\Build.bat OpenStreenMapEditor Win64 Development -Project="D:\Unreal Projects\OpenStreenMap\OpenStreenMap.uproject" -WaitMutex -FromMsBuild" exited with code 6.
2>Done building project "OpenStreenMap.vcxproj" -- FAILED.

So If I am getting this right…no option for this in UE 5xx?