• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

TUTORIAL Race Track Builder - Inject elevation data and terrain texture

DeepJKL_FIN

New Member
Yes. To read and use ASCII grid files from SQL Server database for elevation. Trying to finnish the plugin in couple of weeks for release. Also have to make the image plugin work, so orto images and images created from the ASCII grid can be centered to be usable with the lidar.

The slope image of area can also be used in InkScape to draw paths on roads. These paths can be exported to XY.csv and imported to RTB. Also figured out how to export route KML from Google Maps and offset it to match the lidar data, but the routes do not follow the roads properly.

I like to draw the roads in InkScape and import to RTB since it gives smoother roads then making them on RTB.. at least for me.

I will finnish the plugin and write a tutorial about these things.

This is created with the plugin proto from Lidar and orto image:
upload_2022-2-14_22-8-1.png


This is the same general area, but with slope image created from ASCII data:
upload_2022-2-14_22-8-43.jpeg


The idea works and i can get it to create a new venue to 9000x9000 meters with the 'Subdivide to level 2' option.

Road in progress to import and nice view to orto aerial image in RTB:
upload_2022-2-14_22-38-14.jpeg


- Basic user interface done
- Create and delete area tables done
- Sql queries for reading data and fetching alttitude values done
- Read ASCII grid to selected area table - WIP

- Not done: A lot...
upload_2022-2-14_22-57-15.png
 
Last edited:

quetillo

Member
Well, eager to test that system, see if it works better than the APIs, the lidar method was always better, at least when I used the BTB for rfactor and RBR
 

DeepJKL_FIN

New Member
Well, eager to test that system, see if it works better than the APIs, the lidar method was always better, at least when I used the BTB for rfactor and RBR
The old and legendary Zaxxon method was brilliant for BTB!

Question: Where could i get a ASCII grid file with 0.5 as a GridSize? Finnish land usage burea only hands out freely 1 and 2 meter versions of data and the 0.5 costs money. I need a test file, since i am using the 1 and 2 meter options and the fetching algorithm only rounds up to closest integer. If one should use more datapoints, the algorithm must be written differently for that. In theory it's easy thing to do, but to make sure of it, a data set would be nice for development purpouses. Any area, one file.
 

Johnr777

Moderator
The old and legendary Zaxxon method was brilliant for BTB!

Question: Where could i get a ASCII grid file with 0.5 as a GridSize? Finnish land usage burea only hands out freely 1 and 2 meter versions of data and the 0.5 costs money. I need a test file, since i am using the 1 and 2 meter options and the fetching algorithm only rounds up to closest integer. If one should use more datapoints, the algorithm must be written differently for that. In theory it's easy thing to do, but to make sure of it, a data set would be nice for development purpouses. Any area, one file.
This is beyond me... but curious, how do you fetch the data? All lidar I've dealt with comes as a 1km x 1km tile, in zip format.
 

DeepJKL_FIN

New Member
This is beyond me... but curious, how do you fetch the data? All lidar I've dealt with comes as a 1km x 1km tile, in zip format.
-Download wanted tiles.
-Get them to .LAS format using unzip and laszip (if needed)
-Use Fusion tools to get only ground points:
c:\FUSION\GroundFilter %1f.lda 1 %1.las
c:\FUSION\GridSurfaceCreate %1f.dtm 1 f f 1 0 0 0 %1f.lda
-Merge all .dtm tiles to one with c:\FUSION\MergeDTM
-Turn the big .dtm to .asc with c:\Fusion\DTM2ASCII
-Open the .asc in Saga-Gis and run Close Gaps (Removes no data values)

-Install SQL Server 2019 Developer (Supports databases over 10Gb)

-Run my plugin Read/write to put the .asc to SQL database with manipulated X, Y values so that the tiles/tile center is (0,0)

-Create new venue -> start doing subdivision where detail is needed.

If background image is needed, when in Saga-Gis, make Slope image from the gapped .asc file. If complete area is 6km * 6km the Slope image will be 6000x6000px when data GridSize is 1. Then use Irfanview to resize that image to 8192x8192 or 16386x16834px and rename it to BackgroundMap.png and move it to project MyXpack/Textures folder.

If one does not want to make the roads in RTB, one option is to open that original Slope picture with 6km * 6km or bigger in Inkscape. Then offset the image that the center is once again (0,0). Then draw the roads as paths and exprot the XY values. Then import them as .csv file to RTB and they will be on correct spots. Select hole road and click that it's grounded and it will have values based on the lidar leaning ground.

TOOLS:

- FUSION: FUSION/LDV LIDAR analysis and visualization software (washington.edu)
-SQL Server: SQL Server Downloads | Microsoft
-Saga-Gis: SAGA GIS - Browse Files at SourceForge.net
-Irfanview: IrfanView - Official Homepage - One of the Most Popular Viewers Worldwide
-Inkscape: Draw Freely | Inkscape
 
Last edited:

Johnr777

Moderator
-Download wanted tiles.
-Get them to .LAS format using unzip and laszip (if needed)
-Use Fusion tools to get only ground points:
c:\FUSION\GroundFilter %1f.lda 1 %1.las
c:\FUSION\GridSurfaceCreate %1f.dtm 1 f f 1 0 0 0 %1f.lda
-Merge all .dtm tiles to one with c:\FUSION\MergeDTM
-Turn the big .dtm to .asc with c:\Fusion\DTM2ASCII

-Install SQL Server 2019 Developer (Supports databases over 10Gb)

-Run my plugin Read/write to put the .asc to SQL database with manipulated X, Y values so that the tiles/tile center is (0,0)

-Create new venue -> start doing subdivision where detail is needed.
HA! thanks for the explanation :)
 

DeepJKL_FIN

New Member
Final additions to height before implementing ImagePlugin

Added functionality to import roads as CSV and get altitude for X,Y points from the database:
upload_2022-2-20_7-45-1.png
 

FrankyPantera

New Member
The injection from Wurstkoffer and Les Neilson are working very well, so far. A did two terrains in Switzerland. But now, I faced a big, big invoice from Google for using the APIs (nearly 1000 CHF), I thought, that google is not used with teh injection and a local geoserver, or did I something missunderstand or wrong? They now blocked my keys and I cannot go onto my local geoserver anymore. What went wrong, why is RTB always sending a request to google and not directly to my local server? How can I change this?
 

Les Neilson

Active Member
Sorry for the very late reply. Whenever you start with a new data file, it's always a good idea to open the localhost/maps page to see if you're getting data from geoserver correctly, because otherwise it will default to Google data, and it won't be (immediately) obvious that it's not working. I don't always remember this myself. I've just got back into using this recently. If you need any help, I'll do my best
 

FrankyPantera

New Member
Sorry for the very late reply. Whenever you start with a new data file, it's always a good idea to open the localhost/maps page to see if you're getting data from geoserver correctly, because otherwise it will default to Google data, and it won't be (immediately) obvious that it's not working. I don't always remember this myself. I've just got back into using this recently. If you need any help, I'll do my best
Thank you, Les, it looks always like the extract of the first three lines from logfile for the elevation (the original logfiles are very large with more 208 Mb, the background is around 28 to 32km), the accuracy of the data shows, thatthe elevation is derived from the geoserver. But is it really necessary to go to google maps first? Maybe I did something wrong in amending the query from Wurstkoffer to my geoserver...
 

Attachments

Les Neilson

Active Member
No, it's not necessary to do it, it only serves to make sure you're getting data from geoserver correctly. If there's an error somewhere it will default to Google maps data, which isn't easy to spot straight away.
 

Les Neilson

Active Member
I'm not sure if there is a way to do that. I'll have a look at the config file, but it might need Wurstkoffer to answer this one
 
Top