Search Unity

[Released] GIS Terrain Loader

Discussion in 'Assets and Asset Store' started by UnityGISTech, Aug 12, 2019.

  1. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    Your File Works great may be you need to just update your GTL to the last version.
    Best Regards

    upload_2022-6-4_1-7-35.png
     
  2. abhishekvj2705

    abhishekvj2705

    Joined:
    Jun 7, 2022
    Posts:
    2
    Hi there I brought your asset today and tried to import a GeoTIFF file by following your
    Download Free GIS Data (DEM-Raster-Vector) guide
    but in the end, even though I followed each step precisely the textures are not loading on the terrain. only the elevation data is being loaded as shown below.

    photo_2022-06-16_18-26-28.jpg

    I am new to the geospatial field and I am doing a project in which I have to generate terrain from the data they provide. image_2022-06-16_18-32-31.png Also these are the files they provided. Is it possible to generate a terrain with these files with this tool thanks a lot. I am using Unity 2022.1.3f1.
     
  3. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    I downloaded Unity 2022.2.0, i tested GTL withing this version and it works well.
    upload_2022-6-16_19-45-26.png

    Maybe there is something wrong with your Textures Tiles (Name Must Be Like "Tile__0__0.jpg").

    Best Regards
     
  4. abhishekvj2705

    abhishekvj2705

    Joined:
    Jun 7, 2022
    Posts:
    2


    Thanks for the update textures works now but one of my tif file is over 2 gb and its not loading.
    Also what all vector data formats are supported to import vector data other than .osm
    Thank You
    Best Regards
     
  5. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Loading a huge Tiff file may crash your memory so becarful.
    You can load osm,shp and gpx.
     
  6. tko13

    tko13

    Joined:
    Oct 16, 2019
    Posts:
    2
    Does the vector data need to be in the WGS84 (EPSG:4326) coordinate system? I have DEM (Tiff) and Vector (SHP) files in TM35 (EPSG:3067) coordinate system and I would like to use them without converting them to WGS 84 (EPSG:4326).

    Converting the coordinates spoils the DEM images by making black spots on the edges (Due to the angle change). Attached converted (TM35 -> WGS84) image examples. DEM and results in Unity.
     

    Attached Files:

    • 1.JPG
      1.JPG
      File size:
      77.5 KB
      Views:
      177
    • 2.JPG
      2.JPG
      File size:
      156.5 KB
      Views:
      179
  7. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    HI THERE,
    To avoid any geo-conversion it is recommanded to project your file to WGS84.
    If you want to use another projection you should customize your geo-conversion script by using Dotspatial lib (exist into the plugins folder).
    For more support, send me your DEM + Vector data.

    Best Regards
     
  8. tko13

    tko13

    Joined:
    Oct 16, 2019
    Posts:
    2
    Hi,

    I followed your instructions to customize projections in Unity (to EPSG:3067). I got DEM data working, but Vector data doesn't load correctly when it is in EPSG:3067. I will send you files if you want to try out.

    I followed your Youtube tutorial how to set up Vector data in QGIS. Road Vectors has custom field: Road: 12122-paallyste2

    DEM and Vectors are in EPSG:3067

    Maybe this download link works too for downloading DEM and vectors: https://www.dropbox.com/s/0otd2wswgi0nriu/Q4122A_3067.zip?dl=0
     
  9. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hello, I followed your GIS Data Downloader for Unity tutorial
    Using SRTM 90 or 30, it works, but if I use ArcGis 10m I get the following error message in the console.
    Any help mostly welcome !
    Best regards
    Philippe

    Error : Occurred while downloading some files ( failed Url | Check your connexion or Inputs ''System.Net.WebException: The remote server returned an error: (503) Service Unavailable: Back-end server is at capacity.
    at System.Net.HttpWebRequest.GetResponseFromData (System.Net.WebResponseStream stream, System.Threading.CancellationToken cancellationToken) [0x00146] in <6d7c4c8dd3624dc596686fb7270ae1e6>:0
    at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <6d7c4c8dd3624dc596686fb7270ae1e6>:0
    at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00020] in <6d7c4c8dd3624dc596686fb7270ae1e6>:0
    at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request, System.IAsyncResult result) [0x00000] in <6d7c4c8dd3624dc596686fb7270ae1e6>:0
    at System.Net.WebClient.GetWebResponseTaskAsync (System.Net.WebRequest request) [0x0008d] in <6d7c4c8dd3624dc596686fb7270ae1e6>:0
    at System.Net.WebClient.DownloadBitsAsync (System.Net.WebRequest request, System.IO.Stream writeStream, System.ComponentModel.AsyncOperation asyncOp, System.Action`3[T1,T2,T3] completionDelegate) [0x0008d] in <6d7c4c8dd3624dc596686fb7270ae1e6>:0
    at GISTech.GISDataDownloader.TaskCancellationInternals.CancelWithInternal (System.Threading.Tasks.Task task, System.Threading.CancellationToken cancellationToken, System.Boolean swallowCancellationException) [0x00125] in F:\GTLTest2\Assets\GIS Tech\GIS Data Downloader\Plugins\GISDataDownloaderTaskExtension\TaskCancellationExtension.cs:107
    at GISTech.GISDataDownloader.GISDataDownloaderWebDownloader.DownloadFilesAsync (GISTech.GISDataDownloader.GISDataDownloaderRequestedElement Requestfile, System.Threading.CancellationTokenSource taskSource) [0x003f4] in F:\GTLTest2\Assets\GIS Tech\GIS Data Downloader\Editor\GISDataDownloaderWeb\GISDataDownloaderMultiWebDownloader.cs:260 '')
    UnityEngine.Debug:LogError (object)
    GISTech.GISDataDownloader.GISDataDownloaderWebDownloader/<DownloadFilesAsync>d__31:MoveNext () (at Assets/GIS Tech/GIS Data Downloader/Editor/GISDataDownloaderWeb/GISDataDownloaderMultiWebDownloader.cs:264)
    System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException (System.Exception)
    GISTech.GISDataDownloader.TaskCancellationInternals/<CancelWithInternal>d__2:MoveNext () (at Assets/GIS Tech/GIS Data Downloader/Plugins/GISDataDownloaderTaskExtension/TaskCancellationExtension.cs:107)
    UnityEngine.UnitySynchronizationContext:ExecuteTasks ()
     
  10. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    It seems that ArcGIS elevation service is no longer available, use mapbox or SRTM 30 instead.
    Best Regards
     
  11. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hello
    Thanks for your answer, but srtm30 is not accurate enough for my project. It would be great if you could add IGN 5m provider (or even 1m or lidarHD) , as all the elevation data are free and accessible.
    Best regards
    Philippe
     
  12. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    Elevation 5m or lidar does not cover the all world. Contact me on discord for further discussion about your need.
    Best Regards
     
  13. Good_good

    Good_good

    Joined:
    Dec 1, 2014
    Posts:
    3
    Hi,I want to use it in Android,but when I Build,sometings ware wrong.I work it in Unity2020.3.36
    The Error is
    Assets\SimpleFileBrowser\Scripts\FileBrowser.cs(1207,5): error CS0246: The type or namespace name 'FBPermissionCallbackAndroid' could not be found (are you missing a using directive or an assembly reference?),Idont know how to solve it.
     
  14. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there the current version does not support android and ios.
    Check your email inbox.
    Best Regards
     
  15. vincentgoh82

    vincentgoh82

    Joined:
    Aug 23, 2022
    Posts:
    1
    Tested the example Cuenca but unable to generate the forest from the Vector data(.shp).
    It shows this error:
    InvalidOperationException: Sequence contains no elements
    System.Linq.Enumerable.Min[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) (at <93223d662c2546d4b5d1784737504095>:0)
     
    Last edited: Sep 1, 2022
  16. JL13sky

    JL13sky

    Joined:
    Jun 29, 2022
    Posts:
    3
    hi,the GTL is very useful to load a local GIS data to unity.the Documentation v1.5 shows:
    upload_2022-9-2_9-24-58.png
    and the data needs a fiexed format:
    upload_2022-9-2_9-28-8.png
    but i can't get the similar gis data.The datas I download are like this format:
    upload_2022-9-2_9-30-19.png

    upload_2022-9-2_9-36-57.png
    these datas can't load into unity by GTL.
    So how can I get or translate the datas I downladed into the fiexed format that can be loaded into unity by GTL?
    Or can you send me all the format of gis data demos that the GTL supported?
    Thanks!
     
    Smaug_29 likes this.
  17. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    GIS Terrain Loader is able to load Tiff as DEM and Shp file as Vector Data without need to convert to another format.

    Best Regards
     
  18. JL13sky

    JL13sky

    Joined:
    Jun 29, 2022
    Posts:
    3
    thanks!
    But the tiff data and the shp data are not the same area .I can't download a tiff data with a shp data matched it.The gis data I downloaded is a single tiff data or a shp data .like this:
    where can i downlaod the formated data that can load to GTL directly?Or how can i format it with some software?
    thanks again!
     

    Attached Files:

    • world.7z
      File size:
      185.9 KB
      Views:
      143
  19. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    If You Don't have any custom data and no GIS Skills you can use "GIS Data Downloader" which is able to download data Directly on your hard disk then load it to GIS Terrain Loader.
    Link of Data Downloaded via GDD.
     
  20. JL13sky

    JL13sky

    Joined:
    Jun 29, 2022
    Posts:
    3
    THANKS!
     
  21. thomasmorcom

    thomasmorcom

    Joined:
    Aug 29, 2022
    Posts:
    1
    Hi,
    I am having issues when attempting to use OSM data with the loader nothing is generated. Even with the supplied example Cuenca data, none of the OSM data appears, only empty objects are created. Are there particular requirements for using OSM data with the DEM data?
     
  22. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    The example Cuenca works well, maybe there is somethings wrong with your systeme.
    Contact me on discord Chanel i will try to check the source of that issue.
    Best Regards
     
  23. findfix

    findfix

    Joined:
    Sep 19, 2018
    Posts:
    1
    Good morning.
    Firstly, great tool however I am having the same problem as thomasmorcom. I have followed all of the tutorials and am fairly certain that the .shp/.osm files are correct as I have done this process with other softwares. I am receiving no console errors but nothing is being visualised.
    I am producing/creating the .shp in GlobalMapper as there is little .OSM for area I am using. I have exported as both .shp and OSM.
    I am running Unity 2021.3.6f1.
    worst case I can paint the trees but I do need to import building shapes
    cheers
     
  24. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    Thanks for using GTL, please email me (GISTech2008@gmail.com) including your invoice number I'll send you some updated scripts.

    Best Regards.
     
  25. Sankgoku

    Sankgoku

    Joined:
    Nov 22, 2022
    Posts:
    1
    Hi, GISTech
    I'm developing a game which is on real world and realistic terrain.
    I just want to ask your GIS assets provide the actual coordination like latitude and longitude because i want to display there feature on the screen.
     
  26. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there, you can display coordinates and elevation of any point (georeferenced terrain).

    Best regards
     
  27. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    21
    Hi GISTech,

    I have DEM data files, the extension is *.img
    Can I use it on GTL? or I have to change the img extention to something on QGIS?
     
  28. psk131

    psk131

    Joined:
    Aug 19, 2016
    Posts:
    5
    Hi,

    Was this issue ever solved? I have the exact same problem with shapefile in EPSG:3067. The DEM loads after adding the Dotspatial lib but shapefile does not. It fails silently, so this was hard to debug. I tried to solve this for hours and finally tracked the issue to the script "GISTerrainLoaderBuilding.cs" where the for loop between lines 53 and 71 removes all the points from the building so nothing is generated. Could the problem be with the Angle2D function at line 477?

    After I converted all data to WGS84 everything worked. However, I did not see mention in the manual that vector data has to be always in WGS84 format. It is quite confusing because the manual says that support for other coordinate systems can be added with the DotSpatial lib but apparently this is only relevant for DEMs.

    As the other user also said, converting all data to to WGS84 causes other issues with DEMs, especially if you are working with large areas (I have hundreds of tiles). This is a pity, because most other similar tools only support WGS84 but GIS Terrain Loader could also support other coordinate systems. Most other tools are focused on easy and generic use, but GIS Terrain Loader is so far the best solution I have seen for importing custom GIS data from good quality sources to Unity. We have really good open data for the whole country here in Finland but it is in EPSG:3067. Would be perfect if it could be used without reprojection.
     
  29. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    Img files not supported yet, use QGIS to export your dem to GeoTiff file.

    Best Regrades
     
  30. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    Thanks for mentions such a point, by using Dotspatial Lib you will be able to load generate a terrain from different projections that what it was mentioned in docs, but sure vector data works only with WGS 84 EPSG 4326.
    You know that Projections in GIS data is very vast complicated matter and in order to fix that issue i have to change the entire VectorLoader Core.
    i solved this issue in the pro version (released soon) which is an upgrade of GTL.
    The Pro version is able to load all your data with the source projection without any need to GIS software intervention.
    We are doing our best to make that tool more professional and helpful.

    Best Regards
     
  31. psk131

    psk131

    Joined:
    Aug 19, 2016
    Posts:
    5
    Okay, but it says in the asset description that it supports different projections. There is no mention that is applies only to DEMs so it is a bit misleading and should be corrected. I don't mind that so much and I am still happy that I bought the asset because it does some things really well (like a better version of Unity Terrain Tools). However, I lost quite many work hours trying to think what was wrong with my vector data because it did not give any error message. I must say that this asset is not the easiest to use. Even the rather complicated directory system reminds me perhaps too much of GIS world ;) But still, this is my favourite GIS asset in Unity because it supports custom formats.

    Also, I just remembered the open source BlenderGIS can import vector data in pretty much any coordinate system and generates 3D objects from that data so I don't really need this asset for that purpose anymore – although I like how well GIS Terrain Loader does it if the data is in WGS 84. Maybe you are correct that this is mostly a professional thing because these better quality sources are perhaps not so well-known among basic users, so great to hear that there will be also a pro version. However, I have to note that all of this better quality data is open data so it is available for anyone, at least here.
     
  32. craigseaeng

    craigseaeng

    Joined:
    Jan 14, 2022
    Posts:
    2
    Hello!

    Great utility for loading DEMs and tiles. Very clear explanation.

    However, when I load shapefiles for buidings into the '/#filename#_VectorData/SHP Vector data' directory, no file information is loaded and I get an error that there is no *.osm file. I thought I could work with shapefiles only for defining buildings.

    Is there a clear tutorial for creating a building (or other) shapefile and having it load and create buildings?

    Also, could not find you on discord?

    Thanks in advance!

    FOUND SOLUTION:
    It worked when I explicitly created an attrbute in the shapefile named 'building' and then pupulated the value for that attribute for each polygon with a building type from the prefab list (e.g., 'public'). I figured it out after watching the youtube tutorial carefully. Might be nice to write up in the manual as well :)

     
    Last edited: Jan 23, 2023
  33. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there, sorry for being late
    i already uploaded a tutorial which explain how to use QGIS with GTL to import shapefiles.

    Discord link : https://discord.com/invite/3FhNP7YR54
    Best Regards
     
  34. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    21
    Hi UnityGIStech,

    I can use tiff format for DEM.
    you guided shp for Vector data. can I use dxf(vector file format) instead shp?
     
  35. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    You can load osm, shp or gpx as vector data dfx not supprted.
     
  36. Sipnek

    Sipnek

    Joined:
    Jun 15, 2022
    Posts:
    2
    Hi UnityGIStech,

    I was wondering. Can you "plant" individual trees with this plugin? I imagine an input source could be something like a point shapefile including some metadata like tree type and height, width. I am an absolute Unity3D noob by the way.
     
  37. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    You can add "Terrain trees" to your terrain by loading Shp file with a simple configurations
    upload_2023-2-10_10-37-54.png
    But the shapefile must contains some polygons.
    second case you can any type of individual prefab (trees, objects ... etc), by loading Geopoints from Your shp file.
    For example : add a "mirador"
    upload_2023-2-10_10-42-7.png
    upload_2023-2-10_10-42-57.png
    GTL will read your file and place that object according to attributes data .
    upload_2023-2-10_10-43-58.png

    Best Regards
     
  38. Sipnek

    Sipnek

    Joined:
    Jun 15, 2022
    Posts:
    2
    Thank you for your answer.
     
  39. adsilcott

    adsilcott

    Joined:
    Aug 30, 2014
    Posts:
    55
    Hi,
    I downloaded an area with the GIS Terrain Downloader, but when I try to generate terrain from it it says:
    Code (CSharp):
    1. Error While Loading File : Undefined Projection System, reproject your file to one of supported Projection or Set Dimention Mode to manual
     
  40. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Try to import a new dem file then try your downloaded file again.
    Best regards
     
  41. adsilcott

    adsilcott

    Joined:
    Aug 30, 2014
    Posts:
    55
    I'm not sure I understand. Do you mean I should try downloading the dem data again? Because I tried a few times. Or do you mean to try a different file, like one of the example files, then go back and try the one I downloaded?
     
  42. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Try to import a any dem file into gisterrain folder then go back to your first dem file that you already downloaded via GDD.
     
  43. adsilcott

    adsilcott

    Joined:
    Aug 30, 2014
    Posts:
    55
    Okay, that did work. Thanks.
     
    UnityGISTech likes this.
  44. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    21
    HI GTL,
    I am studying GTL and getting better understand. Thank you for your effort.

    I have a question.
    If I have a shapefile like a building case (shp format) that works fine, I would like to add a specific texture to that building area instead of the building (3d object).
    How do I add a specific texture (other areas are transparent) to the building vector area (shp) instead of the 3D object (because the underlying texture layer is a real photo)?
     
  45. UnityGISTech

    UnityGISTech

    Joined:
    May 6, 2015
    Posts:
    193
    Hi there,
    you customize your building from scriptableobject in buildings folder
    upload_2023-3-4_8-48-52.png

    set your textures into the material of wall and roof, the result will applied when you generate a new buildings.

    best regards
     
  46. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    21
    Hi GTL,
    Thank you for your response.

    If I choose the way of your suggestion. there's some building(just texture exchanged).
    so the wall is very vertical against ground, looks weird. and I try to modify height as small as green on terrain, there's some gap between terrain and building.

    I'd like to just put my texture on specipic area(instead of 3D object) of terrain using the shape format.
    How can I do it, please advise to me.

    Best regards.
     
  47. adsilcott

    adsilcott

    Joined:
    Aug 30, 2014
    Posts:
    55
    Hi,
    When I use:
    Code (CSharp):
    1. Prefab.position = GeoRefConversion.SetRealWorldPosition(Terrain,
    2.                         latLon, 0, SetElevationMode.OnTheGround);
    Everything is placed at (0,0,0).

    When I check the TerrainContainerObject, the ContainerSize is (0,0,0), is that the issue?

    Thanks
     
  48. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    21
    Terrain and building with 0 height.png Hi adsilcott,

    Thanks for your response.
    I am going to modify the TerrainContainerObject script with your comments.
    But my skills are not good.
    Adding or changing features and functions to it is a bit difficult.
    Can you explain a bit more code for the zero wall height terrain texture on the ground?

    The attached file is a sample of a case where the building height is 0 in the Inspector that I have adjusted. There are some irregular gaps between the terrain and buildings (0 height). I want to put the textures on the very bottom.
     
  49. adsilcott

    adsilcott

    Joined:
    Aug 30, 2014
    Posts:
    55
    Sorry, I wasn't responding to you. I was asking my own question about an unrelated issue.
     
  50. kt5881

    kt5881

    Joined:
    Jul 26, 2014
    Posts:
    21
    Hi UnityGISTech,

    If I set building, changed grass textur,e to some height, the wall is very vertical(looks weird).Otherwise, zero wall height case, terrain texture on the ground is not put exactly on the ground.

    The attached file is a sample of a case where the building height is 0 in the Inspector that I have adjusted. There are some irregular gaps between the terrain and buildings (0 height). I want to put the textures on the very bottom.
    Terrain and building with 0 height.png
    Would you please advice to me how can I add specific texture on terrain with shape file(e.g. building case) instead of building?

    Best regards,