Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's there inside .vrt files and how to get them #4

Closed
subham913 opened this issue Jun 6, 2018 · 2 comments
Closed

What's there inside .vrt files and how to get them #4

subham913 opened this issue Jun 6, 2018 · 2 comments

Comments

@subham913
Copy link

subham913 commented Jun 6, 2018

Hi,
Can someone please tell me what's there inside both the .vrt file(bdortho.vrt and mapbox.vrt) and how to get these files.I am having problem in running the file CNN.ipynb.
Please help me out.
Thanks

@michelbl
Copy link
Member

michelbl commented Jun 6, 2018

A vrt file look like that:

<GDAL_WMS>
    <Service name="TMS">
        <ServerUrl>%url%</ServerUrl>
    </Service>
    <Referer>%referer%</Referer>
    <DataWindow>
        <UpperLeftX>-20037508.34</UpperLeftX>
        <UpperLeftY>20037508.34</UpperLeftY>
        <LowerRightX>20037508.34</LowerRightX>
        <LowerRightY>-20037508.34</LowerRightY>
        <TileLevel>19</TileLevel>
        <TileCountX>1</TileCountX>
        <TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:3857</Projection>
    <BlockSizeX>256</BlockSizeX>
    <BlockSizeY>256</BlockSizeY>
    <BandsCount>3</BandsCount>
    <Cache>
        <Path>%cache_dir%</Path>
        <Depth>2</Depth>
        <Extension>.png</Extension>
    </Cache>
</GDAL_WMS>

and you would replace %url% by something like http://a.tiles.mapbox.com/v4/openstreetmap.map-inh7ifmo/${z}/${x}/${y}.png?access_token=***or http://a.tiles.mapbox.com/v4/openstreetmap.map-inh7ifmo/${z}/${x}/${y}.png?access_token=***.

Parameters Referer, UserAgent may be required by your WMS provider.

You can find more about vrt files in the git history of this repo. I eventually decided that this is too much dependant on the WMS server used so that it is the responsibility of the reuser of this repo to configure it to work properly. So I removed the template from the versioned code. However I agree this can be painful to write from scratch.

@michelbl
Copy link
Member

michelbl commented Jun 6, 2018

Closing the issue, do not hesitate to reopen it if this is not clear enough.

@michelbl michelbl closed this as completed Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants