melowntech / vts-browser-js

JavaScript WebGL 3D map rendering engine
BSD 2-Clause "Simplified" License
220 stars 42 forks source link

How to achieve better earth surface resolutions? #189

Closed shrikant-panchal closed 4 years ago

shrikant-panchal commented 4 years ago

Hello, I am using vts-browser-js as a GIS tool for my application.

I observed that we can change the mapconfig.json file to load different maps, and I tried using three different sources; Melown-Earth-Intergeo-2017, VTS-Tutorial-Map-4 and VTS-Tutorial-map. But I could not see the considerable change in resolution level.

Could you please suggest a way to achieve better earth surface resolutions in vts-browser-js?

Any help would be really appreciated!

ladislavhorky commented 4 years ago

Hello,

I believe you talk about ortho imagery resolution. All the configurations you mentioned use Sentinel 2 Cloudless 2016 mosaic which has ~10m/px resolution. We currently do not use any higher resolution dataset in our configs. You may wish to set up your own VTS instance and use e.g. Bing maps ortho imagery as described in this tutorial.

shrikant-panchal commented 4 years ago

Hello,

I believe you talk about ortho imagery resolution. All the configurations you mentioned use Sentinel 2 Cloudless 2016 mosaic which has ~10m/px resolution. We currently do not use any higher resolution dataset in our configs. You may wish to set up your own VTS instance and use e.g. Bing maps ortho imagery as described in this tutorial.

In order to use Bing Maps, do we need to set up our own server? If No, what is the approximate size of such data(the data with the better resolution) and is the data usage/storage capacity available with standard VTS license sufficient for storing such type of custom data?

ghost commented 4 years ago

Hello Shrikant-panchal,

Have you found your way to achieve hi-res earth surface?

You do need to set up your own mapproxy to deliver Bing Maps for two reasons:

When using the Services, you may not, nor may you permit End Users to copy, store, archive, or create a database of Content, except that you may store geocodes locally for use solely with your Applications.

Source: Section 5.n of the Microsoft Bing Maps Platform APIs Terms Of Use

Anyway, the approximate size of such data is... massive! FYI, the "low res" Sentinel 2 Cloudless 2019 is 6.7TB. The resolution of Sentinel 2 Cloudless is not the best I've seen, but available for free access (according to the legal notice on the use of Copernicus Sentinel Data and Service Information, European Commission).

If you cannot run the official VTS mapproxy, that's okay. I cannot either, so I've made my own mapproxy, it's basically an API able to transfer images based on a formatted URL. If you really cannot set up a mapproxy, you can always change the boundlayer URL to the direct tiles supplier.

For example, you can change the default Sentinel 2 Cloudless boundlayer that is:

"default-satellite" : {
    "credits" : 
    {
        "eox-it" : 
        {
            "id" : 990,
            "notice" : "Datasource: {copy} [https://s2maps.eu EOX IT Services GmbH]"
        }
    },
    "lodRange" : [ 1, 15 ],
    "maskUrl" : "{lod}-{x}-{y}.mask",
    "tileRange" : 
    [
        [ 0, 0 ],
        [ 1, 1 ]
    ],
    "type" : "raster",
    "url" : "https://cdn.melown.com/vts/melown2015/imagery/global/eox-it-sentinel2-cloudless/{lod}-{x}-{y}.jpg?r=2"
}

To the higher resolution Mapbox tiles:

"world-satellite-mapbox" : {
    "credits" : 
    {
        "mapbox" : 
        {
            "id" : 980,
            "notice" : "Datasource: {copy} [https://www.mapbox.com/about/maps/ Mapbox]"
        }
    },
    "lodRange" : [ 1, 15 ],
    "tileRange" : 
    [
        [ 0, 0 ],
        [ 1, 1 ]
    ],
    "type" : "raster",
    "url" : "https://api.mapbox.com/v4/mapbox.satellite/{loclod}/{locx}/{locy}@2x.jpg90?access_token=<YOUR_TOKEN>"
}

Notes:

You can also find the very best resolution by using government data (but limited to a country). Here is an example with Switzerland:

"ch-satellite" : {
    "credits" : 
    {
        "swisstopo-eu" : 
        {
            "id" : 810,
            "notice" : "Datasource: {copy} [https://www.swisstopo.admin.ch/en/home.html ESA / Eurimage / swisstopo, NPOC]"
        }
    },
    "lodRange" : [ 1, 15 ],
    "tileRange" : 
    [
        [ 0, 0 ],
        [ 1, 1 ]
    ],
    "type" : "raster",
    "url" : "https://wmts{alt(10,20)}.geo.admin.ch/1.0.0/ch.swisstopo.swissimage/default/current/3857/{loclod}/{locx}/{locy}.jpeg"
}

If you really want the Bing Maps without mapproxy, you could fetch the metadata URL on the client side (that would disclose your secret key) and update the mapConfig.json file accordingly. Notice that you can use quadKey and dynamic sub-domains in the URL (quad() and alt() respectively)

As you can see, VTS Browser JS is highly configurable and you do not necessary need your own server.