[Tilecache] Clue Please - TileCache won't make Polar Tiles for OpenLayers
Scott Chilcote
scottchilcote at yahoo.com
Mon Nov 11 14:00:22 PST 2013
Hello Gery,
Thanks once again for your reply.
I have, through brute force manipulations, gotten TileCache to begin producing usable polar tiles (EPSG:3995) for OpenLayers. The "trick" was to comment out the resolutions line in my tilecache.cfg file.
I don't know why this worked. The resolutions we had are the ones that we used for EPSG:4326.
As soon as I commented out that line and ran tilecache_seed.py with the same parameters, I began getting useful tile images instead of blank ones.
The problem is not completely solved yet, because we need to specify the resolution values for the map layers in OpenLayers. I have no idea what the default resolutions used by TileCache are, although the documentation has some hints. "The resolutions array defaults
to having resolutions which are equal to the bbox divided by
512" whatever that means :-P
But I am much further along than I was! Perhaps this will help someone else.
Scott
--
Scott Chilcote
scottchilcote at yahoo.com
Cary, NC USA
On Monday, November 11, 2013 2:55 PM, Gery . <gamejihou at hotmail.com> wrote:
Hi Scott,
It's funny that doesn't work, it should. I have the same setting but in rhel 5, but never tried a polar projection. Since mapserver works properly, I'd say that either proj is not working (btw, have you copied the EPSG file in /usr/share/proj? if not do it so and copy that path in the mapfile, that works for me but I use rpm, though) or tilecache has a problem with polar projections.
So, you just add the configuration stuff in the .cfg and run the .py file, and that was all, is it right?
Cheers,
Gery
Sent from my i386
On Nov 11, 2013, at 19:32, "Scott Chilcote" <scottchilcote at yahoo.com> wrote:
Hello Gery,
Thanks very much for replying. I am using TileCache 2.11, installed via pip. The host system is RHEL 6.3. I have built Mapserver 6.4 from source with Proj 4.7.
My Mapserver configuration file (gshhs_polar.map) is available on pastebin, if you'd care to look:
http://pastebin.com/69rAdCdz
I am using tilecache_seed.py to create the map tiles, as follows:
tilecache_seed.py gshhspolar 0 3
Just to clarify, the tilecache.cfg I listed previously and this Mapserver map file work effectively with tilecache_seed.py to create the existing EPSG:4326 tile set that we use for OpenLayers.
I took those same two
files and attempted to modify them to generate Arctic Polar Stereographic tiles (EPSG:3995). As you can see from the image I included, the map file appears to have been correctly configured. Mapserver was able to produce a PNG file that shows EPSG:3995 quite well.
So the problem at this point is getting TileCache to create the map tile set. My error is probably very simple, as I do not have much experience with these tools.
Everything I have tried so far produces only blank tiles, or tiles in the color that we designated for "water". If I change the tilecache.cfg projection (srs) back to EPSG:4326, it works fine but the tiles are not polar. If I change to EPSG:3995, they are blank.
Thanks very much for any pointers.
Scott
--
Scott Chilcote
scottchilcote at yahoo.com
Cary, NC USA
On Saturday, November 9, 2013 4:15 AM, Gery . <gamejihou at hotmail.com> wrote:
Hi Scott,
Which tilecache version are you using? I've never tried polar projections, I don't know if that's an issue with specific versions. However I read that proj should help here.
Also, posting the main steps of your procedure and some more settings can help to find what your problem is.
Cheers,
Gery
Sent from my i386
On Nov 9, 2013, at 9:43, "ScottCh" <scottchilcote at yahoo.com> wrote:
Hi
All,
I am attempting to use tilecache.py, GSHHS shapefiles, and Mapserver to
create Arctic polar stereographic tiles for OpenLayers.
My Mapserver map file appears to work. It displays a polar map image for
EPSG:3995 correctly when I create a PNG image on my web browser:
<http://osgeo-org.1560.x6.nabble.com/file/n5088297/maps-r-us.png>
I display this via apache using the URL:
http://localhost/maps/mapserv?MAP=/var/www/maps/gshhs_polar.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=GSHHS_f_L1,GSHHS_f_L2,GSHHS_f_L3,GSHHS_f_L4&STYLES=&BBOX=-6486320.82608643,-6485942.31407885,6486655.95236211,6486510.25174298&SRS=EPSG:3995&WIDTH=800&HEIGHT=800&FORMAT=image/png
Unfortunately this is as far as I have gotten. When I use
*tilecache_seed.py* to create tiles, they are all blank. I have read
everything I can find including dozens of forum postings. Nothing has
helped yet.
This is my tilecache.cfg file:
[gshhspolar]
size=256,256
type=WMSLayer
url=http://localhost/maps/mapserv?MAP=/var/www/maps/gshhs_polar.map
#layers=GSHHS_f_L1,GSHHS_f_L2, GSHHS_f_L3, GSHHS_f_L4,
WDBII_border_f_L1,
WDBII_border_f_L2&STYLES
layers=GSHHS_f_L1,GSHHS_f_L2,GSHHS_f_L3,GSHHS_f_L4,WDBII_border_f_L1,WDBII_border_f_L2
#bbox=-180,60,180,90
#bbox=-6486320.82608643,-6485942.31407885,6486655.95236211,6486510.25174298
#bbox=-20037508.342789244,8399737.8898183592,20037508.342789244,238107693.26496765
#bbox=-0.0000,0.0000,0.0000,3333134.0276
srs=EPSG:3995
#projection= +proj=stere +lat_0=90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0
+ellps=WGS84 +datum=WGS84 +units=m +no_defs
extension=png
description=GSHHS Polar Stereographic Map
extent_type=loose
#maxresolution=0.3515625
resolutions=0.3515625,0.17578125,0.087890625,0.0439453125
#resolutions=0.3515625, 0.17578125, 0.087890625, 0.0439453125,
0.02197265625, 0.010986328125, 0.0054931640625, 0.00274658203125,
0.001373291015625
As you can see many lines are commented out. The bounding box changes and
other guesses are just some of
the things I have tried, in the hours I have
spent attempting to get tiles that are not blank.
The only thing that has worked is when I change the projection back to
EPSG:4326 (WGS 84). My original tile cache for OpenLayers was not polar.
That one worked fine.
Since proj 4's "epsg" file on my system includes a listing for 3995, it
seems to me that I should not have to include a separate line to configure
it in the tilecache.cfg file. I have it in the listing above but it is
commented out. If I uncomment it, it has no effect.
I have not added my Mapserver map file here since it is rather long, but I
can paste it if it will help.
Gracious thanks for any clues or expertise. As you may have guessed I still
have plenty to learn about these tools!
Scott C.
Cary, NC USA
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Clue-Please-TileCache-won-t-make-Polar-Tiles-for-OpenLayers-tp5088297.html
Sent from the TileCache mailing list archive at Nabble.com.
_______________________________________________
Tilecache mailing list
Tilecache at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/tilecache
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/tilecache/attachments/20131111/9a127153/attachment.html>
More information about the Tilecache
mailing list