Remove Static data

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Remove Static data

#1 Post by Keith Baxter »

@Corjan

Can we please have a facility to remove static data like we have with images. remove(data)

Reason is we don't want to load huge data sources at startup. Files with millions of records are crashing AM or they take forever to load.
We would like to load subsets of this huge file and then add and remove what we want when we want.

Is that possible? If so please this one is rather important and urgent. You know what I am trying to do. :mrgreen:

Also what is the maximum capacity of the resource folder? Will it handle a few gigs without falling over? The size of the xplane data set is <597 MB (626 315 264 bytes), 35 696 Files, 355 Folders>
The terrain data set is 10x that size

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: Remove Static data

#2 Post by Corjan »

Hi,

Just don't hold any reference to the data object, lua will clean up automatically.

Corjan

SimPassion
Posts: 5339
Joined: Thu Jul 27, 2017 12:22 am

Re: Remove Static data

#3 Post by SimPassion »

Keith @Keith Baxter, in scripts were such data is used, move reference in functions and conditional, so they will not be parsed on load

Gilles

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Remove Static data

#4 Post by Keith Baxter »

Corjan wrote: Wed Aug 12, 2020 6:53 am Hi,

Just don't hold any reference to the data object, lua will clean up automatically.

Corjan
Ok so I just dump the whole 1tb+ files :mrgreen: in the resources folder and then just load the tile that I want? And then just change the name of the file to keep loading different tile data

Code: Select all




data = static_data_load("map_data\terrain\100ft\+00+000\+00+006.json")

--then the position changes so i just then load...

data = static_data_load("map_data\terrain\100ft\+00+000\+00+009.json")


Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Remove Static data

#5 Post by Sling »

Corjan wrote: Wed Aug 12, 2020 6:53 am Hi,

Just don't hold any reference to the data object, lua will clean up automatically.

Corjan
I assume you mean don’t load new data into new variables but just refresh the same variable with new data as Keith posted.

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Remove Static data

#6 Post by Keith Baxter »

@Corjan

The next one I suppose would be _polygon(x,y,.........x,y)

This would make drawing the polygons easier instead of using loops within loops.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: Remove Static data

#7 Post by Corjan »

You can draw polygons by doing multiple lines, and ending with stroke or fill

Corjan

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Remove Static data

#8 Post by Keith Baxter »

Corjan wrote: Wed Aug 12, 2020 9:38 am You can draw polygons by doing multiple lines, and ending with stroke or fill

Corjan
Yes I know that. You just run a for loop. I was hoping to just dump a string with all the xy coordinates.

No worries if that is not going to happen.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Remove Static data

#9 Post by Sling »

Keith,

I say this knowing the specific case in point.

It’s actually beneficial to use an iteration in this case because some points are so close that once you extrapolate to x,y values some pairs will be the same. I’ve incorporated some error checking during the iteration that removes duplicates and only draws a polygon if there are enough remaining points to do so.

Sorry no updates today I’ve been converting my code for geojson as larger files when converted to csv dropped some data. I’m back to square one and I think I understand the island issue. Although it took a bit of changing the geojson code is way better at extracting the data. Hopefully I’ll have a more complex tile to show tomorrow.

Tony

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Remove Static data

#10 Post by Keith Baxter »

Tony

Yes geojson is far better. I have a comprehensive geojson data set. Also sterilizing it a bit.

I am playing around with stitching the data so that one can go from a whole world map to a few hundred meters. Will pop you a pm tomorrow with what I have achieved so that you can compare what I am doing to your work.

This is exciting. I have even gotten a night vision map on the go. :mrgreen:

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply