Beispiel #1
0
 public glTFTests(DemNetFixture fixture)
 {
     _rasterService    = fixture.ServiceProvider.GetService <RasterService>();
     _elevationService = fixture.ServiceProvider.GetService <ElevationService>();
     _sharpGltfService = fixture.ServiceProvider.GetService <SharpGltfService>();
     _meshService      = fixture.ServiceProvider.GetService <MeshService>();
 }
Beispiel #2
0
        private const string DATA_FILES_PATH = null; //@"C:\Users\ElevationAPI\AppData\Local"; // Leave to null for default location (Environment.SpecialFolder.LocalApplicationData)

        public SampleApplication(ILogger <SampleApplication> logger,
                                 RasterService rasterService
                                 )
        {
            _logger            = logger;
            this.rasterService = rasterService;
        }
Beispiel #3
0
 public GpxSamples(ILogger <GpxSamples> logger
                   , RasterService rasterService
                   , ElevationService elevationService)
 {
     _logger           = logger;
     _rasterService    = rasterService;
     _elevationService = elevationService;
 }
Beispiel #4
0
 public CustomSamples(ILogger <CustomSamples> logger
                      , ElevationService elevationService
                      , RasterService rasterService)
 {
     _logger           = logger;
     _elevationService = elevationService;
     _rasterService    = rasterService;
 }
Beispiel #5
0
 public DownloaderSample(ILogger <DownloaderSample> logger
                         , RasterService rasterService
                         , ElevationService elevationService)
 {
     _logger           = logger;
     _rasterService    = rasterService;
     _elevationService = elevationService;
 }
Beispiel #6
0
 public TINSamples(ILogger <TINSamples> logger
                   , RasterService rasterService
                   , ElevationService elevationService
                   , SharpGltfService glTFService)
 {
     _logger           = logger;
     _rasterService    = rasterService;
     _elevationService = elevationService;
     _glTFService      = glTFService;
 }
Beispiel #7
0
 public AerialGpxSample(ILogger <AerialGpxSample> logger
                        , RasterService rasterService
                        , ElevationService elevationService
                        , ImageryService imageryService
                        , SharpGltfService sharpGltfService)
 {
     _logger           = logger;
     _rasterService    = rasterService;
     _elevationService = elevationService;
     _imageryService   = imageryService;
     _sharpGltfService = sharpGltfService;
 }
Beispiel #8
0
 public Gpx3DSamples(ILogger <Gpx3DSamples> logger
                     , RasterService rasterService
                     , ElevationService elevationService
                     , SharpGltfService sharpGltfService
                     , ImageryService imageryService)
 {
     _logger           = logger;
     _rasterService    = rasterService;
     _elevationService = elevationService;
     _sharpGltfService = sharpGltfService;
     _imageryService   = imageryService;
 }
        private const string DATA_FILES_PATH = null; //@"C:\Users\ElevationAPI\AppData\Local"; // Leave to null for default location (Environment.SpecialFolder.LocalApplicationData)

        public SampleApplication(ILogger <SampleApplication> logger, IServiceProvider services,
                                 RasterService rasterService)
        {
            _logger            = logger;
            this.rasterService = rasterService;
            this.services      = services;

            // Change data dir if not null
            if (!string.IsNullOrWhiteSpace(DATA_FILES_PATH))
            {
                rasterService.SetLocalDirectory(DATA_FILES_PATH);
            }
        }
 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;
 }
Beispiel #11
0
 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 List <BeanPoint_internal> GetPointsTestsByBBox(string p_bbox, DEMDataSet dataset, int sridCible)
        {
            List <BeanPoint_internal> v_pointsToTest = new List <BeanPoint_internal>();

            try
            {
                // fix issue #86 to work with opentopography files without proper DI injection
                RasterIndexServiceResolver rasterIndexServiceResolver = dataSourceType =>
                {
                    switch (dataSourceType)
                    {
                    case DEMDataSourceType.GDALVrt:
                        return(new GDALVRTFileService(null, null));

                    default:
                        throw new KeyNotFoundException();     // or maybe return null, up to you
                    }
                };
                RasterService    v_rasterService    = new RasterService(rasterIndexServiceResolver);
                ElevationService v_elevationService = new ElevationService(v_rasterService, null);
                BoundingBox      v_bbox             = GeometryService.GetBoundingBox(p_bbox);
                v_elevationService.DownloadMissingFiles(dataset, v_bbox);
                //
                HeightMap v_hMap;
                v_hMap = v_elevationService.GetHeightMap(ref v_bbox, dataset);


                v_hMap         = v_hMap.ReprojectTo(4326, sridCible);
                v_pointsToTest = GetGeoPointsByHMap(v_hMap, sridCible);
            }
            catch (Exception)
            {
                throw;
            }
            return(v_pointsToTest);
        }
Beispiel #13
0
        public List <BeanPoint_internal> GetPointsTestsByBBox(string p_bbox, DEMDataSet dataset, int sridCible)
        {
            List <BeanPoint_internal> v_pointsToTest = new List <BeanPoint_internal>();

            try
            {
                IRasterService    v_rasterService    = new RasterService(null);
                IElevationService v_elevationService = new ElevationService(v_rasterService, null);
                BoundingBox       v_bbox             = GeometryService.GetBoundingBox(p_bbox);
                v_elevationService.DownloadMissingFiles(dataset, v_bbox);
                //
                HeightMap v_hMap;
                v_hMap = v_elevationService.GetHeightMap(ref v_bbox, dataset);


                v_hMap         = v_hMap.ReprojectTo(4326, sridCible);
                v_pointsToTest = GetGeoPointsByHMap(v_hMap, sridCible);
            }
            catch (Exception)
            {
                throw;
            }
            return(v_pointsToTest);
        }
Beispiel #14
0
 public DatasetTests(DemNetFixture fixture)
 {
     _rasterService        = fixture.ServiceProvider.GetService <RasterService>();
     _elevationService     = fixture.ServiceProvider.GetService <ElevationService>();
     _indexServiceResolver = fixture.ServiceProvider.GetService <RasterIndexServiceResolver>();
 }
Beispiel #15
0
 public DatasetSamples(ILogger <DatasetSamples> logger
                       , RasterService rasterService)
 {
     _logger        = logger;
     _rasterService = rasterService;
 }
Beispiel #16
0
 public RasterTests(DemNetFixture fixture)
 {
     _rasterService    = fixture.ServiceProvider.GetService <RasterService>();
     _elevationService = fixture.ServiceProvider.GetService <ElevationService>();
 }
Beispiel #17
0
 public ConfigurationTests(DemNetFixture fixture)
 {
     _rasterService        = fixture.ServiceProvider.GetService <RasterService>();
     _options              = fixture.ServiceProvider.GetService <IOptions <DEMNetOptions> >();
     _indexServiceResolver = fixture.ServiceProvider.GetService <RasterIndexServiceResolver>();
 }