Update Basemaps US for Google and Bing
Closed this issue ยท 16 comments
Please update BaseMaps.xml
for the 'United States Region' to include in a <GroupLayer name="Google Maps">
:
- Google Imagery
- Google Terrain
- Google Maps
Region' to include in a <GroupLayer name="Bing Maps">
:
- Bing Images
@MattReimer or @philipbaileynar, is it possible to get XYZ tiles to work in both QRave and ArcRave through our basemap feature?
<Region name="United States">
<GroupLayer name=" Google">
<Layer name="Google Imagery" url="https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}">
<Metadata>
<Meta name="Description">Google Imagery</Meta>
</Metadata>
</Layer>
</GroupLayer>
This is what we tried and Q did not like it. Is this because this only works for wms vs. wmts?
Do XYZ tiles work in Arc?
These are much quicker and higher resolution than NAIP, so if we could get them to work, that would be great.
I started messing around here
Hi Lauren,
At present we only support wms layers but that's more just because that got us results quickly. We always assumed we would extend it.
For this to work there are two things needed:
- (easy) We might need to extend the XML some sort of
type
attribute to help us figure out what type of tile we should be loading. - (harder) QRave and ArcRave will need to have this type of layer added to them.
for (1) I suggest something like this:
<Region name="United States">
<GroupLayer name=" Google">
<Layer name="Google Imagery" type="xyz" url="https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}">
<Metadata>
<Meta name="Description">Google Imagery</Meta>
</Metadata>
</Layer>
</GroupLayer>
</Region>
Note the type="wms|tms|xyz"
here.
For (2) we need to decide what types we want to support and then figure out conventions for implementing them. WMS is the hardest so I'm glad we started there.
Here's some context on web tiles I stole from the web https://gis.stackexchange.com/questions/132242/what-are-the-differences-between-tms-xyz-wmts
WMS is a protocol defined by the OGC for requesting rendered map images for arbitrary areas. Clients can make requests to it in a tiled pattern if they wish.
WMS-C is an extension for WMS created by OSGeo that adds metadata to the capabilities document letting the client know where to make requests so they line up with service's tiles. A WMS-C service may reject requests that are not aligned to its tile grid.
TMS is a protocol created by OSGeo that allows tiles to be requested using integer indices. It also provides metadata for discovery and configuration. It can be implemented as a set of tile images and metadata files sitting in a static file system. Y axis goes up from the bottom.
WMTS is a protocol created by the OGC that allows tiles to be requested using integer indices. It also provides metadata for discovery and configuration. Y axis goes down from the top.
"XYZ" is the term we use for various ad hoc schemes for serving tiles, often from a static file system. There's no standard and no mechanism for metadata. There's no fixed standard for Y axis direction although down from the top is most common. Google did something for their own purposes, and other people sort of copied it. A particular XYZ client and server may or may not be able to work together. XYZ Clients can sometimes also be made to work with TMS or WMTS services.
@MattReimer this is really helpful thanks. Anabranch would be happy to pay for getting task 1 done when you can get to it. We've got plenty of other things to pay for getting 2 done when you think its appropriate. When task 1 is done, then @lauren-herbine can finish this task and/or we can have @tyler1218hatch, @wally-mac and/or @Cashe93 work on this.
@nick4rivers, just pinging this your way FYI...
@lauren-herbine once you start working on this task please @tyler1218hatch, @Cashe93 and I know if you need any assistance.
Just some updates here:
- I have the type attribute implemented #85. I just need to do a quick test on QRAVE and then you're good to go, adding as many basemaps in WMS, TMS or XYZ as you want.
- I have separate tickets for ArcRave and QRave (see the references above in the feed) to actually implement this.
@lauren-herbine I've implemented the changes in #85 and I've rebased your google_imagery
branch on top of master and corrected a few things
Your layer should now look something like this:
<Layer name="Google Imagery" type="xyz" url="https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}">
<Metadata>
<Meta name="Description">Google Imagery</Meta>
</Metadata>
</Layer>
Be sure to reset your local google_imagery
branch to where it is on the remote before you start working again. Let me know if you have any problems with that.
EDIT: Take special note how the "&" characters need to be escaped to work inside XML
@MattReimer Thank you so much for all of your work and knowledge sharing with this! I am just returning from a week or so off grid, so I will start working on this today and tomorrow.
@MattReimer I am not sure if this is an issue or not- but I don't want to mess anything up as I work on this:
Should I mark all as resolved and commit and merge?
Hey Lauren. You want to rebase instead of merging. If you want to do a quick call to sort this out just email me. I'm available all afternoon.
I'm not sure if I am understanding the proper way to edit the map URLs. All of the google URLs are the same aside from one letter (s,t, and m):
https://mt1.google.com/vt/lyrs=t&x={x}&y={y}&z={z}
https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}
https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}
h = roads only
m = standard roadmap
p = terrain
r = somehow altered roadmap
s = satellite only
t = terrain only
y = hybrid
I edited the URLs following @MattReimer's first example (for imagery), but have not been successful in having the terrain or roadmaps show up in Q.
This is what is working:
<Layer name="Google Imagery" type="xyz" url="https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}">
<Metadata>
<Meta name="Description">Google Imagery</Meta>
</Metadata>
</Layer>
And this is what is not working:
<Layer name="Google Terrain" type="xyz" url="https://mt1.google.com/vt/lyrs=t&x={x}&y={y}&z={z}">
<Metadata>
<Meta name="Description">Google Terrain</Meta>
</Metadata>
</Layer>
@tyler1218hatch @Cashe93 @wally-mac any quick thoughts or fixes?
@lauren-herbine make sure you have the latest / greatest version of QRave plugin. XYZ basemaps weren't added until 0.5.0 (I'm putting out 0.5.1 today
Once that's checked let me know if you're still having issues. This is a pretty new feature so we might need to patch it if there's a problem
Hi @MattReimer, I just downloaded your 0.5.1 but XYZ tiles are still only showing Google Imagery
Oh, no, MY bad! Ok, I'm re-oriented now. Unfortunately, none of them are still working. And now that I am looking in the right place, I can see that none of the google URLs are working, not just the maps and terrain as I mentioned above.
I wrote the XML so there should be a group layer right at the top called "Google" (above USGS Hydrography)
Hey @lauren-herbine I think what might have happened is that the plugin update overwrote the local Basemaps.xml file
Just to make sure I updated my local Basemaps.xml file to what you had in the latest commit and it works great!