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

Update Basemaps US for Google and Bing #74

Closed
4 tasks done
joewheaton opened this issue May 20, 2021 · 16 comments
Closed
4 tasks done

Update Basemaps US for Google and Bing #74

joewheaton opened this issue May 20, 2021 · 16 comments
Assignees
Labels
Basemaps Adding new basemaps

Comments

@joewheaton
Copy link
Contributor

joewheaton commented May 20, 2021

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

Basemaps

@joewheaton joewheaton changed the title Update Basemaps US for Update Basemaps US for Google and Bing May 20, 2021
@joewheaton joewheaton added the Basemaps Adding new basemaps label May 20, 2021
@lauren-herbine
Copy link
Collaborator

@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.

@lauren-herbine
Copy link
Collaborator

I started messing around here

lauren-herbine added a commit that referenced this issue May 20, 2021
not working yet. #74
@MattReimer
Copy link
Member

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:

  1. (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.
  2. (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.

@joewheaton
Copy link
Contributor Author

@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...

@wally-mac
Copy link

@lauren-herbine once you start working on this task please @tyler1218hatch, @Cashe93 and I know if you need any assistance.

@MattReimer
Copy link
Member

Just some updates here:

  1. I have the type attribute implemented Adding XSD to basemaps and tile types #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.
  2. I have separate tickets for ArcRave and QRave (see the references above in the feed) to actually implement this.

MattReimer pushed a commit that referenced this issue May 25, 2021
not working yet. #74
@MattReimer
Copy link
Member

MattReimer commented May 25, 2021

@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&amp;x={x}&amp;y={y}&amp;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 added a commit that referenced this issue May 25, 2021
@MattReimer MattReimer removed their assignment May 26, 2021
@lauren-herbine
Copy link
Collaborator

@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.

@lauren-herbine
Copy link
Collaborator

@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:
image
Should I mark all as resolved and commit and merge?

@MattReimer
Copy link
Member

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.

@lauren-herbine
Copy link
Collaborator

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&amp;x={x}&amp;y={y}&amp;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&amp;x={x}&amp;y={y}&amp;z={z}">
        <Metadata>
          <Meta name="Description">Google Terrain</Meta>
        </Metadata>
      </Layer>

@tyler1218hatch @Cashe93 @wally-mac any quick thoughts or fixes?

@MattReimer
Copy link
Member

@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

@lauren-herbine
Copy link
Collaborator

Hi @MattReimer, I just downloaded your 0.5.1 but XYZ tiles are still only showing Google Imagery
image

@MattReimer
Copy link
Member

Oh, yeah sorry. Miscommunication on my part. That's not where they live. The idea is that you define them in Basemaps.xml and then they go into the QRave basemaps chooser:

Screen Shot 2021-06-02 at 8 36 48 AM

@lauren-herbine
Copy link
Collaborator

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.
image

I wrote the XML so there should be a group layer right at the top called "Google" (above USGS Hydrography)

@MattReimer
Copy link
Member

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!

Screen Shot 2021-06-02 at 9 04 44 AM

MattReimer added a commit that referenced this issue Jun 2, 2021
MattReimer pushed a commit that referenced this issue Jun 2, 2021
not working yet. #74
MattReimer added a commit that referenced this issue Jun 2, 2021
MattReimer added a commit that referenced this issue Jun 2, 2021
MattReimer pushed a commit that referenced this issue Jun 2, 2021
not working yet. #74
MattReimer added a commit that referenced this issue Jun 2, 2021
MattReimer added a commit that referenced this issue Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Basemaps Adding new basemaps
Projects
None yet
Development

No branches or pull requests

4 participants