Re: [Qgis-user] QGIS Local XYZ Tiles

2018-09-24 Thread Saber Razmjooei
Nyall's suggestion worked and you should be able to add the folder
containing XYZ tiles. The path in Linux looked like this:
file:path/to/folder/{z}/{x}/{y}.png

The changes is master and should appear in the next release.
Cheers,
Saber

On Thu, 20 Sep 2018 at 23:32, Nyall Dawson  wrote:

> On Thu, 20 Sep 2018 at 06:31, Justin Robinson  wrote:
> >
> > Hi Kyle,
> >
> > It looks like that's not currently possible, it still has an open
> request in the tracker as well: https://issues.qgis.org/issues/16587
> >
> > It probably does boil down to lack of status/content-type for file://
> locations. A work around seems to be hosting with a web server of some kind
> (I'm guessing even Python's http module would suffice: "python3 -m
> http.server" or in python2 "python -m SimpleHTTPServer" and then
> localhost:8000 by default).
>
> If someone has a build environment available to test this, I think the
> fix might be changing the condition in qgswmsprovider.cpp line 3887 to
>
> if ( !contentType.isEmpty() && !contentType.startsWith(
> QLatin1String( "image/" ), Qt::CaseInsensitive ) &&
>  contentType.compare( QLatin1String(
> "application/octet-stream" ), Qt::CaseInsensitive ) != 0 )
> { ...
>
> (i.e. insert the "!contentType.isEmpty()" check)
>
> I've no local xyz tiles available to test this with.
>
> Nyall
>
>
> >
> > Cheers,
> > Justin
> >
> > On Tue, Sep 18, 2018 at 8:43 AM Kyle  wrote:
> >>
> >> I am struggling to get file urls to work with the QGIS tiles layer. I
> have followed the instructions here:
> >>
> >> https://www.spatialbias.com/2018/02/qgis-3.0-xyz-tile-layers/
> >>
> >> Under the URL field, I put
> "file:///home/kyle/Documents/tiles/{z}/{x}/{y}.png" (without quotes)
> >>
> >> I also set the min and max zoom levels to 3 and 8 respectively. It is
> worth noting that the tile set that I am pointing at is not complete and
> only covers North America.
> >>
> >> My problem is that nothing shows up on the screen after I add the
> layer. Am I missing something? Everything works correctly when I point to a
> online tile server (i.e openstreetmaps).
> >>
> >> It appears that I'm not the only one to have this issue:
> >>
> https://gis.stackexchange.com/questions/219118/how-to-use-qgis-tile-server-provider-with-local-tms-folder
> >>
> >> ___
> >> Qgis-user mailing list
> >> Qgis-user@lists.osgeo.org
> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >
> > ___
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



-- 
Saber Razmjooei
www.lutraconsulting.co.uk
+44 (0)7568 129733
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS Local XYZ Tiles

2018-09-20 Thread Nyall Dawson
On Thu, 20 Sep 2018 at 06:31, Justin Robinson  wrote:
>
> Hi Kyle,
>
> It looks like that's not currently possible, it still has an open request in 
> the tracker as well: https://issues.qgis.org/issues/16587
>
> It probably does boil down to lack of status/content-type for file:// 
> locations. A work around seems to be hosting with a web server of some kind 
> (I'm guessing even Python's http module would suffice: "python3 -m 
> http.server" or in python2 "python -m SimpleHTTPServer" and then 
> localhost:8000 by default).

If someone has a build environment available to test this, I think the
fix might be changing the condition in qgswmsprovider.cpp line 3887 to

if ( !contentType.isEmpty() && !contentType.startsWith(
QLatin1String( "image/" ), Qt::CaseInsensitive ) &&
 contentType.compare( QLatin1String(
"application/octet-stream" ), Qt::CaseInsensitive ) != 0 )
{ ...

(i.e. insert the "!contentType.isEmpty()" check)

I've no local xyz tiles available to test this with.

Nyall


>
> Cheers,
> Justin
>
> On Tue, Sep 18, 2018 at 8:43 AM Kyle  wrote:
>>
>> I am struggling to get file urls to work with the QGIS tiles layer. I have 
>> followed the instructions here:
>>
>> https://www.spatialbias.com/2018/02/qgis-3.0-xyz-tile-layers/
>>
>> Under the URL field, I put 
>> "file:///home/kyle/Documents/tiles/{z}/{x}/{y}.png" (without quotes)
>>
>> I also set the min and max zoom levels to 3 and 8 respectively. It is worth 
>> noting that the tile set that I am pointing at is not complete and only 
>> covers North America.
>>
>> My problem is that nothing shows up on the screen after I add the layer. Am 
>> I missing something? Everything works correctly when I point to a online 
>> tile server (i.e openstreetmaps).
>>
>> It appears that I'm not the only one to have this issue:
>> https://gis.stackexchange.com/questions/219118/how-to-use-qgis-tile-server-provider-with-local-tms-folder
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] QGIS Local XYZ Tiles

2018-09-19 Thread Justin Robinson
Hi Kyle,

It looks like that's not currently possible, it still has an open request
in the tracker as well: https://issues.qgis.org/issues/16587

It probably does boil down to lack of status/content-type for file://
locations. A work around seems to be hosting with a web server of some kind
(I'm guessing even Python's http module would suffice: "python3 -m
http.server" or in python2 "python -m SimpleHTTPServer" and then
localhost:8000 by default).

Cheers,
Justin

On Tue, Sep 18, 2018 at 8:43 AM Kyle  wrote:

> I am struggling to get file urls to work with the QGIS tiles layer. I have
> followed the instructions here:
>
> https://www.spatialbias.com/2018/02/qgis-3.0-xyz-tile-layers/
>
> Under the URL field, I put
> "file:///home/kyle/Documents/tiles/{z}/{x}/{y}.png" (without quotes)
>
> I also set the min and max zoom levels to 3 and 8 respectively. It is
> worth noting that the tile set that I am pointing at is not complete and
> only covers North America.
>
> My problem is that nothing shows up on the screen after I add the layer.
> Am I missing something? Everything works correctly when I point to a online
> tile server (i.e openstreetmaps).
>
> It appears that I'm not the only one to have this issue:
>
> https://gis.stackexchange.com/questions/219118/how-to-use-qgis-tile-server-provider-with-local-tms-folder
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] QGIS Local XYZ Tiles

2018-09-18 Thread Kyle
I am struggling to get file urls to work with the QGIS tiles layer. I have
followed the instructions here:

https://www.spatialbias.com/2018/02/qgis-3.0-xyz-tile-layers/

Under the URL field, I put
"file:///home/kyle/Documents/tiles/{z}/{x}/{y}.png" (without quotes)

I also set the min and max zoom levels to 3 and 8 respectively. It is worth
noting that the tile set that I am pointing at is not complete and only
covers North America.

My problem is that nothing shows up on the screen after I add the layer. Am
I missing something? Everything works correctly when I point to a online
tile server (i.e openstreetmaps).

It appears that I'm not the only one to have this issue:
https://gis.stackexchange.com/questions/219118/how-to-use-qgis-tile-server-provider-with-local-tms-folder
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user