public glTFTests(DemNetFixture fixture) { _rasterService = fixture.ServiceProvider.GetService <RasterService>(); _elevationService = fixture.ServiceProvider.GetService <ElevationService>(); _sharpGltfService = fixture.ServiceProvider.GetService <SharpGltfService>(); _meshService = fixture.ServiceProvider.GetService <MeshService>(); }
public DemNetVisualTopoService() { var config = new ConfigurationBuilder() .SetBasePath(AppContext.BaseDirectory) .AddJsonFile("appsettings.json", optional: true) .AddJsonFile("secrets.json", optional: true, reloadOnChange: false) .Build(); this.services = new ServiceCollection() .AddOptions() .AddLogging(loggingBuilder => loggingBuilder .AddDebug() .SetMinimumLevel(LogLevel.Debug)) .Configure <AppSecrets>(config.GetSection(nameof(AppSecrets))) .Configure <DEMNetOptions>(config.GetSection(nameof(DEMNetOptions))) .AddDemNetCore() .AddDemNetglTF() .AddDemNetVisualTopoExtension() .BuildServiceProvider(); this.visualTopoService = services.GetService <VisualTopoService>(); this.elevationService = services.GetService <ElevationService>(); this.meshService = services.GetService <MeshService>(); this.sharpGltfService = services.GetService <SharpGltfService>(); this.imageryService = services.GetService <ImageryService>(); }
public OsmTests(DemNetFixture fixture) { _osmProcessor = fixture.ServiceProvider.GetService <DefaultOsmProcessor>(); _elevationService = fixture.ServiceProvider.GetService <ElevationService>(); _imageryService = fixture.ServiceProvider.GetService <ImageryService>(); _gltfService = fixture.ServiceProvider.GetService <SharpGltfService>(); }
private void btnTestFacettes_Click(object sender, EventArgs e) { BeanFacettesToVisu3D v_beanToVisu3d; v_beanToVisu3d = new BeanFacettesToVisu3D(); Dictionary <int, int> v_indiceParIdPoint = new Dictionary <int, int>(); int v_indice = 0; GeoPoint v_geoPoint; foreach (BeanPoint_internal v_point in _topolFacettes.p11_pointsFacettesByIdPoint.Values) { v_geoPoint = new GeoPoint(v_point.p10_coord[1], v_point.p10_coord[0], (float)v_point.p10_coord[2]); v_beanToVisu3d.p00_geoPoint.Add(v_geoPoint); v_indiceParIdPoint.Add(v_point.p00_id, v_indice); v_indice++; } //Création des listes d'indices et normalisation du sens des points favettes List <int> v_listeIndices; bool v_renvoyerNullSiPointsColineaires_vf = true; bool v_normalisationSensHoraireSinonAntihoraire = false; foreach (BeanFacette_internal v_facette in _topolFacettes.p13_facettesById.Values) { List <BeanPoint_internal> v_normalisationDuSens = FLabServices.createCalculMedium().GetOrdonnancementPointsFacette(v_facette.p01_pointsDeFacette, v_renvoyerNullSiPointsColineaires_vf, v_normalisationSensHoraireSinonAntihoraire); if (v_normalisationDuSens != null) { v_listeIndices = new List <int>(); foreach (BeanPoint_internal v_ptFacette in v_normalisationDuSens) { v_listeIndices.Add(v_indiceParIdPoint[v_ptFacette.p00_id]); } v_beanToVisu3d.p01_listeIndexPointsfacettes.Add(v_listeIndices); } } // SharpGltfService glTFService = new SharpGltfService(new MeshService()); var model = glTFService.GenerateTriangleMesh(v_beanToVisu3d.p00_geoPoint, v_beanToVisu3d.p01_listeIndexPointsfacettes.SelectMany(c => c).ToList(), null); string v_nomFichierOut = "TIN_"; if (rdSRTMGL3.Checked) { v_nomFichierOut += "SRTM_GL3"; } else if (rdSRTMGL1.Checked) { v_nomFichierOut += "SRTM_GL1"; } else { v_nomFichierOut += "AW3D30"; } v_nomFichierOut += "_p" + tb_precisionEnM.Text; model.SaveGLB(Path.Combine("Test3D", v_nomFichierOut + ".glb")); MessageBox.Show("Traitement terminé =>" + v_nomFichierOut); }
public TINSamples(ILogger <TINSamples> logger , IRasterService rasterService , IElevationService elevationService , SharpGltfService glTFService) { _logger = logger; _rasterService = rasterService; _elevationService = elevationService; _glTFService = glTFService; }
public STLSamples(ILogger <STLSamples> logger , ElevationService elevationService , SharpGltfService sharpGltfService , ISTLExportService stlService) { _logger = logger; _elevationService = elevationService; _sharpGltfService = sharpGltfService; _stlService = stlService; }
public ImagerySample(ILogger <glTF3DSamples> logger , IElevationService elevationService , SharpGltfService sharpGltfService , ImageryService imageryService) { _logger = logger; _elevationService = elevationService; _sharpGltfService = sharpGltfService; _imageryService = imageryService; }
public void Init(ElevationService elevationService , SharpGltfService gltfService , MeshService meshService , IOsmDataService osmDataService , ILogger logger) { this._elevationService = elevationService; this._gltfService = gltfService; this._meshService = meshService; this._osmDataService = osmDataService; this._logger = logger; }
public AerialGpxSample(ILogger <Gpx3DSamples> logger , IRasterService rasterService , IElevationService elevationService , ImageryService imageryService , SharpGltfService sharpGltfService) { _logger = logger; _rasterService = rasterService; _elevationService = elevationService; _imageryService = imageryService; _sharpGltfService = sharpGltfService; }
public VisualTopoSample(ILogger <VisualTopoSample> logger , SharpGltfService gltfService , MeshService meshService , ElevationService elevationService , ImageryService imageryService , VisualTopoService visualTopoService) { _logger = logger; _meshService = meshService; _gltfService = gltfService; _elevationService = elevationService; _imageryService = imageryService; _visualTopoService = visualTopoService; }
public CustomRasterElevationSample(ILogger <CustomRasterElevationSample> logger , RasterService rasterService , ElevationService elevationService , MeshService meshService , SharpGltfService sharpGltfService , ImageryService imageryService) { _logger = logger; _rasterService = rasterService; _elevationService = elevationService; _sharpGltfService = sharpGltfService; _imageryService = imageryService; _meshService = meshService; }
public OsmExtensionSample(DefaultOsmProcessor osmProcessor , OverpassAPIDataService osmService , ImageryService imageryService , ElevationService elevationService , SharpGltfService gltfService , ILogger <OsmExtensionSample> logger) { this._osmProcessor = osmProcessor; this._imageryService = imageryService; this._elevationService = elevationService; this._gltfService = gltfService; this._logger = logger; this._osmService = osmService; }
public DefaultOsmProcessor(ElevationService elevationService , SharpGltfService gltfService , MeshService meshService , IOsmDataServiceFactory dataServiceFactory , IOptions <DEMNetOptions> options , IOptions <OsmElevationOptions> osmOptions , ILogger <DefaultOsmProcessor> logger) { this._dataServiceFactory = dataServiceFactory; this._options = options.Value; this.Settings = osmOptions.Value; this._elevationService = elevationService; this._gltfService = gltfService; this._meshService = meshService; this._logger = logger; }
public Text3DSample(ILogger <Text3DSample> logger , ElevationService elevationService , MeshService meshService , AdornmentsService adornmentsService , RasterService rasterService , ImageryService imageryService , SharpGltfService sharpGltfService) { _logger = logger; _elevationService = elevationService; _rasterService = rasterService; _imageryService = imageryService; _sharpGltfService = sharpGltfService; _adornmentsService = adornmentsService; _meshService = meshService; }
public HelladicSample(DefaultOsmProcessor sampleOsmProcessor , ImageryService imageryService , ElevationService elevationService , SharpGltfService gltfService , MeshService meshService , Sketchfab.SketchfabApi sketchFabApi , IOptions <AppSecrets> secrets , ILogger <HelladicSample> logger) { this._sampleOsmProcessor = sampleOsmProcessor; this._imageryService = imageryService; this._elevationService = elevationService; this._gltfService = gltfService; this._meshService = meshService; this._sketchFabApi = sketchFabApi; this._sketchFabToken = secrets.Value.SketchFabToken; this._logger = logger; if (string.IsNullOrEmpty(_sketchFabToken)) { _logger.LogWarning($"SketchfabToken is not set. Ensure you have a secrets.json file with a SketchfabToken entry with your api token (see https://sketchfab.com/settings/password)"); } }
public static ModelRoot AddTINMesh(ModelRoot model, HeightMap hMap, double precision, SharpGltfService gltf, PBRTexture textures, int srid) { Triangulation triangulation = TINGeneration.GenerateTIN(hMap, precision, srid); return(gltf.AddTerrainMesh(model, triangulation, textures, doubleSided: true)); }
public static ModelRoot GenerateTIN(HeightMap hMap, double precision, SharpGltfService gltf, PBRTexture textures, int srid) { return(TINGeneration.AddTINMesh(gltf.CreateNewModel(), hMap, precision, gltf, textures, srid)); }