Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by levend · Jun 08, 2015 at 07:28 AM · mapc++c #external-libraries

Using GDAL from Unity

Hello,

I want to read a raster map from my Unity application. I planned to use Geospatial Data Abstraction Library(GDAL) for this task. This is a C++ library but it has a C# wrapper which handles C++ calls. I tried to use its C# wrapper from the unity. However, I could not achieve. Finally, I got the error below:

Failed to load 'Assets/GDAL/gdal_wrap.dll' with error '%1 is not a valid Win32 application. ', GetDllDirectory returned ''. If GetDllDirectory returned non empty path, check that you're using SetDirectoryDll correctly. GameController:Start() (at Assets/Scripts/GameController.cs:58) GameController:Start() (at Assets/Scripts/GameController.cs:15)

Is there anyone who achieved to use GDAL from Unity? Or, is there anyone who read raster map from Unity application? If yes, how? I am waiting for help.

Thanks...

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Studiomaurer · Aug 17, 2017 at 04:02 PM 0
Share

Did you get in running in the end? I'm desperately looking for a framework that will help me with projection math and will play nicely with unity. What did you use?

avatar image tanoshimi Studiomaurer · Aug 17, 2017 at 05:08 PM 0
Share

@studiomaurer Proj.NET works fine if you just need standard projection functions

avatar image RandomPoint Studiomaurer · Sep 26, 2017 at 02:03 PM 0
Share

I also had success with Proj.Net for geospatial coordinate conversions in Unity.

avatar image hexagonius · Aug 17, 2017 at 04:36 PM 0
Share

I looked around the net and found this tutorial on using in on a non Unity project. $$anonymous$$aybe you can adapt it to Unity:

http://vipassanaandenvironmentalinformatics.blogspot.de/2013/03/getting-started-with-c-and-gdal.html

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by chmodseven · Sep 12, 2019 at 03:32 AM

In case it helps anyone, here's the steps I followed:

  1. Navigate in your browser to https://www.gisinternals.com/

  2. Download stable x64 version (e.g. I got release-1911-x64-gdal-3-0-0-mapserver-7-4-0.zip) and unpack to a folder. This assumes you are using 64-bit build. For 32-bit there's an x86 version available instead, but I haven't tried it.

  3. Create a Plugins/GDAL folder under your Assets folder in Unity

  4. In unpacked folder, go to bin/ and copy any .dll file to Assets/Plugins/GDAL folder

  5. Go to bin/gdal/csharp/ and copy any .dll file to Assets/Plugins/GDAL folder

  6. Go to bin/ms/csharp/ and copy any .dll file to Assets/Plugins/GDAL folder

And that should pretty much do it.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LoganPark · Oct 01, 2019 at 04:31 PM 0
Share

No further input from me, just a quick note of thanks for your follow-through here.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Assigning UV Map to model at runtime 0 Answers

Package manager for 3rd party libraries. 0 Answers

Need Advice on Direction for Apps 0 Answers

How to get Unity to detect my own touch events 0 Answers

A total newb here need help! 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges