I'm trying to export a layer via QTiles, gotten from the Data Source Manager and connecting to (USGSHydroCached).

I have QTiles set to zoom levels 0-20 and Render tiles outside of layers extent checked (basemap goes up to 20). For some reason, the hydro layer only shows up to zoom level 17 (as per Leaflet). At zoom levels 18,19,20 the layer disappears.

QTiles is generating folders and files up to zoom level 20 (assuming this is the extent checkbox).

Is there a way to have it render the tile beyond that zoom level (poor resolution is fine)?


The layer info at the link you provide indicates the MapServer should provide tiles up to level 19, not 20 as you'd like. But that shouldn't create problems at level 17!

However, I've played around with zooming in on the layer the QGis map window and it shows up at scales up to 1:6019, but not more detailed than that. So there's something funny with the tiles being returned by the server at levels 17+. QTiles is a red herring here, it's just that's what's asking for the layer at detailed scales.

Since it's actually a simple line layer, it would be much better if you could find a vector (rather than tile/raster) source for it. I tried a trick that often works, to try to connect to it as an ArcGisFeatureServer rather than MapServer, replacing MapServer with FeatureServer in the URI, but that didn't work. Your ideal solution would be to hunt and see a FeatureServer or WFS source for it.

Failing that, you can get a jagged version by exporting it in the region of interest at a scale that works, and then loading that into your map instead. To do that, load it in, zoom into a generous area well beyond your area of interest, right click on the layer in the layer tree and choose Export / Save as...

Then do the following; note VRT is off, click on Map Canvas Extent to set the region that will be exported, and the resolution 2.388657133974685 is chosen since that's the resolution of a Level 16 tile that works. Then use your saved .tif rather than the MapServer version.

enter image description here

If you want to get fancy, keep both layers, but make them visible at different scales via layer properties. And/or vectorize the raster you saved, and then style it to your heart's content (color, line thickness etc) that will then render properly at any scale level (just of course with the level of underlying detail you exported, no more no less).

| improve this answer | |
  • At usgs.gov/news/new-hydro-map-service-available found "This new cache supports visualization zooming down to 1:9,000 scale (Level 17 in Google Maps tile levels)." So Level 17 is the most detailed available and you're being thrown by the faulty info provided by the MapServer that up to Level 20 is available. – Houska Apr 4 '19 at 23:57
  • Thanks for digging into this! I was, in fact, being thrown off by QTiles and the map docs. Gotta wait a few hours before I can offer the bounty. – Antoine Zambelli Apr 5 '19 at 16:00

As @Houska has noted the map service that you are using only provides tiles down to level 17. However, the data supplied in the map service is the USGS National Hydrography Dataset which is freely available to download in vector form, so if you want to generate tiles at any zoom level, this can be done by using a styled version of the vector NHD data.

| improve this answer | |
  • I'll take a look at styled vector data. Too new to this stuff to figure out the stylesheet stuff right now but I might 'upgrade' to using that in the future. – Antoine Zambelli Apr 5 '19 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.