示例#1
0
 void Init(string scenename, LatLng ll, double latkm, double lngkm, int lod)
 {
     SceneName        = scenename;
     useElevationData = false;
     MapExtent        = MapExtentTypeE.AsSpecified;
     llbox            = new LatLngBox(ll, latkm, lngkm, lod: lod);
 }
示例#2
0
    public (bool, string, double, double) GetWwwUri(LatLngBox llb, int nrow, int ncol, int iblk, int maxrowinblk)
    {
        var cursrow = iblk * maxrowinblk;
        var curerow = cursrow + maxrowinblk - 1;

        if (curerow > (nrow - 1))
        {
            curerow = nrow - 1;
        }
        if (cursrow >= nrow)
        {
            Debug.LogError("cursrow>=nrow  currow:" + cursrow + " nrow:" + nrow);
            return(false, "", 0, 0);
        }
        var nrowsinblock = curerow - cursrow + 1;
        var pctmin       = ((double)cursrow) / nrow;
        var pctmax       = ((double)curerow) / nrow;
        var latmin       = llb.minll.lat + pctmin * llb.extent.lat;
        var latmax       = llb.minll.lat + pctmax * llb.extent.lat;
        int nrowstofetch = nrowsinblock;

        if (nrowsinblock == 1)
        {
            latmax += 0.0000001;
            nrowstofetch++;
        }
        //Debug.Log("Geturi cursrow:" + cursrow + " curerow:" + curerow + "  nrowsinblock:" + nrowsinblock+" nrowstofetch:"+nrowstofetch);
        var uri = String.Format(url, latmin, llb.minll.lng, latmax, llb.maxll.lng, nrowstofetch, ncol, bingKey);

        return(true, uri, latmin, latmax);
    }
示例#3
0
文件: QkMan.cs 项目: jmarymee/CampSim
 public QkMan(QmapMesh qmm, string datamapname, MapProvider mapprov, LatLngBox llbox, int pixelspertile = 256)
 {
     this.datamapname   = datamapname;
     this.qmm           = qmm;
     this.pixelspertile = pixelspertile;
     this.levelOfDetail = llbox.lod;
     this.llbox         = llbox;
     this.ll1           = llbox.GetUpperLeft();
     this.ll2           = llbox.GetBottomRight();
 }
示例#4
0
文件: QkMan.cs 项目: jmarymee/CampSim
 public QkMan(QmapMesh qmm, string datamapname, MapProvider mapprov, LatLng ll1, LatLng ll2, int levelOfDetail, int pixelspertile = 256)
 {
     this.datamapname   = datamapname;
     this.qmm           = qmm;
     this.pixelspertile = pixelspertile;
     this.ll1           = ll1;
     this.ll2           = ll2;
     this.levelOfDetail = levelOfDetail;
     this.llbox         = new LatLngBox(ll1, ll2, "llbox", levelOfDetail);
 }
示例#5
0
 public void CalcValues(LatLngBox box)
 {
     diagonalKm = box.diagonalInMeters / 1000.0f;
     widthKm    = (float)box.extentMeters.x / 1000.0f;
     heightKm   = (float)box.extentMeters.y / 1000.0f;
     widthPix   = (float)box.extentPixels.x;
     heightPix  = (float)box.extentPixels.y;
     areaSqkm   = widthKm * heightKm;
     llbox      = box;
 }
示例#6
0
 public void Initialize()
 {
     TileSystem.TileXYToPixelXY(xidx, yidx, out var _pix_ul, out var _pixy_ul);
     this.pixul     = new Vector2Int(_pix_ul, _pixy_ul);
     this.pixbr     = new Vector2Int(_pix_ul + pixpertile - 1, _pixy_ul + pixpertile - 1);
     this.llul      = LatLng.GetLngLatFromV2iPixelCoords(lod, this.pixul);
     this.llul.name = "Qktile UpperLeft";
     this.llbr      = LatLng.GetLngLatFromV2iPixelCoords(lod, this.pixbr);
     this.llbr.name = "Qktile BottomRight";
     this.box       = new LatLngBox(llul, llbr, lod: lod);
 }
示例#7
0
    public async Task <(LatLngBox, string, string, bool, string)> GetLlbSpec()
    {
        LatLngBox llb = null;

        (var ll, var name, var nearplace, var ok, var errmsg) = await GetLatLng();

        if (ok)
        {
            llb = new LatLngBox(ll, latkm, lngkm, name, lod);
        }
        return(llb, name, nearplace, ok, errmsg);
    }
示例#8
0
 public bool IsSubset(LatLngBox box)
 {
     if (!IsIn(box.minll))
     {
         return(false);
     }
     if (!IsIn(box.maxll))
     {
         return(false);
     }
     return(true);
 }
示例#9
0
 public void InitElevs(string scenename, ElevProvider elevprov, MapExtentTypeE mapextent, EarthHightModelE model, int nrow, int ncol, LatLngBox llb)
 {
     Debug.Log("InitElevs mapextent:" + mapextent + " nrow:" + nrow + " ncol:" + ncol);
     this.elevprov  = elevprov;
     this.scenename = scenename;
     this.mapprov   = MapProvider.Bing;// the only one with elevations
     this.nrow      = nrow;
     this.ncol      = ncol;
     this.llb       = llb;
     this.model     = model;
     this.mapextent = mapextent;
     heights        = new List <float>();
 }
示例#10
0
 public void InitializeGrid(string scenename, LatLngBox llbox, string mapcoordname = "", MapProvider mapprov = MapProvider.Bing, ElevProvider elevprov = ElevProvider.Bing)
 {
     this.scenename     = scenename;
     this.mapcoordname  = mapcoordname;
     this.mapprov       = mapprov;
     this.elevprov      = elevprov;
     this.levelOfDetail = llbox.lod;
     this.llmap         = this.gameObject.AddComponent <LatLongMap>();
     this.qmapElev      = gameObject.AddComponent <QmapElevation>();
     this.qkm           = new QkMan(this, this.mapcoordname, mapprov, llbox);
     this.qtt           = this.gameObject.AddComponent <Qtrilines>();
     qtt.Init(this);
 }
示例#11
0
    public async Task <(QmapMesh, int, int)> MakeMeshFromLlbox(string scenename, LatLngBox llbox, int tpqk = 4, float hmult = 1, string mapcoordname = "", MapExtentTypeE mapextent = MapExtentTypeE.SnapToTiles, MapProvider mapprov = MapProvider.Bing, ElevProvider elevprov = ElevProvider.Bing, bool execute = true, bool forceload = false,
                                                               bool limitQuadkeys = true, QmapMesh.sythTexMethod synthTex   = QmapMesh.sythTexMethod.Quadkeys, HeightTypeE heitType = HeightTypeE.FetchedAndZeroed)
    {
        var wpstays = false;

        Debug.Log($"QmapMan.MakeMeshFromLlbox scenename:{scenename} wpstays:{wpstays}");
        this.mapprov      = mapprov;
        this.elevprov     = elevprov;
        this.scenename    = scenename;
        this.mapcoordname = mapcoordname;
        if (rgo != null)
        {
            Destroy(rgo);
            rgo = null;
        }
        rgo = new GameObject("rgo");
        rgo.transform.SetParent(this.transform, worldPositionStays: wpstays);
        qkgo = new GameObject("QmapMesh");
        qkgo.transform.SetParent(rgo.transform, worldPositionStays: wpstays);
        qkgo.transform.position = Vector3.zero;

        var qmmcomp = qkgo.AddComponent <QmapMesh>();

        qmmcomp.descriptor = $"{scenename} {llbox.lod} {mapprov} {mapextent}";
        qmmcomp.InitializeGrid(scenename, llbox, mapcoordname: mapcoordname);
        qmmcomp.secsPerQkTile    = tpqk;
        qmmcomp.useElevationData = useElevationDataStart;
        qmmcomp.mapExtent        = mapextent;
        qmmcomp.hmult            = hmult;
        qmmcomp.synthTex         = synthTex;
        qmmcomp.limitQuadkeys    = limitQuadkeys;
        qmmcomp.heightType       = heitType;

        (var nbm, var nel) = await qmmcomp.GenerateGrid(execute, forceload, limitQuadkeys : limitQuadkeys);

        return(qmmcomp, nbm, nel);
    }
示例#12
0
    public void InitMapFromLatLongBox(LatLngBox latLngBox, int lod)
    {
        mapcoord = new MapCoordblock(this);
        var llbl        = latLngBox.GetBottomLeft();
        var llul        = latLngBox.GetUpperLeft();
        var llbr        = latLngBox.GetBottomRight();
        var llur        = latLngBox.GetUpperRight();
        var llmp        = latLngBox.GetMidPoint();
        var pixToMeters = TileSystem.GroundResolution(llmp.lat, lod);
        //var orgpix = llbl.GetPixelCoords(lod);
        var orgpix    = llmp.GetPixelCoords(lod);
        var orgmeters = new Vector2d(orgpix.x * pixToMeters, orgpix.y * pixToMeters);

        mapcoord.AddRowLngLat(llbl, lod, pixToMeters, orgmeters);
        mapcoord.AddRowLngLat(llul, lod, pixToMeters, orgmeters);
        mapcoord.AddRowLngLat(llbr, lod, pixToMeters, orgmeters);
        mapcoord.AddRowLngLat(llur, lod, pixToMeters, orgmeters);
        mapcoord.AddRowLngLat(llmp, lod, pixToMeters, orgmeters);
        glbllm      = this;
        maps.latmap = mapcoord.DoRegression("lat = x + z");
        maps.lngmap = mapcoord.DoRegression("lng = x + z");
        maps.xmap   = mapcoord.DoRegression("x = lng + lat");
        maps.zmap   = mapcoord.DoRegression("z = lng + lat");
    }
示例#13
0
    public async void SetMode(QmapModeE newmode)
    {
        Debug.Log("QmapMan.SetMode: " + newmode);
        ClearMesh();
        useElevationDataStart = true;

        switch (newmode)
        {
        case QmapModeE.Bespoke:
        {
            useElevationDataStart = false;
            (qmm, _, _)           = await MakeMeshFromLlbox(bespoke.SceneName, bespoke.llbox, tpqk : 16, mapprov : bespoke.MapProv, mapextent : bespoke.MapExtent, limitQuadkeys : false);

            var rotv = bespoke.maprot;
            transform.localRotation = Quaternion.identity;
            transform.Rotate(rotv.x, rotv.y, rotv.z);
            transform.position = bespoke.maptrans;
            Debug.Log($"Setting bespoke - transform:{bespoke.maptrans} rot:{rotv.y}");
            qmm.nodefak = 1f;
            break;
        }

        case QmapModeE.None:
        {
            // do nothing
            break;
        }

        case QmapModeE.What3words:
        {
            // do nothing
            break;
        }

        case QmapModeE.MsftCampus:
        {
            var ll1 = new LatLng(47.646622, -122.139957, "MsftCampus ll1");         // msft campus
            var ll2 = new LatLng(47.631792, -122.128826, "MsftCampus ll2");
            (qmm, _, _) = await MakeMesh("msftcampus", 15, ll1, ll2, mapprov : mapprov);

            break;
        }

        case QmapModeE.MsftCampusMapped:
        {
            var ll1 = new LatLng(47.646622, -122.139957, "MsftCampus ll1");         // msft campus
            var ll2 = new LatLng(47.631792, -122.128826, "MsftCampus ll2");
            (qmm, _, _) = await MakeMesh("msftcampus", 15, ll1, ll2, mapcoordname : "MsftCoreCampus", mapprov : mapprov);

            break;
        }

        case QmapModeE.MsftCampusMappedHigh:
        {
            var ll1 = new LatLng(47.646622, -122.139957, "MsftCampus ll1");         // msft campus
            var ll2 = new LatLng(47.631792, -122.128826, "MsftCampus ll2");
            (qmm, _, _) = await MakeMesh("msftcampus", 18, ll1, ll2, mapcoordname : "MsftCoreCampus", tpqk : 4, mapprov : mapprov);

            break;
        }

        case QmapModeE.MsftCampusMappedHigh19:
        {
            var ll1 = new LatLng(47.646622, -122.139957, "MsftCampus ll1");         // msft campus
            var ll2 = new LatLng(47.631792, -122.128826, "MsftCampus ll2");
            (qmm, _, _) = await MakeMesh("msftcampus", 19, ll1, ll2, mapcoordname : "MsftCoreCampus", tpqk : 2, mapprov : mapprov);

            break;
        }

        case QmapModeE.Cyclades:
        {
            //var llmid = new LatLng(36.674545, 25.271239, "Cyclades mid");
            var llmid = new LatLng(36.801411, 25.271239, "Cyclades mid");
            var llbox = new LatLngBox(llmid, 110, 170, lod: 12);
            useElevationDataStart                = true;
            Viewer.viewerDefaultRotation         = new Vector3(0, 90, 0);
            Viewer.viewerDefaultPosition         = new Vector3(0, 0, 0);
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            (qmm, _, _) = await MakeMeshFromLlbox("cyclades", llbox, tpqk : 16, hmult : 3, mapprov : mapprov, limitQuadkeys : false);

            var vtm = gameObject.AddComponent <VehicleTrackMan>();
            vtm.Init(qmm, trackFilePath, VehicleTrackMan.TrackScenario.CycladesTrip);
            sceneScripter = gameObject.AddComponent <SceneScripter>();
            sceneScripter.Init(SceneScenario.Cyclades, vtm);
            break;
        }

        case QmapModeE.Seattle:
        {
            var llmid = new LatLng(47.619992, -122.3373495, "Seattle mid");
            var llbox = new LatLngBox(llmid, 25.17, 14.84, lod: 12);
            useElevationDataStart                = true;
            Viewer.viewerDefaultRotation         = new Vector3(0, 90, 0);
            Viewer.viewerDefaultPosition         = new Vector3(0, 0, 0);
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;

            //(qmm,_,_) = await MakeMeshBox("seattle", llbox,tpqk:16,hmult:10, mapprov: mapprov);
            (qmm, _, _) = await MakeMeshFromLlbox("seattle", llbox, tpqk : 16, hmult : 10, mapprov :  mapprov, synthTex : QmapMesh.sythTexMethod.Quadkeys);

            var tpcomp = qmm.gameObject.GetComponent <TrilinesDeco>();
            if (tpcomp != null)
            {
                tpcomp.showDeco = false;
            }
            break;
        }

        case QmapModeE.Seattle10:
        {
            var llmid = new LatLng(47.619992, -122.3373495, "Seattle mid");
            var llbox = new LatLngBox(llmid, 10, 10, lod: 13);
            (qmm, _, _) = await MakeMeshFromLlbox("seattle", llbox, tpqk : 16, hmult : 10, mapprov : mapprov);

            break;
        }

        case QmapModeE.Seattle3:
        {
            //useElevationDataStart = false;
            Viewer.viewerDefaultRotation         = new Vector3(0, 90, 0);
            Viewer.viewerDefaultPosition         = new Vector3(0, 0, 0);
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            var llmid = new LatLng(47.619992, -122.3373495, "Seattle mid");
            var llbox = new LatLngBox(llmid, 3, 3, lod: 18);
            (qmm, _, _) = await MakeMeshFromLlbox("seattle", llbox, tpqk : 16, hmult : 4, mapprov : mapprov, heitType : HeightTypeE.FetchedAndOriginZeroed, limitQuadkeys : false);

            qmm.addMeshColliders = true;
            qmm.AddMeshColliders();
            break;
        }

        case QmapModeE.FortHills:
        {
            var ll1 = new LatLng(57.404272, -111.670935, "FortHills ll1");         // suncor fort hills
            var ll2 = new LatLng(57.180913, -111.272580, "FortHills ll2");
            (qmm, _, _) = await MakeMesh("forthills", 12, ll1, ll2, mapprov : mapprov);

            var dz = gameObject.AddComponent <VehicleTrackMan>();
            dz.Init(qmm, trackFilePath, VehicleTrackMan.TrackScenario.SuncorMine);
            break;
        }

        case QmapModeE.Dozers:
        {
            var llmid = new LatLng(57.01, -111.375, "Dozers llmid");
            var llbox = new LatLngBox(llmid, 4.453, 6.666, "dozerbox", lod: 15);
            Debug.Log("dozers-llbox llmid:" + llbox.midll.ToString());
            (qmm, _, _) = await MakeMeshFromLlbox("dozers", llbox, tpqk : 16, hmult : 5, mapprov : mapprov);

            //var qcm = InitMesh("dozers", "", 15, ll1, ll2, 16, 10, mapprov: mapprov);
            qmm.nodefak = 0.2f;
            var dz = gameObject.AddComponent <VehicleTrackMan>();
            dz.Init(qmm, trackFilePath, VehicleTrackMan.TrackScenario.SuncorMine);
            break;
        }

        case QmapModeE.DozerSmall:
        {
            var llmid = new LatLng(57.0056037, -111.3581390, "Dozers  Smallllmid");
            var llbox = new LatLngBox(llmid, 0.5, 0.5, "dozersmallbox", lod: 19);
            Debug.Log("dozers-small-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerDefaultRotation         = new Vector3(0, 90, 0);
            Viewer.viewerDefaultPosition         = new Vector3(0, 0, 0);
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            (qmm, _, _) = await MakeMeshFromLlbox("dozerssmall", llbox, tpqk : 10, hmult : 5, mapprov : mapprov);

            //var qcm = InitMesh("dozers", "", 15, ll1, ll2, 16, 10, mapprov: mapprov);
            qmm.nodefak = 1f;
            var dz = gameObject.AddComponent <VehicleTrackMan>();
            dz.Init(qmm, trackFilePath, VehicleTrackMan.TrackScenario.SuncorMine);
            break;
        }

        case QmapModeE.DozersMedium:
        {
            var llmid = new LatLng(57.0056037, -111.3581390, "Dozers Medium llmid");
            var llbox = new LatLngBox(llmid, 1.0, 1.0, "dozermediumbox", lod: 19);
            Debug.Log("dozers-med-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerDefaultRotation         = new Vector3(0, 90, 0);
            Viewer.viewerDefaultPosition         = new Vector3(0, 0, 0);
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            (qmm, _, _) = await MakeMeshFromLlbox("dozersmedium", llbox, tpqk : 16, hmult : 5, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 1f;
            var dz = gameObject.AddComponent <VehicleTrackMan>();
            dz.Init(qmm, trackFilePath, VehicleTrackMan.TrackScenario.SuncorMine);
            break;
        }

        case QmapModeE.Horizon4:
        {
            var llmid = new LatLng(57.338920, -111.750198, "CNRL Horizon llmid");
            var llbox = new LatLngBox(llmid, 4.0, 4.0, "horizonbox", lod: 17);
            Debug.Log("Horizon-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerAvatarDefaultValue      = ViewerAvatar.Minehaul1;
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            Viewer.ViewerControlDefaultValue     = ViewerControl.Velocity;
            Viewer.viewerDefaultPosition         = new Vector3(155.30f, 64.06f, -9.77f);
            Viewer.viewerDefaultRotation         = new Vector3(0, -90, 0);
            (qmm, _, _) = await MakeMeshFromLlbox("horizon", llbox, tpqk : 16, hmult : 1, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 1f;
            break;
        }

        case QmapModeE.Horizon16:
        {
            var llmid = new LatLng(57.338920, -111.750198, "CNRL Horizon llmid");
            var llbox = new LatLngBox(llmid, 16.0, 16.0, "horizonbox", lod: 15);
            Debug.Log("Horizon-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerAvatarDefaultValue      = ViewerAvatar.Minehaul1;
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            Viewer.ViewerControlDefaultValue     = ViewerControl.Velocity;
            Viewer.viewerDefaultPosition         = new Vector3(164.62f, 64.06f, -235.97f);
            Viewer.viewerDefaultRotation         = new Vector3(0, -90, 0);
            (qmm, _, _) = await MakeMeshFromLlbox("horizon", llbox, tpqk : 16, hmult : 1, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 1f;
            break;
        }

        case QmapModeE.MtStHelens16:
        {
            var llmid = new LatLng(46.198428, -122.188841, "MtStHellens16llmid");
            var llbox = new LatLngBox(llmid, 16.0, 16.0, "MtStHellens16 box", lod: 15);
            Debug.Log("MtStHellens16-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerAvatarDefaultValue      = ViewerAvatar.Rover;
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            Viewer.ViewerControlDefaultValue     = ViewerControl.Velocity;
            (qmm, _, _) = await MakeMeshFromLlbox("mtsthelens", llbox, tpqk : 16, hmult : 1, mapextent : MapExtentTypeE.AsSpecified, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 1f;
            break;
        }

        case QmapModeE.MtStHelens12:
        {
            var llmid = new LatLng(46.198428, -122.188841, "MtStHellensllmid");
            var llbox = new LatLngBox(llmid, 12.0, 12.0, "MtStHellens box", lod: 16);
            Debug.Log("MtStHellens-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerAvatarDefaultValue      = ViewerAvatar.Rover;
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            Viewer.ViewerControlDefaultValue     = ViewerControl.Velocity;
            (qmm, _, _) = await MakeMeshFromLlbox("mtsthelens", llbox, tpqk : 16, hmult : 1, mapextent : MapExtentTypeE.AsSpecified, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 0.2f;
            break;
        }

        case QmapModeE.MtStHelens3:
        {
            var llmid = new LatLng(46.198428, -122.188841, "MtStHellens3llmid");
            var llbox = new LatLngBox(llmid, 3.0, 3.0, "MtStHellens3 box", lod: 17);
            Debug.Log("MtStHellens3-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerAvatarDefaultValue      = ViewerAvatar.Rover;
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            Viewer.ViewerControlDefaultValue     = ViewerControl.Velocity;
            (qmm, _, _) = await MakeMeshFromLlbox("mtsthelens", llbox, tpqk : 16, hmult : 1, mapextent : MapExtentTypeE.AsSpecified, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 0.2f;
            var tpcomp = qmm.gameObject.GetComponent <TriPointDeco>();
            if (tpcomp != null)
            {
                tpcomp.showDeco = false;
            }
            break;
        }

        case QmapModeE.MtStHelens2:
        {
            var llmid = new LatLng(46.198428, -122.188841, "MtStHellens3llmid");
            var llbox = new LatLngBox(llmid, 3.0, 3.0, "MtStHellens3 box", lod: 19);
            Debug.Log("MtStHellens3-llbox llmid:" + llbox.midll.ToString());
            Viewer.viewerAvatarDefaultValue      = ViewerAvatar.Rover;
            Viewer.ViewerCamPositionDefaultValue = ViewerCamPosition.FloatBehind;
            Viewer.ViewerControlDefaultValue     = ViewerControl.Velocity;
            (qmm, _, _) = await MakeMeshFromLlbox("mtsthelens", llbox, tpqk : 16, hmult : 1, mapextent : MapExtentTypeE.AsSpecified, mapprov : mapprov, limitQuadkeys : false);

            qmm.nodefak = 0.2f;
            break;
        }

        case QmapModeE.Riggins:
        {
            var llmid = new LatLng(45.412219, -116.328921, "Riggins");
            var llbox = new LatLngBox(llmid, 10.0, 10.0, "Riggins box", lod: 15);
            Debug.Log("riggins-llbox llmid:" + llbox.midll.ToString());
            (qmm, _, _) = await MakeMeshFromLlbox("riggins", llbox, tpqk : 16, hmult : 1, mapprov : mapprov);

            //var qcm = InitMesh("dozers", "", 15, ll1, ll2, 16, 10, mapprov: mapprov);
            qmm.nodefak = 0.2f;
            break;
        }

        case QmapModeE.Eb12:
        {
            var ll1 = new LatLng(49.996606, 8.674300, "Eb12 ll1");         // EB12 in Germany
            var ll2 = new LatLng(49.987100, 8.687557, "Eb12 ll2");
            (qmm, _, _) = await MakeMesh("eb12", 16, ll1, ll2, tpqk : 2, hmult : 10, mapprov : mapprov);

            break;
        }

        case QmapModeE.Eb12Mapped:
        {
            var ll1 = new LatLng(49.996606, 8.674300, "Eb12 ll1");         // EB12 in Germany
            var ll2 = new LatLng(49.987100, 8.687557, "Eb12 ll2");
            (qmm, _, _) = await MakeMesh("eb12", 16, ll1, ll2, mapcoordname : "Eb12", mapprov : mapprov);

            break;
        }

        case QmapModeE.Tukwilla:
        {
            var ll1 = new LatLng(47.461414, -122.262566, "Tukwila ll1");         // Tukwila
            var ll2 = new LatLng(47.453419, -122.253639, "Tukwila ll2");
            (qmm, _, _) = await MakeMesh("tukwila", 16, ll1, ll2, mapprov : mapprov);

            break;
        }

        case QmapModeE.MtFuji:
        {
            var ll1 = new LatLng(35.450153, 138.603933, "MtFuji ll1");         // MtFuji
            var ll2 = new LatLng(35.296752, 138.874443, "MtFuji ll2");
            (qmm, _, _) = await MakeMesh("mtfuji", 14, ll1, ll2, tpqk : 8, mapprov : mapprov);

            qmm.nodefak = 0.5f;
            break;
        }

        case QmapModeE.Whistler:
        {
            var ll1 = new LatLng(50.229914, -122.859530, "Whistler ll1");         // Whistler
            var ll2 = new LatLng(50.029914, -123.2595303, "Whistler ll2");
            (qmm, _, _) = await MakeMesh("whistler", 14, ll1, ll2, tpqk : 4, mapprov : mapprov);

            qmm.nodefak = 0.5f;
            break;
        }

            // 49.996606, 8.674300
        }
    }
示例#14
0
    public async Task <(QmapMesh, int, int)> MakeMesh(string scenename, int lod, LatLng ll1, LatLng ll2, string mapcoordname = "", int tpqk = 4, float hmult = 1, MapProvider mapprov = MapProvider.Bing, ElevProvider elevprov = ElevProvider.Bing)
    {
        var llbox = new LatLngBox(ll1, ll2, scenename, lod: lod);

        return(await MakeMeshFromLlbox(scenename, llbox, mapcoordname : mapcoordname, tpqk : tpqk, hmult : hmult, mapprov : mapprov, elevprov : elevprov));
    }