From 4c8f5688618781ff451849a7e84b1b75d8ea45db Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 27 Jan 2023 16:32:49 +0100 Subject: [PATCH] Add option to HttpSynchronization to automatically unzip downloaded files (closes #1852) --- .../gaia/gaia_dr2_download_stars.asset | 15 +++---- .../sun_earth_2012_fieldlines_batsrus.asset | 28 ++++--------- .../sun_earth_2012_fieldlines_enlil.asset | 30 ++----------- .../2012/sun_earth_2012_fieldlines_pfss.asset | 8 +--- .../solarsystem/missions/rosetta/67p.asset | 16 ++----- .../atmosphere/2000_carbon_monoxide.asset | 12 ++---- .../atmosphere/2004_ir_hurricane.asset | 12 ++---- .../atmosphere/2005_hurricane-grayir.asset | 29 ++----------- .../atmosphere/2005_hurricane-wvsst.asset | 12 ++---- .../atmosphere/aerosol_blackcarbon.asset | 12 ++---- .../aerosol_blackcarbon_and_sulfate.asset | 12 ++---- .../noaa-sos/atmosphere/aerosol_sulfate.asset | 12 ++---- .../noaa-sos/atmosphere/airtraffic.asset | 15 ++----- .../earth/noaa-sos/atmosphere/all_sats.asset | 12 ++---- .../noaa-sos/atmosphere/aqua_swath.asset | 16 ++----- .../noaa-sos/atmosphere/carbonflux.asset | 12 ++---- .../earth/noaa-sos/atmosphere/co_gmd.asset | 18 ++------ .../earth/noaa-sos/atmosphere/fim_chem.asset | 12 ++---- .../noaa-sos/atmosphere/fossil_fuel.asset | 12 ++---- .../earth/noaa-sos/atmosphere/fukushima.asset | 12 ++---- .../earth/noaa-sos/atmosphere/geo_sat.asset | 12 ++---- .../earth/noaa-sos/atmosphere/geo_scan.asset | 12 ++---- .../noaa-sos/atmosphere/giss_temp_anom.asset | 12 ++---- .../atmosphere/globe-insolation.asset | 12 ++---- .../noaa-sos/atmosphere/globe-rainfall.asset | 12 ++---- .../atmosphere/harvey-clouds_precip.asset | 12 ++---- .../atmosphere/hurricane_season_2017.asset | 16 ++----- .../hurricane_season_2017_wvsst.asset | 12 ++---- .../earth/noaa-sos/atmosphere/isaac.asset | 13 +----- .../earth/noaa-sos/atmosphere/land_temp.asset | 12 ++---- .../noaa-sos/atmosphere/ltg_vaisala.asset | 12 ++---- .../earth/noaa-sos/atmosphere/nasa_sats.asset | 11 ++--- .../atmosphere/nccs_models-carbon.asset | 12 ++---- .../atmosphere/nccs_models-chem.asset | 38 ++--------------- .../atmosphere/nccs_models-winds.asset | 38 ++--------------- .../earth/noaa-sos/atmosphere/no2_omsi.asset | 12 ++---- .../earth/noaa-sos/atmosphere/pclim.asset | 12 ++---- .../earth/noaa-sos/atmosphere/poes_sat.asset | 12 ++---- .../atmosphere/reanalysis-antarctic.asset | 12 ++---- .../atmosphere/reanalysis-elnino.asset | 12 ++---- .../atmosphere/reanalysis-hurricane.asset | 12 ++---- .../earth/noaa-sos/atmosphere/sandy.asset | 12 ++---- .../noaa-sos/atmosphere/sunsync_sat.asset | 12 ++---- .../earth/noaa-sos/atmosphere/temp_anom.asset | 12 ++---- .../atmosphere/typhoon_haiyan-wvsst.asset | 12 ++---- .../noaa-sos/atmosphere/typhoon_haiyan.asset | 12 ++---- .../noaa-sos/atmosphere/volcano_ash.asset | 12 ++---- .../planets/earth/noaa-sos/land/birds.asset | 12 ++---- .../land/blue_marble-blue_marble_topo.asset | 12 ++---- .../blue_marble-blue_marble_topo_bathy.asset | 12 ++---- .../land/blue_marble-nightlights.asset | 18 ++------ .../blue_marble-seasonal_blue_marble.asset | 12 ++---- .../earth/noaa-sos/land/dams-global.asset | 12 ++---- .../noaa-sos/land/dams-mississippi.asset | 12 ++---- .../earth/noaa-sos/land/dams-yangtze.asset | 12 ++---- .../noaa-sos/land/day_night-06z_only.asset | 12 ++---- .../noaa-sos/land/day_night-full_year.asset | 15 ++----- .../noaa-sos/land/day_night-oneday.asset | 12 ++---- .../land/earthquake-1980_1995_quakes.asset | 12 ++---- .../land/earthquakes_and_eruptions.asset | 12 ++---- .../earths_magnetism_magnetic_lines.asset | 12 ++---- .../land/earths_magnetism_magnets.asset | 12 ++---- .../planets/earth/noaa-sos/land/fire.asset | 12 ++---- .../earth/noaa-sos/land/fire_veg.asset | 12 ++---- .../noaa-sos/land/global_vegetation.asset | 15 ++----- .../earth/noaa-sos/land/hot_topo.asset | 16 ++----- .../noaa-sos/land/irsat_nightlights.asset | 12 ++---- .../earth/noaa-sos/land/japan_quake.asset | 12 ++---- .../koppen_climate-koppen_1901_2100.asset | 12 ++---- .../noaa-sos/land/land_cover-animation.asset | 12 ++---- .../noaa-sos/land/land_cover-slideshow.asset | 8 +--- .../earth/noaa-sos/land/land_ratio.asset | 12 ++---- .../noaa-sos/land/magnetic_declination.asset | 12 ++---- .../earth/noaa-sos/land/paleo_map.asset | 10 ++--- .../earth/noaa-sos/land/plate_movement.asset | 12 ++---- .../noaa-sos/land/river_discharge_2010.asset | 12 ++---- .../land/seismic_waves-1994northridge.asset | 15 ++----- .../noaa-sos/land/surface_temperature.asset | 12 ++---- .../earth/noaa-sos/models/bm10000.asset | 12 ++---- .../earth/noaa-sos/models/gfdl_seaice.asset | 15 ++----- .../noaa-sos/models/ipcc_temp-ccsm-a1b.asset | 12 ++---- .../noaa-sos/models/ipcc_temp-ccsm-b1.asset | 12 ++---- .../noaa-sos/models/ipcc_temp-gfdl-a1b.asset | 12 ++---- .../noaa-sos/models/ipcc_temp-gfdl-b1.asset | 12 ++---- .../noaa-sos/models/ipcc_temp-had-a1b.asset | 12 ++---- .../noaa-sos/models/ipcc_temp-had-b1.asset | 12 ++---- .../earth/noaa-sos/models/rcp-ga26.asset | 12 ++---- .../earth/noaa-sos/models/rcp-ga45.asset | 12 ++---- .../earth/noaa-sos/models/rcp-ga60.asset | 12 ++---- .../earth/noaa-sos/models/rcp-ga85.asset | 12 ++---- .../earth/noaa-sos/models/ukmet-a1b.asset | 12 ++---- .../earth/noaa-sos/models/ukmet-e1.asset | 12 ++---- .../noaa-sos/oceans/2009_ice_animation.asset | 12 ++---- .../noaa-sos/oceans/animal_tracking.asset | 12 ++---- .../noaa-sos/oceans/argo_buoy_tracks.asset | 12 ++---- .../noaa-sos/oceans/argo_buoy_waterfall.asset | 12 ++---- .../earth/noaa-sos/oceans/atl_turtle.asset | 12 ++---- .../noaa-sos/oceans/chlorophyll_model.asset | 12 ++---- .../noaa-sos/oceans/ecco2_sst-gray_land.asset | 19 ++------- .../noaa-sos/oceans/ecco2_sst-veg_land.asset | 21 ++-------- .../oceans/gfdl_sst-black_background.asset | 14 ++----- .../oceans/gfdl_sst-land_background.asset | 16 ++----- .../noaa-sos/oceans/greenland_melt.asset | 12 ++---- .../noaa-sos/oceans/japan_tsunami_waves.asset | 12 ++---- .../oceans/loggerheadseaturtletracks.asset | 12 ++---- .../oceans/mexico_turtles_947293.asset | 12 ++---- .../oceans/mexico_turtles_958002.asset | 12 ++---- .../earth/noaa-sos/oceans/modis_sst.asset | 12 ++---- .../earth/noaa-sos/oceans/nasa_speed.asset | 12 ++---- .../earth/noaa-sos/oceans/nasa_sst.asset | 12 ++---- .../noaa-sos/oceans/ocean_acid-co2_flux.asset | 12 ++---- .../earth/noaa-sos/oceans/ocean_acid-ph.asset | 12 ++---- .../oceans/ocean_acid-saturation.asset | 12 ++---- .../noaa-sos/oceans/ocean_depths_temp.asset | 17 ++------ .../noaa-sos/oceans/ocean_drain-gray.asset | 12 ++---- .../earth/noaa-sos/oceans/pac_turtle.asset | 12 ++---- .../earth/noaa-sos/oceans/phytoplankton.asset | 19 ++------- .../earth/noaa-sos/oceans/pr_tsunami.asset | 12 ++---- .../earth/noaa-sos/oceans/sea_level.asset | 12 ++---- .../oceans/sea_surface_height_anomaly.asset | 15 ++----- .../noaa-sos/oceans/seaice_monthly.asset | 12 ++---- .../oceans/seawifs-land_background.asset | 12 ++---- .../noaa-sos/oceans/seawifs-no_holes.asset | 12 ++---- .../noaa-sos/oceans/seawifs-polar_holes.asset | 12 ++---- .../planets/earth/noaa-sos/oceans/shark.asset | 12 ++---- .../planets/earth/noaa-sos/oceans/sss.asset | 12 ++---- .../earth/noaa-sos/oceans/sst_1980_1999.asset | 12 ++---- .../earth/noaa-sos/oceans/vector_winds.asset | 14 ++----- .../oceans/vent_discoveries_animation.asset | 12 ++---- .../earth/noaa-sos/oceans/vorticity.asset | 12 ++---- .../oceans/waves-wave_height_2012.asset | 12 ++---- .../oceans/waves-wave_height_katrina.asset | 12 ++---- .../oceans/waves-wave_height_sandy.asset | 12 ++---- .../oceans/waves-wave_power_2012.asset | 12 ++---- .../oceans/weeklyseaice-10day_seaice.asset | 12 ++---- .../oceans/weeklyseaice-sept_seaice.asset | 12 ++---- modules/sync/syncs/httpsynchronization.cpp | 42 +++++++++++++++++++ modules/sync/syncs/httpsynchronization.h | 3 ++ 138 files changed, 478 insertions(+), 1377 deletions(-) diff --git a/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset b/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset index b83394f81e..357723674f 100644 --- a/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset +++ b/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset @@ -5,12 +5,16 @@ local gaia618Destination = asset.syncedResource({ Name = "Gaia DR2 618M Octree", Type = "HttpSynchronization", Identifier = "gaia_stars_618M_octree", - Version = 1 + Version = 1, + Unzip = { + UnzipFiles = true, + Destination = "data" + } }) local gaia618DestinationExtracted = gaia618Destination .. "data"; -- Download the full DR2 dataset with 24 values per star (preprocessed with theReadFitsTask (gaia_read.task) into 8 binary files). --- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task). +-- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task). -- Total size of download is 151 GB. local gaiaFull = asset.syncedResource({ Name = "Gaia DR2 Full Raw", @@ -19,13 +23,6 @@ local gaiaFull = asset.syncedResource({ Version = 1 }) -asset.onInitialize(function() - if not openspace.directoryExists(gaia618DestinationExtracted) then - openspace.printInfo("Extracted Gaia dataset") - openspace.unzipFile(gaia618Destination .. "DR2_full_Octree[50kSPN,500dist]_50,50.zip", gaia618DestinationExtracted, true) - end -end) - asset.export("GaiaDR2_618M", gaia618DestinationExtracted) asset.export("GaiaFullDataset", gaiaFull) diff --git a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_batsrus.asset b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_batsrus.asset index b472140ac4..d64a2cdacf 100644 --- a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_batsrus.asset +++ b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_batsrus.asset @@ -12,9 +12,16 @@ local fieldlineData = asset.syncedResource({ Name = "Fieldlines Data BATSRUS", Type = "HttpSynchronization", Identifier = "sun_earth_event_july_2012-batsrus", - Version = 1 + Version = 1, + UnzipFiles = true }) +local unzippedDataDestination = { + openClosed = fieldlineData .. "magnetic_fieldlines-open_closed", + velocityFlow = fieldlineData .. "velocity_flowlines-upstream", + asherStatic = fieldlineData .. "ashers_static_seeds" +} + local loop = { Documentation = "Sets time to start of data, sets higher delta time and loops back from start, when at end of data", GuiPath = "2012July", @@ -30,12 +37,6 @@ local batsrusCurrentColorTable = transferFunctions .. "batsrus_current2.txt" local batsrusVelocityColorTable = transferFunctions .. "batsrus_velocity.txt" local batsrusTopologyColorTable = transferFunctions .. "batsrus_topology.txt" -local unzippedDataDestination = { - openClosed = fieldlineData .. "magnetic_fieldlines-open_closed", - velocityFlow = fieldlineData .. "velocity_flowlines-upstream", - asherStatic = fieldlineData .. "ashers_static_seeds" -} - local colorRanges = { { 0, 100000000 }, { 0, 60 }, @@ -131,19 +132,6 @@ local BatsrusAsherStaticSeedsFlowLines = { asset.onInitialize(function () openspace.action.registerAction(loop) - if not openspace.directoryExists(unzippedDataDestination.openClosed) then - openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event") - openspace.unzipFile(fieldlineData .. "magnetic_fieldlines-open_closed.zip", unzippedDataDestination.openClosed, true) - end - if not openspace.directoryExists(unzippedDataDestination.velocityFlow) then - openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event") - openspace.unzipFile(fieldlineData .. "velocity_flowlines-upstream.zip", unzippedDataDestination.velocityFlow, true) - end - if not openspace.directoryExists(unzippedDataDestination.asherStatic) then - openspace.printInfo("Extracting " .. "Fieldlines from Batsrus model of 2012 event") - openspace.unzipFile(fieldlineData .. "ashers_static_seeds.zip", unzippedDataDestination.asherStatic, true) - end - openspace.addSceneGraphNode(BatsrusJ12OpenClosed) openspace.addSceneGraphNode(BatsrusJ12FlowLines) openspace.addSceneGraphNode(BatsrusAsherStaticSeedsFlowLines) diff --git a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_enlil.asset b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_enlil.asset index 65ffe33a0b..879251595a 100644 --- a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_enlil.asset +++ b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_enlil.asset @@ -8,11 +8,12 @@ local transferFunctions = asset.syncedResource({ Version = 1 }) -local fieldlineData = asset.syncedResource({ +local fieldlineData = asset.syncedResource({ Name = "Fieldlines Data ENLIL", Type = "HttpSynchronization", Identifier = "sun_earth_event_july_2012-enlil", - Version = 1 + Version = 1, + UnzipFiles = true }) local loop = { @@ -187,31 +188,6 @@ local ENLILStereoA = { asset.onInitialize(function () openspace.action.registerAction(loop) - if not openspace.directoryExists(unzippedDataDestination.EqPlane011AU1) then - openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event") - openspace.unzipFile(fieldlineData .. "011AU_eq_plane_1.zip", unzippedDataDestination.EqPlane011AU1, true) - end - if not openspace.directoryExists(unzippedDataDestination.EqPlane011AU2) then - openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event") - openspace.unzipFile(fieldlineData .. "011AU_eq_plane_2.zip", unzippedDataDestination.EqPlane011AU2, true) - end - if not openspace.directoryExists(unzippedDataDestination.Lat4011AU1) then - openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event") - openspace.unzipFile(fieldlineData .. "011AU_lat4_1.zip", unzippedDataDestination.Lat4011AU1, true) - end - if not openspace.directoryExists(unzippedDataDestination.Lat4011AU2) then - openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event") - openspace.unzipFile(fieldlineData .. "011AU_lat4_2.zip", unzippedDataDestination.Lat4011AU2, true) - end - if not openspace.directoryExists(unzippedDataDestination.Earth) then - openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event") - openspace.unzipFile(fieldlineData .. "earth.zip", unzippedDataDestination.Earth, true) - end - if not openspace.directoryExists(unzippedDataDestination.StereoA) then - openspace.printInfo("Extracting " .. "Fieldlines from ENLIL model of 2012 event") - openspace.unzipFile(fieldlineData .. "stereoa.zip", unzippedDataDestination.StereoA, true) - end - openspace.addSceneGraphNode(ENLILSliceEqPlane11AU1) openspace.addSceneGraphNode(ENLILSliceEqPlane11AU2) openspace.addSceneGraphNode(ENLILSliceLat411AU1) diff --git a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset index fd3305fc0d..3a7119b376 100644 --- a/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset +++ b/data/assets/scene/solarsystem/heliosphere/2012/sun_earth_2012_fieldlines_pfss.asset @@ -11,7 +11,8 @@ local fieldlineData = asset.syncedResource({ Name = "Fieldlines Data PFSS", Type = "HttpSynchronization", Identifier = "sun_earth_event_july_2012-pfss", - Version = 1 + Version = 1, + UnzipFiles = true }) local darkenSun = { @@ -64,11 +65,6 @@ local PFSS = { asset.onInitialize(function () openspace.action.registerAction(darkenSun) - if not openspace.directoryExists(PFSSPaths.SolarSoft) then - openspace.printInfo("Extracting " .. "Fieldlines from PFSS model of 2012 event") - openspace.unzipFile(fieldlineData .. "leilas_solar_soft.zip", PFSSPaths.SolarSoft, true) - end - openspace.addSceneGraphNode(PFSS) -- openspace.setPropertyValueSingle("Scene.FL_PFSS.Renderable.FlowEnabled", true) diff --git a/data/assets/scene/solarsystem/missions/rosetta/67p.asset b/data/assets/scene/solarsystem/missions/rosetta/67p.asset index da18a50436..b548f18445 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/67p.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/67p.asset @@ -20,10 +20,11 @@ local images = asset.syncedResource({ Name = "Rosetta Images", Type = "HttpSynchronization", Identifier = "rosettaimages", - Version = 2 + Version = 2, + UnzipFiles = true }) -local imagesDestination = images .. "images" +local imagesDestination = images .. "images_v1_v2" local Barycenter = { Identifier = "67PBarycenter", @@ -70,7 +71,7 @@ local Comet67P = { Spice = { "ROS_NAVCAM-A" } } }, - Target = { + Target = { Read = { "TARGET_NAME", "INSTRUMENT_HOST_NAME", @@ -130,15 +131,6 @@ local Trail67P = { } } -asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting Rosetta images") - openspace.unzipFile(images .. "images_v1_v2.zip", imagesDestination, true) - end -end) - - - asset.onInitialize(function() openspace.addSceneGraphNode(Barycenter) openspace.addSceneGraphNode(Comet67P) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2000_carbon_monoxide.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2000_carbon_monoxide.asset index 7af26e1795..bb2b4858f3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2000_carbon_monoxide.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2000_carbon_monoxide.asset @@ -19,17 +19,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "1024", Description = Description } @@ -44,11 +43,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "1024.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2004_ir_hurricane.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2004_ir_hurricane.asset index 17ded1f6a1..f1dff71e2f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2004_ir_hurricane.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2004_ir_hurricane.asset @@ -19,11 +19,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -31,7 +30,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "cylir_%Y%m%d_%H%M.jpg" @@ -40,11 +39,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-grayir.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-grayir.asset index fbcb85af6f..aba44b0628 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-grayir.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-grayir.asset @@ -15,11 +15,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -27,7 +27,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "ir_combined_%Y%m%d_%H%M.jpg" @@ -36,27 +36,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-6.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-7.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-8.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-9.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-10.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-11.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-12.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-13.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-14.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-15.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-16.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-17.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-wvsst.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-wvsst.asset index 79c90ca903..bc2d528355 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-wvsst.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/2005_hurricane-wvsst.asset @@ -15,11 +15,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -27,7 +26,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GI-WV-%y%j-%H%M.jpg" @@ -36,11 +35,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon.asset index 84389d5ae9..eb241306d9 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon.asset @@ -23,17 +23,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048_png", Description = Description } @@ -48,11 +47,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048_png.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon_and_sulfate.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon_and_sulfate.asset index 8a7ac3c32a..ecbb32888b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon_and_sulfate.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_blackcarbon_and_sulfate.asset @@ -23,17 +23,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048_png", Description = Description } @@ -48,11 +47,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048_png.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar); end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_sulfate.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_sulfate.asset index a9ea2b7ff8..fb664c9cf6 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_sulfate.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aerosol_sulfate.asset @@ -23,17 +23,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048_png", Description = Description } @@ -48,11 +47,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048_png.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/airtraffic.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/airtraffic.asset index 49d9debbaa..ec194a78e3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/airtraffic.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/airtraffic.asset @@ -18,28 +18,21 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/all_sats.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/all_sats.asset index 301da9640a..174f57e5be 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/all_sats.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/all_sats.asset @@ -23,26 +23,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aqua_swath.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aqua_swath.asset index 344fa32c28..5b80b36783 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aqua_swath.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/aqua_swath.asset @@ -22,29 +22,21 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/carbonflux.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/carbonflux.asset index f2ebf764d2..950b1daf4a 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/carbonflux.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/carbonflux.asset @@ -21,26 +21,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2160", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2160.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/co_gmd.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/co_gmd.asset index 6984ab053c..ec79ecde4f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/co_gmd.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/co_gmd.asset @@ -22,11 +22,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -34,7 +34,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "co_field_extended_%Y%m%d%H%M.png" @@ -54,16 +54,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "3600-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "3600-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "3600-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "3600-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "3600-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "3600-6.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fim_chem.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fim_chem.asset index 859e72322b..4114ccf02a 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fim_chem.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fim_chem.asset @@ -18,17 +18,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "composite", Description = Description } @@ -43,11 +42,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "composite.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fossil_fuel.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fossil_fuel.asset index bbe8ef5659..3af8fcc1f5 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fossil_fuel.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fossil_fuel.asset @@ -25,11 +25,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -37,7 +36,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "3100", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "%Y%m%d_fossil.png" @@ -56,11 +55,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "3100.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fukushima.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fukushima.asset index 7ca6db9f51..93b5c48b1d 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fukushima.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/fukushima.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2054", Description = Description } @@ -42,11 +41,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2054.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_sat.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_sat.asset index 959e92104a..ea649d5083 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_sat.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_sat.asset @@ -21,26 +21,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_scan.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_scan.asset index 487326c916..a85e3ac642 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_scan.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/geo_scan.asset @@ -21,26 +21,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/giss_temp_anom.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/giss_temp_anom.asset index 8ea792b000..d79df07034 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/giss_temp_anom.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/giss_temp_anom.asset @@ -14,17 +14,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2012", Description = Description } @@ -39,11 +38,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2012.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-insolation.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-insolation.asset index e4bdbaccba..1850480c67 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-insolation.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-insolation.asset @@ -17,11 +17,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "1440", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "CERES_INSOL_M_%Y-%m.PNG" @@ -49,11 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "1440.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-rainfall.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-rainfall.asset index 88c23bfea6..8bc1159d17 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-rainfall.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/globe-rainfall.asset @@ -17,11 +17,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "1440", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "TRMM_3B43M_%Y-%m.PNG" @@ -49,11 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "1440.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/harvey-clouds_precip.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/harvey-clouds_precip.asset index 4c2997756a..54bb95eaaa 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/harvey-clouds_precip.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/harvey-clouds_precip.asset @@ -17,11 +17,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "combined_image_%Y%m%d_%H%M.jpg" @@ -57,11 +56,6 @@ local colorbar_snow = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar_rain) openspace.addScreenSpaceRenderable(colorbar_snow) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017.asset index 37a49fdc14..248062de86 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017.asset @@ -20,11 +20,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -32,7 +32,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "linear_rgb_cyl_%Y%m%d_%H%M.jpg" @@ -41,14 +41,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017_wvsst.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017_wvsst.asset index c04b51bf35..86304ec6c8 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017_wvsst.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/hurricane_season_2017_wvsst.asset @@ -20,11 +20,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -32,7 +31,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "wvsst-%y%j-%H.jpg" @@ -41,11 +40,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/isaac.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/isaac.asset index 031f589cca..cf1ce51565 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/isaac.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/isaac.asset @@ -18,7 +18,8 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) local radarDestination = syncedDirectory .. "radar" @@ -53,16 +54,6 @@ local layer_sat = { } asset.onInitialize(function() - if not openspace.directoryExists(radarDestination) then - openspace.printInfo("Extracting " .. Name .. " Radar") - openspace.unzipFile(syncedDirectory .. "radar.zip", radarDestination, true) - end - - if not openspace.directoryExists(satDestination) then - openspace.printInfo("Extracting " .. Name .. " Sat") - openspace.unzipFile(syncedDirectory .. "sat.zip", satDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_radar) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_sat) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/land_temp.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/land_temp.asset index 8cbbda2744..187fb0a5de 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/land_temp.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/land_temp.asset @@ -17,11 +17,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "cyl_%Y_%m.jpg" @@ -38,11 +37,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/ltg_vaisala.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/ltg_vaisala.asset index 600921d83b..1af3e30986 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/ltg_vaisala.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/ltg_vaisala.asset @@ -22,11 +22,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -34,7 +33,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2160", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "%Y_%m-1.png" @@ -54,11 +53,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2160.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nasa_sats.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nasa_sats.asset index dab84eb9cc..a613108f15 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nasa_sats.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nasa_sats.asset @@ -20,26 +20,21 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-carbon.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-carbon.asset index efdf5da97f..bfe46e141b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-carbon.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-carbon.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -43,11 +42,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-chem.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-chem.asset index cf60320943..7795309db1 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-chem.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-chem.asset @@ -17,11 +17,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "chem_%Y-%m-%d_%H-%M.png" @@ -48,36 +48,6 @@ local legend = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4000-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-6.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-7.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-8.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-9.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-10.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-11.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-12.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-13.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-14.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-15.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-16.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-17.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-18.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-19.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-20.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-21.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-22.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-23.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-24.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-25.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-26.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(legend) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-winds.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-winds.asset index dae59b5af0..fc01a8fca4 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-winds.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/nccs_models-winds.asset @@ -17,11 +17,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "winds_%Y-%m-%d_%H-%M.png" @@ -38,36 +38,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4000-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-6.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-7.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-8.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-9.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-10.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-11.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-12.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-13.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-14.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-15.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-16.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-17.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-18.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-19.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-20.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-21.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-22.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-23.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-24.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-25.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4000-26.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/no2_omsi.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/no2_omsi.asset index 41b267cacc..bb3b05422b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/no2_omsi.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/no2_omsi.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2880", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "NO2monthlymean_%Y%m.png" @@ -49,11 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2880.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/pclim.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/pclim.asset index f9e19f22e8..37622bc66c 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/pclim.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/pclim.asset @@ -15,17 +15,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "raw", Description = Description } @@ -40,11 +39,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "raw.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/poes_sat.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/poes_sat.asset index aeac12056c..734b2e1056 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/poes_sat.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/poes_sat.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "poes_cover_%Y%j%H%M.jpg" @@ -39,11 +38,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-antarctic.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-antarctic.asset index 133d6e668d..1edd0805c4 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-antarctic.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-antarctic.asset @@ -29,17 +29,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -55,11 +54,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-elnino.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-elnino.asset index ecbcd2b59b..217006ca80 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-elnino.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-elnino.asset @@ -29,17 +29,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -55,11 +54,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-hurricane.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-hurricane.asset index c28b4e7658..f04f2c0f7a 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-hurricane.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/reanalysis-hurricane.asset @@ -29,17 +29,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048_png", Description = Description } @@ -55,11 +54,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048_png.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sandy.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sandy.asset index 2a82899eac..e299abd1e4 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sandy.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sandy.asset @@ -13,11 +13,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -25,7 +24,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "linear_rgb_cyl_%Y%m%d_%H%M.jpg" @@ -34,11 +33,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sunsync_sat.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sunsync_sat.asset index ab563ae299..0d209090b8 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sunsync_sat.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/sunsync_sat.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "sunsync_%Y%j%H%M.jpg" @@ -39,11 +38,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/temp_anom.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/temp_anom.asset index 66427a29ff..34eb1f46be 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/temp_anom.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/temp_anom.asset @@ -21,11 +21,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -33,7 +32,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096_new", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "ANOM.yearly.%Y.color.png" @@ -53,11 +52,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096_new.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan-wvsst.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan-wvsst.asset index 5b2e6097ef..da4470c343 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan-wvsst.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan-wvsst.asset @@ -15,17 +15,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -38,11 +37,6 @@ local track = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", track) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan.asset index 6f86b1b3ff..a68a83c6b2 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/typhoon_haiyan.asset @@ -15,11 +15,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -27,7 +26,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "linear_rgb_cyl_%Y%m%d_%H%M.jpg" @@ -44,11 +43,6 @@ local track = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", track) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/volcano_ash.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/volcano_ash.asset index fe1bb42efe..d0f55350f4 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/volcano_ash.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/atmosphere/volcano_ash.asset @@ -21,26 +21,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2992", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2992.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/birds.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/birds.asset index 5329f988e4..93b124ce9f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/birds.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/birds.asset @@ -15,17 +15,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "birds", Description = Description } @@ -40,11 +39,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "birds.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo.asset index ab4d833181..b09748ae78 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo.asset @@ -16,11 +16,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -28,7 +27,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "5400", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "world.%Y%m.3x5400x2700.jpg" @@ -37,11 +36,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "5400.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo_bathy.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo_bathy.asset index 8088450677..415e6fe533 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo_bathy.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-blue_marble_topo_bathy.asset @@ -16,11 +16,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -28,7 +27,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "5400", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "world.topo.bathy.%Y%m.3x5400x2700.jpg" @@ -37,11 +36,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "5400.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-nightlights.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-nightlights.asset index d9cd63d453..f3a39fec25 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-nightlights.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-nightlights.asset @@ -22,31 +22,21 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-6.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-seasonal_blue_marble.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-seasonal_blue_marble.asset index 12f561159a..28c7a33ee1 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-seasonal_blue_marble.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/blue_marble-seasonal_blue_marble.asset @@ -17,11 +17,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "world%Y%jx4kx2k.jpg" @@ -38,11 +37,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-global.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-global.asset index ab2a765a58..41c74dfb12 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-global.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-global.asset @@ -15,25 +15,19 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer_images = { Identifier = Identifier, Name = Name, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_images) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-mississippi.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-mississippi.asset index 64914979dc..304b944e92 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-mississippi.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-mississippi.asset @@ -15,26 +15,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-yangtze.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-yangtze.asset index 007f0cb78d..94f821bc31 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-yangtze.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/dams-yangtze.asset @@ -15,26 +15,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-06z_only.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-06z_only.asset index 0f18bfa9da..6ec4e40dcf 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-06z_only.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-06z_only.asset @@ -17,11 +17,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "daynite_%Y%j%H%M.jpg" @@ -38,11 +37,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-full_year.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-full_year.asset index 1c2c9c6b18..bd8bf08784 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-full_year.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-full_year.asset @@ -17,11 +17,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -29,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "daynite_%Y%j%H%M.jpg" @@ -38,13 +38,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "2048-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "2048-3.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-oneday.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-oneday.asset index faef9a24cb..2f683d0290 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-oneday.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/day_night-oneday.asset @@ -17,26 +17,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquake-1980_1995_quakes.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquake-1980_1995_quakes.asset index 6d90ee58c8..8546c329ff 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquake-1980_1995_quakes.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquake-1980_1995_quakes.asset @@ -24,17 +24,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "1024", Description = Description } @@ -72,11 +71,6 @@ local quakebar_combined = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "1024.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(legend) openspace.addScreenSpaceRenderable(quakebar) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquakes_and_eruptions.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquakes_and_eruptions.asset index fc107e4c5c..4317e62749 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquakes_and_eruptions.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earthquakes_and_eruptions.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -42,11 +41,6 @@ local legend = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(legend) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnetic_lines.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnetic_lines.asset index 3d72539e6d..5f00be7b5f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnetic_lines.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnetic_lines.asset @@ -22,11 +22,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -34,7 +33,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "%Y.png" @@ -43,11 +42,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnets.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnets.asset index 1b55868ee8..2b8ca3b2a3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnets.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/earths_magnetism_magnets.asset @@ -22,11 +22,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -34,7 +33,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "%Y.png" @@ -43,11 +42,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire.asset index 632e29d266..ed5ae36e9b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire.asset @@ -20,11 +20,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -32,7 +31,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "firemap.%Y%j-%Y%j.4096x2048.png" @@ -41,11 +40,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire_veg.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire_veg.asset index b2ab9d82f2..b8c4b83d86 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire_veg.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/fire_veg.asset @@ -19,17 +19,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -54,11 +53,6 @@ local colorbar_veg = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar_fire) openspace.addScreenSpaceRenderable(colorbar_veg) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/global_vegetation.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/global_vegetation.asset index 288a8105b3..ceacbfb3a3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/global_vegetation.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/global_vegetation.asset @@ -16,10 +16,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images/" +local imagesDestination = syncedDirectory .. "4096" local colorbarDestination = syncedDirectory .. "colorbar/" local background1layer = { @@ -65,16 +66,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name .. " Images") - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - - if not openspace.directoryExists(colorbarDestination) then - openspace.printInfo("Extracting " .. Name .. " Colorbar") - openspace.unzipFile(syncedDirectory .. "colorbar.zip", colorbarDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", background1layer) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", background2layer) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/hot_topo.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/hot_topo.asset index 0ef301c115..7765a7a5f5 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/hot_topo.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/hot_topo.asset @@ -23,29 +23,21 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/irsat_nightlights.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/irsat_nightlights.asset index 3e6a9ba483..713dbb4134 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/irsat_nightlights.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/irsat_nightlights.asset @@ -17,26 +17,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/japan_quake.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/japan_quake.asset index b7b754190d..c778c7ee0a 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/japan_quake.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/japan_quake.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -42,11 +41,6 @@ local legend = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(legend) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/koppen_climate-koppen_1901_2100.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/koppen_climate-koppen_1901_2100.asset index 5bd6447901..f4e66c7e4b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/koppen_climate-koppen_1901_2100.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/koppen_climate-koppen_1901_2100.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -53,11 +52,6 @@ local legend1 = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(legend) openspace.addScreenSpaceRenderable(legend1) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-animation.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-animation.asset index b057b71768..f1075852b4 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-animation.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-animation.asset @@ -22,17 +22,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "3600", Description = Description } @@ -48,11 +47,6 @@ local label = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "3600.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(label) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-slideshow.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-slideshow.asset index 2d0c160537..d2cb3939b5 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-slideshow.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_cover-slideshow.asset @@ -22,7 +22,8 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) local labelsDestination = syncedDirectory .. "labels/" @@ -71,11 +72,6 @@ local labels = { } asset.onInitialize(function() - if not openspace.directoryExists(labelsDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "labels.zip", labelsDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) for _,v in ipairs(labels) do diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_ratio.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_ratio.asset index 2018d1c049..14c252b305 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_ratio.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/land_ratio.asset @@ -12,26 +12,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/magnetic_declination.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/magnetic_declination.asset index d6e8cf82d3..cdb09e2f87 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/magnetic_declination.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/magnetic_declination.asset @@ -16,11 +16,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -28,7 +27,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- @TODO: This dataset is not using equirectangular projection, so it will look -- strange on the planet right now @@ -45,11 +44,6 @@ asset.onInitialize(function() "will look strange when projected onto the spherical Earth" ) - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/paleo_map.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/paleo_map.asset index 94065a393a..75375705a7 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/paleo_map.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/paleo_map.asset @@ -21,10 +21,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" +local imagesDestination = syncedDirectory .. "3600" local layers_names = { "Map01a_PALEOMAP_PaleoAtlas_000", @@ -144,11 +145,6 @@ local legend = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "3600.zip", imagesDestination, true) - end - for i,v in ipairs(layers) do openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", v) end diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/plate_movement.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/plate_movement.asset index 2d34fc16bc..9c6e5b4ff3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/plate_movement.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/plate_movement.asset @@ -24,17 +24,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -51,11 +50,6 @@ local age_scale = { asset.onInitialize(function () - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(age_scale) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/river_discharge_2010.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/river_discharge_2010.asset index 16705873b9..c43add6891 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/river_discharge_2010.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/river_discharge_2010.asset @@ -15,17 +15,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -41,11 +40,6 @@ local colorbar = { asset.onInitialize(function () - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/seismic_waves-1994northridge.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/seismic_waves-1994northridge.asset index c5b9847191..2c7185c9ff 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/seismic_waves-1994northridge.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/seismic_waves-1994northridge.asset @@ -18,10 +18,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" +local imagesDestination = syncedDirectory .. "2048" local pipsDestination = syncedDirectory .. "pips" local layer_base = { @@ -58,16 +59,6 @@ local pips = { } asset.onInitialize(function () - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name .. " Images") - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - - if not openspace.directoryExists(pipsDestination) then - openspace.printInfo("Extracting " .. Name .. " Pips") - openspace.unzipFile(syncedDirectory .. "pips.zip", pipsDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_base) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_stations) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_images) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/surface_temperature.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/surface_temperature.asset index 65367f7370..32cb8d89ab 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/surface_temperature.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/land/surface_temperature.asset @@ -18,17 +18,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -55,11 +54,6 @@ local colorbar2 = { } asset.onInitialize(function () - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) openspace.addScreenSpaceRenderable(colorbar2) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/bm10000.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/bm10000.asset index 26122d2887..0d288e5553 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/bm10000.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/bm10000.asset @@ -40,26 +40,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/gfdl_seaice.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/gfdl_seaice.asset index fe9dcb5ff9..c4f15e3f43 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/gfdl_seaice.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/gfdl_seaice.asset @@ -23,17 +23,17 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } @@ -48,13 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-a1b.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-a1b.asset index cc9848d9c3..f201debe91 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-a1b.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-a1b.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4095", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4095.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-b1.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-b1.asset index dcc1ed6590..1f23bcfeb7 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-b1.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-ccsm-b1.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4095", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4095.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-a1b.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-a1b.asset index d8c9be216e..3a70c3e9e1 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-a1b.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-a1b.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4095", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4095.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-b1.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-b1.asset index 8177afaf90..2117986946 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-b1.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-gfdl-b1.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4095", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4095.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-a1b.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-a1b.asset index df194e5d5b..d4a430bebb 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-a1b.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-a1b.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4095", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4095.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-b1.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-b1.asset index 623bfcd31e..af34b58ce0 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-b1.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ipcc_temp-had-b1.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4095", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4095.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga26.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga26.asset index ebec3e4f25..4fbebf94f8 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga26.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga26.asset @@ -12,11 +12,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -24,7 +23,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GA26.yearly.%Y.color.png" @@ -44,11 +43,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga45.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga45.asset index 4f9068f7d7..6a6e80255b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga45.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga45.asset @@ -12,11 +12,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -24,7 +23,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GA45.yearly.%Y.color.png" @@ -44,11 +43,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga60.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga60.asset index af36426261..8c3ae46b11 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga60.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga60.asset @@ -12,11 +12,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -24,7 +23,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GA60.yearly.%Y.color.png" @@ -44,11 +43,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga85.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga85.asset index 4ed7ed7a82..7d3693fe06 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga85.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/rcp-ga85.asset @@ -12,11 +12,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -24,7 +23,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GA85.yearly.%Y.color.png" @@ -44,11 +43,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-a1b.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-a1b.asset index 438aa10e9c..813080144f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-a1b.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-a1b.asset @@ -22,11 +22,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -34,7 +33,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2100", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "000_%Y_1_A1B_HQ.png" @@ -53,11 +52,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2100.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-e1.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-e1.asset index 96fc5cb29c..44629cb2c6 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-e1.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/models/ukmet-e1.asset @@ -21,11 +21,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -33,7 +32,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2100", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "000_%Y_1_E1_HQ.png" @@ -52,11 +51,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2100.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/2009_ice_animation.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/2009_ice_animation.asset index 21aba0f031..57d612c5c5 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/2009_ice_animation.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/2009_ice_animation.asset @@ -21,17 +21,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -66,11 +65,6 @@ local colorbar_2009_iceconcentration = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar_2007_2009) openspace.addScreenSpaceRenderable(colorbar_2008_minimum) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/animal_tracking.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/animal_tracking.asset index 5f6f49541e..c0db0daade 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/animal_tracking.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/animal_tracking.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "TOPPMOVIE.%Y-%m-%d.png" @@ -49,11 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_tracks.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_tracks.asset index 63a38c129c..931edc6763 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_tracks.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_tracks.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -45,11 +44,6 @@ local buoy = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(buoy) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_waterfall.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_waterfall.asset index 202540b1dc..9068118a45 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_waterfall.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/argo_buoy_waterfall.asset @@ -20,26 +20,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/atl_turtle.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/atl_turtle.asset index 70e3d2ec52..570157016e 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/atl_turtle.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/atl_turtle.asset @@ -20,11 +20,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -32,7 +31,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "turtle-migration-%y%j-%H%M.jpg" @@ -41,11 +40,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/chlorophyll_model.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/chlorophyll_model.asset index b27f5cca80..0b738716d2 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/chlorophyll_model.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/chlorophyll_model.asset @@ -20,17 +20,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "3232", Description = Description } @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "3232.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-gray_land.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-gray_land.asset index 9e88eb4d52..bdc3683ca3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-gray_land.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-gray_land.asset @@ -22,17 +22,17 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } @@ -47,17 +47,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-6.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-7.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-veg_land.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-veg_land.asset index 810642faba..b82f17f143 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-veg_land.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ecco2_sst-veg_land.asset @@ -22,17 +22,17 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } @@ -47,19 +47,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-6.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-7.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-8.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-9.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-black_background.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-black_background.asset index 304b2298a0..780d52d8a9 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-black_background.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-black_background.asset @@ -16,11 +16,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -28,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GFDL_CM2p4_SSTctl_%Y.png" @@ -48,12 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048_png-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "2048_png-2.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-land_background.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-land_background.asset index b432810438..b0319d9fb3 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-land_background.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/gfdl_sst-land_background.asset @@ -16,11 +16,11 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -28,7 +28,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "GFDL_CM2p4_SSTctl_%Y.png" @@ -48,14 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048_png-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "2048_png-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "2048_png-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "2048_png-4.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/greenland_melt.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/greenland_melt.asset index 1e8ca9a876..d9682f9efb 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/greenland_melt.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/greenland_melt.asset @@ -20,11 +20,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -32,7 +31,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "dav19_%Y.jpg" @@ -41,11 +40,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/japan_tsunami_waves.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/japan_tsunami_waves.asset index 6e134e579e..b82e4f6d04 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/japan_tsunami_waves.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/japan_tsunami_waves.asset @@ -23,26 +23,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/loggerheadseaturtletracks.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/loggerheadseaturtletracks.asset index 43f99a0d21..0db5e13cbb 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/loggerheadseaturtletracks.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/loggerheadseaturtletracks.asset @@ -20,26 +20,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_947293.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_947293.asset index 6186d46d25..41c1ae1585 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_947293.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_947293.asset @@ -19,11 +19,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -31,7 +30,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "NOAA-turtle-S947293-%y%j-%H%M.jpg" @@ -40,11 +39,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_958002.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_958002.asset index 5c0aeb1f1f..d0d97a48c9 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_958002.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/mexico_turtles_958002.asset @@ -19,11 +19,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -31,7 +30,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "NOAA-turtle-S958002-%y%j-%H%M.jpg" @@ -40,11 +39,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/modis_sst.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/modis_sst.asset index b5d890a9a0..bae9167481 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/modis_sst.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/modis_sst.asset @@ -18,26 +18,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_speed.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_speed.asset index 91e7c5012b..22b3d502be 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_speed.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_speed.asset @@ -18,26 +18,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4000", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4000.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_sst.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_sst.asset index d82b4d5e4e..2acb9ecbc1 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_sst.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/nasa_sst.asset @@ -16,26 +16,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4000", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4000.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-co2_flux.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-co2_flux.asset index 8fca9fb50e..a7d415ecf9 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-co2_flux.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-co2_flux.asset @@ -15,11 +15,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, @@ -28,7 +27,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "CO2F.yearly.%Y.color.png" @@ -47,11 +46,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "images.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-ph.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-ph.asset index 97c28ec6de..243c092d3f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-ph.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-ph.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "ACID.yearly.%Y.color.png" @@ -49,11 +48,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "images.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-saturation.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-saturation.asset index d97a124c31..3564726ea0 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-saturation.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_acid-saturation.asset @@ -23,11 +23,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -35,7 +34,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "images", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "ARAG.yearly.%Y.color.png" @@ -62,11 +61,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "images.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", reefs) openspace.addScreenSpaceRenderable(colorbar) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_depths_temp.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_depths_temp.asset index 2697673efb..27412e8b7d 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_depths_temp.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_depths_temp.asset @@ -18,11 +18,12 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" -local imagesByDepthDestination = syncedDirectory .. "bydepth" +local imagesDestination = syncedDirectory .. "4096" +local imagesByDepthDestination = syncedDirectory .. "4096_by_depth" local layer = { Identifier = Identifier, @@ -53,16 +54,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - - if not openspace.directoryExists(imagesByDepthDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096_by_depth.zip", imagesByDepthDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_drain-gray.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_drain-gray.asset index d261ebaf04..5b26039281 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_drain-gray.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/ocean_drain-gray.asset @@ -16,26 +16,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pac_turtle.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pac_turtle.asset index 435ad94e1c..0a07d9bbd9 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pac_turtle.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pac_turtle.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "pac-turtle-migration-%y%j-%H%M.jpg" @@ -39,11 +38,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/phytoplankton.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/phytoplankton.asset index 6ae998bea9..a9e41ea914 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/phytoplankton.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/phytoplankton.asset @@ -22,17 +22,17 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } @@ -47,17 +47,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-3.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-4.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-5.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-6.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-7.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pr_tsunami.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pr_tsunami.asset index 8e4d61a4c4..0e1764b50d 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pr_tsunami.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/pr_tsunami.asset @@ -19,26 +19,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_level.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_level.asset index f01ce6ea49..a14298c2c2 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_level.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_level.asset @@ -24,26 +24,20 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4000", Description = Description } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4000.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_surface_height_anomaly.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_surface_height_anomaly.asset index 4db3e77319..0c9a8fb74c 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_surface_height_anomaly.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sea_surface_height_anomaly.asset @@ -19,17 +19,17 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } @@ -45,13 +45,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "8192-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "8192-2.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "8192-3.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seaice_monthly.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seaice_monthly.asset index 5fd156abd1..09fc36f549 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seaice_monthly.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seaice_monthly.asset @@ -18,11 +18,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -30,7 +29,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "sibt1850_seaice_extent_%Y%M%H_sos.png" @@ -39,11 +38,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-land_background.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-land_background.asset index 109122f344..86d5b8dd7d 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-land_background.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-land_background.asset @@ -13,17 +13,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -38,11 +37,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-no_holes.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-no_holes.asset index 3a5d47d741..8cbed7808b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-no_holes.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-no_holes.asset @@ -14,17 +14,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "2048", Description = Description } @@ -39,11 +38,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-polar_holes.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-polar_holes.asset index 2401d7cbb9..97f5ceb458 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-polar_holes.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/seawifs-polar_holes.asset @@ -14,17 +14,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4320_png", Description = Description } @@ -39,11 +38,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4320_png.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/shark.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/shark.asset index 9a67e649bc..65565f084d 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/shark.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/shark.asset @@ -19,11 +19,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -31,7 +30,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "2048", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "shark-migration-%y%j-%H%M.jpg" @@ -40,11 +39,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "2048.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sss.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sss.asset index 5778b346dc..3cd8b360a4 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sss.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sss.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -42,11 +41,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sst_1980_1999.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sst_1980_1999.asset index 8e030e7386..23619d282f 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sst_1980_1999.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/sst_1980_1999.asset @@ -19,11 +19,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -31,7 +30,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "cyl_%Y_%m_%d.jpg" @@ -40,11 +39,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vector_winds.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vector_winds.asset index 8d5ad10920..70bd6a1fc2 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vector_winds.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vector_winds.asset @@ -19,17 +19,17 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true, + UnzipFilesDestination = "images" }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "images", Description = Description } @@ -44,12 +44,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096-1.zip", imagesDestination, true) - openspace.unzipFile(syncedDirectory .. "4096-2.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vent_discoveries_animation.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vent_discoveries_animation.asset index 82643e8ae9..717a67efea 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vent_discoveries_animation.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vent_discoveries_animation.asset @@ -16,11 +16,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -28,7 +27,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "new", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "vents_%Y.png" @@ -37,11 +36,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "new.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vorticity.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vorticity.asset index 8790ea411b..7589c4164b 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vorticity.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/vorticity.asset @@ -17,17 +17,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "frames", Description = Description } @@ -42,11 +41,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "frames.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_2012.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_2012.asset index b1c99ce719..0a57ed360d 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_2012.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_2012.asset @@ -14,17 +14,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -39,11 +38,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_katrina.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_katrina.asset index 80408cf903..25ea12e63a 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_katrina.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_katrina.asset @@ -16,17 +16,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -41,11 +40,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_sandy.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_sandy.asset index fededbb87b..9a4bf42a56 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_sandy.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_height_sandy.asset @@ -16,17 +16,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -41,11 +40,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_power_2012.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_power_2012.asset index 393de3b8d7..e2659c7b0e 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_power_2012.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/waves-wave_power_2012.asset @@ -14,17 +14,16 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, Enabled = asset.enabled, Type = "ImageSequenceTileLayer", - FolderPath = imagesDestination, + FolderPath = syncedDirectory .. "4096", Description = Description } @@ -39,11 +38,6 @@ local colorbar = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) openspace.addScreenSpaceRenderable(colorbar) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-10day_seaice.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-10day_seaice.asset index 867f64e106..db42698543 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-10day_seaice.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-10day_seaice.asset @@ -20,11 +20,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -32,7 +31,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096_png", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "nt_monthext_%Y%m%d-%Y%m%d_n07_sos.png" @@ -41,11 +40,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096_png.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-sept_seaice.asset b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-sept_seaice.asset index f3e75f2327..adb39f8b5e 100644 --- a/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-sept_seaice.asset +++ b/data/assets/scene/solarsystem/planets/earth/noaa-sos/oceans/weeklyseaice-sept_seaice.asset @@ -28,11 +28,10 @@ local syncedDirectory = asset.syncedResource({ Name = Name, Type = "HttpSynchronization", Identifier = Identifier, - Version = 1 + Version = 1, + UnzipFiles = true }) -local imagesDestination = syncedDirectory .. "images" - local layer = { Identifier = Identifier, Name = Name, @@ -40,7 +39,7 @@ local layer = { Type = "TemporalTileLayer", Mode = "Folder", Folder = { - Folder = imagesDestination, + Folder = syncedDirectory .. "4096", -- See https://en.cppreference.com/w/cpp/io/manip/get_time for an explanation of the -- time formatting string Format = "nt_monthext_%Y%m%d-%Y%m%d_n07_sos.png" @@ -49,11 +48,6 @@ local layer = { } asset.onInitialize(function() - if not openspace.directoryExists(imagesDestination) then - openspace.printInfo("Extracting " .. Name) - openspace.unzipFile(syncedDirectory .. "4096.zip", imagesDestination, true) - end - openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) end) diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index d103aec7de..49065125c1 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,16 @@ namespace { // The version of this resource that should be requested int version; + + // Determines whether .zip files that are downloaded should automatically be + // unzipped. If this value is not specified, no unzipping is performed + std::optional unzipFiles; + + // The destination for the unzipping. If this value is specified, all zip files + // contained in the synchronization will be unzipped into the same specified + // folder. If this value is specified, but 'unzipFiles' is false, no extaction + // will be performed + std::optional unzipFilesDestination; }; #include "httpsynchronization_codegen.cpp" } // namespace @@ -63,6 +74,10 @@ HttpSynchronization::HttpSynchronization(const ghoul::Dictionary& dict, _identifier = p.identifier; _version = p.version; + _unzipFiles = p.unzipFiles.value_or(_unzipFiles); + if (p.unzipFilesDestination.has_value()) { + _unzipFilesDestination = *p.unzipFilesDestination; + } } HttpSynchronization::~HttpSynchronization() { @@ -233,6 +248,33 @@ bool HttpSynchronization::trySyncFromUrl(std::string listUrl) { LERROR(fmt::format("Error renaming {} to {}", tempName, originalName)); failed = true; } + + if (_unzipFiles && originalName.extension() == ".zip") { + std::string source = originalName.string(); + std::string dest = + _unzipFilesDestination.has_value() ? + (originalName.parent_path() / *_unzipFilesDestination).string() : + originalName.replace_extension().string();; + + struct zip_t* z = zip_open(source.c_str(), 0, 'r'); + const bool is64 = zip_is64(z); + zip_close(z); + + if (is64) { + LERROR(fmt::format( + "Error while unzipping {}: Zip64 archives are not supported", source + )); + continue; + } + + int ret = zip_extract(source.c_str(), dest.c_str(), nullptr, nullptr); + if (ret != 0) { + LERROR(fmt::format("Error {} while unzipping {}", ret, source)); + continue; + } + + std::filesystem::remove(source); + } } if (failed) { for (const std::unique_ptr& d : downloads) { diff --git a/modules/sync/syncs/httpsynchronization.h b/modules/sync/syncs/httpsynchronization.h index b0a2754b5c..b5d17d71cb 100644 --- a/modules/sync/syncs/httpsynchronization.h +++ b/modules/sync/syncs/httpsynchronization.h @@ -101,6 +101,9 @@ private: /// The file version for the requested files int _version = -1; + bool _unzipFiles = false; + std::optional _unzipFilesDestination = std::nullopt; + // The list of all repositories that we'll try to sync from const std::vector _syncRepositories;