[MapProxy] extension-less tiles as source?
Vish Uma
viswaug at yahoo.com
Fri Feb 12 19:42:54 PST 2016
Try the exiftool like mentioned here http://unix.stackexchange.com/a/204545 to rename the files generated with maptiler. Checkout the batch processing options with exiftool to make it faster else depending on your cache size it could be very time consuming.
Thank you,
Vish
On February 12, 2016 3:00:02 PM EST, mapproxy-request at lists.osgeo.org wrote:
>Send MapProxy mailing list submissions to
> mapproxy at lists.osgeo.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.osgeo.org/mailman/listinfo/mapproxy
>or, via email, send a message with subject or body 'help' to
> mapproxy-request at lists.osgeo.org
>
>You can reach the person managing the list at
> mapproxy-owner at lists.osgeo.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of MapProxy digest..."
>
>
>Today's Topics:
>
> 1. Re: extension-less tiles as source? (Oliver Tonnhofer)
> 2. Re: extension-less tiles as source? (Pestereva, Anna)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 12 Feb 2016 13:02:42 +0100
>From: Oliver Tonnhofer <olt at omniscale.de>
>To: "Pestereva, Anna" <apestereva at aerialservicesinc.com>
>Cc: MapProxy at lists.osgeo.org
>Subject: Re: [MapProxy] extension-less tiles as source?
>Message-ID: <D3E5A6D6-B707-468D-83BC-2CBFDC0DCE8E at omniscale.de>
>Content-Type: text/plain; charset=utf-8
>
>Thanks for the configuration.
>
>Python tries to guess the content-type for file:// URLs. It returns
>image/jpeg for .jpg files, but text/plain for files without any file
>suffix.
>But MapProxy refuses to load non-image responses. You do not see
>anything in the demo because of your on_error configuration.
>
>
>Can you tell MapTiler to use .png or .jpeg as the extension? It doesn’t
>matter for MapProxy if a .png actually contains JPEG data.
>
>
>Regards,
>Oliver
>
>--
>Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
>OpenStreetMap WMS and tile services | http://maps.omniscale.com
>
>
>
>
>> On 10.02.2016, at 22:10, Pestereva, Anna
><apestereva at aerialservicesinc.com> wrote:
>>
>> Oliver,
>>
>> thank you, your reply is encouraging, but it doesn't seem to work for
>me.. No tiles are returned when viewing in Demo app, and no cache is
>generated.
>>
>> I checked the source-requests.log - and saw that the extensionless
>files were being requested from the supplied source, and they even got
>returned (there is size value) - but that still didn't result in
>visible layer.. Here is a snippet from source-requests.log:
>>
>> [2016-02-10 14:45:13,039] GET file:///path/to/hybrid/13/1989/5180 -
>2.2 0
>> [2016-02-10 14:45:13,080] GET file:///path/to/hybrid/13/1990/5180 - -
>0
>> [2016-02-10 14:45:13,104] GET file:///path/to/hybrid/13/1989/5179 -
>5.3 0
>> [2016-02-10 14:45:13,190] GET file:///path/to/hybrid/13/1990/5179 - -
>0
>>
>>
>> When I substituted the source URL for a jpg tileset copy - whether
>also local, or hosted on another server - I was able to see the layer
>properly in the Demo app. So, I'm assuming the rest of the config is
>correct. Here is the snippet of my config:
>>
>>
>> layers:
>> - name: asi_hybrid_test
>> title: Test layer from extensionless hybrid source
>> sources: [hybrid_test_cache]
>>
>> caches:
>> hybrid_test_cache:
>> grids: [webmercator]
>> sources: [hybrid_test_tms]
>>
>> parts:
>> on_error: &onerror
>> other:
>> response: transparent
>> cache: false
>>
>> sources:
>> hybrid_test_tms:
>> url: file:///path/to/hybrid/%(z)s/%(x)s/%(y)s
>> # url:
>http://maps.asi-gis.com/webmaps/tiles/gndvi3/%(z)s/%(x)s/%(y)s.jpg
>> # url: file:///path/to/gndvi3/%(z)s/%(x)s/%(y)s.jpg
>> type: tile
>> coverage:
>> bbox: [-92.6, 42.9, -92.5, 43.0]
>> bbox_srs: 'EPSG:4326'
>> transparent: true
>> on_error: *onerror
>>
>>
>> My only next thought is - should I be configuring a custom grid?
>>
>> Side question - do you happen to know how common is such use of tiles
>with no format? This is first time I run into it, and couldn't find
>support for this approach in the WMTS standard.
>>
>> Would appreciate any suggestions. Thank you!
>>
>>
>> On Tue, Feb 9, 2016 at 8:38 AM, Oliver Tonnhofer <olt at omniscale.de>
>wrote:
>> Hi,
>>
>> that should work.
>>
>> Can you provide a full example?
>>
>>
>> Regards,
>> Oliver
>>
>> --
>> Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
>> OpenStreetMap WMS and tile services |
>http://maps.omniscale.com
>>
>>
>>
>>
>> > On 06.02.2016, at 00:41, Pestereva, Anna
><apestereva at aerialservicesinc.com> wrote:
>> >
>> > Hello all,
>> >
>> > has anyone had experience with using tiles without any extensions
>as a Mapproxy source?
>> >
>> > So far my tests were not successful, I tried configuring these URLs
>in my source with no luck:
>> > url: file:///path/to/my/tiles/%(z)s/%(x)s/%(y)s
>> > url: file:///path/to/my/tiles/%(z)s/%(x)s/%(y)s.
>> > There were no errors when trying to view my layer, but no imagery
>was served either, and no cache got generated.
>> >
>> > In our case, we need to use hybrid tile format (jpg+png) and
>Maptiler started producing hybrid tiles with no extensions as of
>version 0.6.3. Leaflet does show such tiles if configuring directly,
>like so
>> > L.tileLayer('{z}/{x}/{y}', options).addTo(map);
>> > However we are looking to use these tiles in Mapproxy.
>> >
>> > Thank you!
>> > --
>> > Anna Pestereva, GISP | Application Developer & Cartographer
>> > Aerial Services, Inc. (ASI)
>> > APestereva at AerialServicesInc.com | LinkedIn
>> > www.AerialServicesInc.com | Photo{blog}metry
>> > _______________________________________________
>> > MapProxy mailing list
>> > MapProxy at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/mapproxy
>>
>>
>>
>>
>> --
>> Anna Pestereva, GISP | Application Developer & Cartographer
>> Aerial Services, Inc. (ASI)
>> Office: (319) 277-0436 | Direct: (319) 553-0261 | Mobile: (319)
>830-6340 | Fax: (866) 800-4799
>> 6315 Chancellor Drive | Cedar Falls, Iowa 50613
>> APestereva at AerialServicesInc.com | LinkedIn
>> www.AerialServicesInc.com | Photo{blog}metry
>
>
>
>------------------------------
>
>Message: 2
>Date: Fri, 12 Feb 2016 10:28:55 -0600
>From: "Pestereva, Anna" <apestereva at aerialservicesinc.com>
>To: Oliver Tonnhofer <olt at omniscale.de>
>Cc: MapProxy at lists.osgeo.org
>Subject: Re: [MapProxy] extension-less tiles as source?
>Message-ID:
> <CAP=qBXzM=cBABSNwyM_JzSQ7AkigpTvczJfzgLDvccDaWfkQng at mail.gmail.com>
>Content-Type: text/plain; charset="utf-8"
>
>Oliver,
>
>I really appreciate the explanation! Unfortunately enforcing an
>extension
>is not an option Maptiler offers at the time, and not much I can do
>besides
>reporting issue, since it's not open source..
>Do you think it is worth for me to try to overwrite the text/plain
>interpretation of files without suffix? Or is it not in Mapproxy code,
>but
>rather a language/system default?
>
>Thank you very much again!
>Anna
>
>On Fri, Feb 12, 2016 at 6:02 AM, Oliver Tonnhofer <olt at omniscale.de>
>wrote:
>
>> Thanks for the configuration.
>>
>> Python tries to guess the content-type for file:// URLs. It returns
>> image/jpeg for .jpg files, but text/plain for files without any file
>suffix.
>> But MapProxy refuses to load non-image responses. You do not see
>anything
>> in the demo because of your on_error configuration.
>>
>>
>> Can you tell MapTiler to use .png or .jpeg as the extension? It
>doesn’t
>> matter for MapProxy if a .png actually contains JPEG data.
>>
>>
>> Regards,
>> Oliver
>>
>> --
>> Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
>> OpenStreetMap WMS and tile services |
>http://maps.omniscale.com
>>
>>
>>
>>
>> > On 10.02.2016, at 22:10, Pestereva, Anna <
>> apestereva at aerialservicesinc.com> wrote:
>> >
>> > Oliver,
>> >
>> > thank you, your reply is encouraging, but it doesn't seem to work
>for
>> me.. No tiles are returned when viewing in Demo app, and no cache is
>> generated.
>> >
>> > I checked the source-requests.log - and saw that the extensionless
>files
>> were being requested from the supplied source, and they even got
>returned
>> (there is size value) - but that still didn't result in visible
>layer..
>> Here is a snippet from source-requests.log:
>> >
>> > [2016-02-10 14:45:13,039] GET file:///path/to/hybrid/13/1989/5180 -
>2.2
>> 0
>> > [2016-02-10 14:45:13,080] GET file:///path/to/hybrid/13/1990/5180 -
>- 0
>> > [2016-02-10 14:45:13,104] GET file:///path/to/hybrid/13/1989/5179 -
>5.3 0
>> > [2016-02-10 14:45:13,190] GET file:///path/to/hybrid/13/1990/5179 -
>- 0
>> >
>> >
>> > When I substituted the source URL for a jpg tileset copy - whether
>also
>> local, or hosted on another server - I was able to see the layer
>properly
>> in the Demo app. So, I'm assuming the rest of the config is correct.
>Here
>> is the snippet of my config:
>> >
>> >
>> > layers:
>> > - name: asi_hybrid_test
>> > title: Test layer from extensionless hybrid source
>> > sources: [hybrid_test_cache]
>> >
>> > caches:
>> > hybrid_test_cache:
>> > grids: [webmercator]
>> > sources: [hybrid_test_tms]
>> >
>> > parts:
>> > on_error: &onerror
>> > other:
>> > response: transparent
>> > cache: false
>> >
>> > sources:
>> > hybrid_test_tms:
>> > url: file:///path/to/hybrid/%(z)s/%(x)s/%(y)s
>> > # url:
>> http://maps.asi-gis.com/webmaps/tiles/gndvi3/%(z)s/%(x)s/%(y)s.jpg
>> > # url: file:///path/to/gndvi3/%(z)s/%(x)s/%(y)s.jpg
>> > type: tile
>> > coverage:
>> > bbox: [-92.6, 42.9, -92.5, 43.0]
>> > bbox_srs: 'EPSG:4326'
>> > transparent: true
>> > on_error: *onerror
>> >
>> >
>> > My only next thought is - should I be configuring a custom grid?
>> >
>> > Side question - do you happen to know how common is such use of
>tiles
>> with no format? This is first time I run into it, and couldn't find
>support
>> for this approach in the WMTS standard.
>> >
>> > Would appreciate any suggestions. Thank you!
>> >
>> >
>> > On Tue, Feb 9, 2016 at 8:38 AM, Oliver Tonnhofer <olt at omniscale.de>
>> wrote:
>> > Hi,
>> >
>> > that should work.
>> >
>> > Can you provide a full example?
>> >
>> >
>> > Regards,
>> > Oliver
>> >
>> > --
>> > Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
>> > OpenStreetMap WMS and tile services |
>http://maps.omniscale.com
>> >
>> >
>> >
>> >
>> > > On 06.02.2016, at 00:41, Pestereva, Anna <
>> apestereva at aerialservicesinc.com> wrote:
>> > >
>> > > Hello all,
>> > >
>> > > has anyone had experience with using tiles without any extensions
>as a
>> Mapproxy source?
>> > >
>> > > So far my tests were not successful, I tried configuring these
>URLs in
>> my source with no luck:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20160212/4705dede/attachment.html>
More information about the MapProxy
mailing list