From eric.lemoine at camptocamp.com Mon Dec 7 12:25:05 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Securing TileCache Message-ID: Hi I recently wrote a tutorial providing the basics for securing TileCache layers with Pylons and repoze.what. It basically involves executing TileCache as a WSGI app within a Pylons controller, and securing access to this controller using Pylons-specific decorators from repoze.what. Just thought I could share this tutorial here on the TileCache mailing list. Cheers, PS: thank you TC developers for providing a WSGI interface, this is great! -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine@camptocamp.com http://www.camptocamp.com From petrus-v at hotmail.fr Wed Dec 9 18:04:38 2009 From: petrus-v at hotmail.fr (petrus-v) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Segmentation fault ERROR when run tilecache_seed.py In-Reply-To: <1252491325469-3609752.post@n2.nabble.com> References: <1252491325469-3609752.post@n2.nabble.com> Message-ID: <1260399878498-4142627.post@n2.nabble.com> Hi all, I'm getting the same error. the install success and I get tile when I visit: http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png then I test a Mapnik layer tilecache.cfg: [basic_mapnik] type=MapnikLayer mapfile=/var/www/wms/data/xml_mapnik/world/world_styles.xml which refer to a simple example from mapnik using borderline world_styles.xml: My Style shape /var/www/wms/data/shp/world/world_borders then I visit: http://example.com/yourdir/tilecache.cgi/1.0.0/basic_mapnik/0/0/0.png And I get error 500: Internal Server Error find in the error.log: [Wed Dec 09 23:41:59 2009] [error] [client 192.168.1.135] Premature end of script headers: tilecache.cgi so I install every things to get TileCache Running Standalone under WSG then I visit: http://hostname:8080/1.0.0/basic/0/0/0.png I get tile and change to my mapnik layer http://hostname:8080/1.0.0/basic_mapnik/0/0/0.png In the console get the "Segmentation fault" and the server is down... I also get the error on seeding tile when I run the command: tilecache_seed.py Is someone have any idea? this is my config: ubuntu server 9.10 (64-bit) tilecache2.10 Alphatran wrote: > > Dear all members of TileCache Board, > > The last time, I configure and run TileCache perfectly. But I'm not lucky > at this time > > When I run the command: tilecache_seed.py mytilecachelayername 0 5 > > It said: "Segmentation fault", no more no less ! > > I have search through the www but this error may be not popular. I hope > you have experienced on this problem > > Please help me! > -- View this message in context: http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4142627.html Sent from the TileCache mailing list archive at Nabble.com. From blake at hailmail.net Wed Dec 9 20:32:32 2009 From: blake at hailmail.net (Dane Springmeyer) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Segmentation fault ERROR when run tilecache_seed.py In-Reply-To: <1260399878498-4142627.post@n2.nabble.com> References: <1252491325469-3609752.post@n2.nabble.com> <1260399878498-4142627.post@n2.nabble.com> Message-ID: <8CC80BCB-4199-4253-AA16-47BDB9476FFA@hailmail.net> Hello Petrus, Short answer: Upgrade to Mapnik trunk, or install mapnik from the apt- repository. Long answer: The Mapnik 0.6.1 release suffers from a shapefile reading bug that only manifests with newer compilers, like those just added to Ubuntu 9.10. We tested on Ubuntu 9.10 beta with no problems but now if you build from source you'll hit this bug. I was able to fix this problem in the Mapnik 0.6.1 package available for Karmic, so try uninstalling your current Mapnik (I assume you installed from source?) and re-installing from packages: That would look like sudo rm /usr/local/lib/libmapnik.dylib sudo rm -rf /usr/local/lib/mapnik/ #careful! and remove the python bindings whose location you can find with: python -c "import mapnik;print mapnik.__file__" Then do: sudo apt-get install python-mapnik Dane On Dec 9, 2009, at 3:04 PM, petrus-v wrote: > > Hi all, > > I'm getting the same error. > > the install success and I get tile when I visit: > http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png > > then I test a Mapnik layer > tilecache.cfg: > [basic_mapnik] > type=MapnikLayer > mapfile=/var/www/wms/data/xml_mapnik/world/world_styles.xml > > which refer to a simple example from mapnik using borderline > world_styles.xml: > > > > > > > > My Style > > shape > name="file">/var/www/wms/data/shp/world/world_borders > > > > > then I visit: > http://example.com/yourdir/tilecache.cgi/1.0.0/basic_mapnik/0/0/0.png > And I get error 500: Internal Server Error > find in the error.log: [Wed Dec 09 23:41:59 2009] [error] [client > 192.168.1.135] Premature end of script headers: tilecache.cgi > > so I install every things to get TileCache Running Standalone under > WSG > then I visit: http://hostname:8080/1.0.0/basic/0/0/0.png I get tile > and change to my mapnik layer > http://hostname:8080/1.0.0/basic_mapnik/0/0/0.png > > In the console get the "Segmentation fault" and the server is down... > I also get the error on seeding tile when I run the command: > tilecache_seed.py > Is someone have any idea? > > this is my config: > ubuntu server 9.10 (64-bit) > tilecache2.10 > > > > > Alphatran wrote: >> >> Dear all members of TileCache Board, >> >> The last time, I configure and run TileCache perfectly. But I'm not >> lucky >> at this time >> >> When I run the command: tilecache_seed.py mytilecachelayername 0 5 >> >> It said: "Segmentation fault", no more no less ! >> >> I have search through the www but this error may be not popular. I >> hope >> you have experienced on this problem >> >> Please help me! >> > > -- > View this message in context: http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4142627.html > Sent from the TileCache mailing list archive at Nabble.com. > _______________________________________________ > Tilecache mailing list > Tilecache@openlayers.org > http://openlayers.org/mailman/listinfo/tilecache From petrus-v at hotmail.fr Sun Dec 13 11:55:09 2009 From: petrus-v at hotmail.fr (petrus-v) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Segmentation fault ERROR when run tilecache_seed.py In-Reply-To: <8CC80BCB-4199-4253-AA16-47BDB9476FFA@hailmail.net> References: <1252491325469-3609752.post@n2.nabble.com> <1260399878498-4142627.post@n2.nabble.com> <8CC80BCB-4199-4253-AA16-47BDB9476FFA@hailmail.net> Message-ID: <1260723309974-4160184.post@n2.nabble.com> Hello Dane, I didn't success to set mapnik, I had already install from the package, so I'll install ubuntu 8.04.3 ? Hardy Heron ? and test it. Thanks. Dane Springmeyer wrote: > > Hello Petrus, > > Short answer: Upgrade to Mapnik trunk, or install mapnik from the apt- > repository. > > Long answer: The Mapnik 0.6.1 release suffers from a shapefile reading > bug that only manifests with newer compilers, like those just added to > Ubuntu 9.10. We tested on Ubuntu 9.10 beta with no problems but now if > you build from source you'll hit this bug. I was able to fix this > problem in the Mapnik 0.6.1 package available for Karmic, so try > uninstalling your current Mapnik (I assume you installed from source?) > and re-installing from packages: > > That would look like > > sudo rm /usr/local/lib/libmapnik.dylib > sudo rm -rf /usr/local/lib/mapnik/ #careful! > and remove the python bindings whose location you can find with: > python -c "import mapnik;print mapnik.__file__" > > Then do: > > sudo apt-get install python-mapnik > > Dane > > > > On Dec 9, 2009, at 3:04 PM, petrus-v wrote: > >> >> Hi all, >> >> I'm getting the same error. >> >> the install success and I get tile when I visit: >> http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png >> >> then I test a Mapnik layer >> tilecache.cfg: >> [basic_mapnik] >> type=MapnikLayer >> mapfile=/var/www/wms/data/xml_mapnik/world/world_styles.xml >> >> which refer to a simple example from mapnik using borderline >> world_styles.xml: >> >> >> >> >> >> >> >> My Style >> >> shape >> > name="file">/var/www/wms/data/shp/world/world_borders >> >> >> >> >> then I visit: >> http://example.com/yourdir/tilecache.cgi/1.0.0/basic_mapnik/0/0/0.png >> And I get error 500: Internal Server Error >> find in the error.log: [Wed Dec 09 23:41:59 2009] [error] [client >> 192.168.1.135] Premature end of script headers: tilecache.cgi >> >> so I install every things to get TileCache Running Standalone under >> WSG >> then I visit: http://hostname:8080/1.0.0/basic/0/0/0.png I get tile >> and change to my mapnik layer >> http://hostname:8080/1.0.0/basic_mapnik/0/0/0.png >> >> In the console get the "Segmentation fault" and the server is down... >> I also get the error on seeding tile when I run the command: >> tilecache_seed.py >> Is someone have any idea? >> >> this is my config: >> ubuntu server 9.10 (64-bit) >> tilecache2.10 >> >> >> >> >> Alphatran wrote: >>> >>> Dear all members of TileCache Board, >>> >>> The last time, I configure and run TileCache perfectly. But I'm not >>> lucky >>> at this time >>> >>> When I run the command: tilecache_seed.py mytilecachelayername 0 5 >>> >>> It said: "Segmentation fault", no more no less ! >>> >>> I have search through the www but this error may be not popular. I >>> hope >>> you have experienced on this problem >>> >>> Please help me! >>> >> >> -- >> View this message in context: >> http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4142627.html >> Sent from the TileCache mailing list archive at Nabble.com. >> _______________________________________________ >> Tilecache mailing list >> Tilecache@openlayers.org >> http://openlayers.org/mailman/listinfo/tilecache > > _______________________________________________ > Tilecache mailing list > Tilecache@openlayers.org > http://openlayers.org/mailman/listinfo/tilecache > > -- View this message in context: http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4160184.html Sent from the TileCache mailing list archive at Nabble.com. From blake at hailmail.net Sun Dec 13 17:27:27 2009 From: blake at hailmail.net (Dane Springmeyer) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Segmentation fault ERROR when run tilecache_seed.py In-Reply-To: <1260723309974-4160184.post@n2.nabble.com> References: <1252491325469-3609752.post@n2.nabble.com> <1260399878498-4142627.post@n2.nabble.com> <8CC80BCB-4199-4253-AA16-47BDB9476FFA@hailmail.net> <1260723309974-4160184.post@n2.nabble.com> Message-ID: Petrus, Actually, I think I know the problem. On Ubuntu Karmic do: sudo apt-get install python-cairo Then let me know if that works (with the python-mapnik package in Karmic). It looks like a bug specifically in the package, as python- cairo is a missing dependency. Dane On Dec 13, 2009, at 8:55 AM, petrus-v wrote: > > Hello Dane, > > I didn't success to set mapnik, I had already install from the > package, so > I'll install ubuntu 8.04.3 ? Hardy Heron ? and test it. > > Thanks. > > > Dane Springmeyer wrote: >> >> Hello Petrus, >> >> Short answer: Upgrade to Mapnik trunk, or install mapnik from the >> apt- >> repository. >> >> Long answer: The Mapnik 0.6.1 release suffers from a shapefile >> reading >> bug that only manifests with newer compilers, like those just added >> to >> Ubuntu 9.10. We tested on Ubuntu 9.10 beta with no problems but now >> if >> you build from source you'll hit this bug. I was able to fix this >> problem in the Mapnik 0.6.1 package available for Karmic, so try >> uninstalling your current Mapnik (I assume you installed from >> source?) >> and re-installing from packages: >> >> That would look like >> >> sudo rm /usr/local/lib/libmapnik.dylib >> sudo rm -rf /usr/local/lib/mapnik/ #careful! >> and remove the python bindings whose location you can find with: >> python -c "import mapnik;print mapnik.__file__" >> >> Then do: >> >> sudo apt-get install python-mapnik >> >> Dane >> >> >> >> On Dec 9, 2009, at 3:04 PM, petrus-v wrote: >> >>> >>> Hi all, >>> >>> I'm getting the same error. >>> >>> the install success and I get tile when I visit: >>> http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png >>> >>> then I test a Mapnik layer >>> tilecache.cfg: >>> [basic_mapnik] >>> type=MapnikLayer >>> mapfile=/var/www/wms/data/xml_mapnik/world/world_styles.xml >>> >>> which refer to a simple example from mapnik using borderline >>> world_styles.xml: >>> >>> >>> >>> >>> >>> >>> >>> My Style >>> >>> shape >>> >> name="file">/var/www/wms/data/shp/world/world_borders >>> >>> >>> >>> >>> then I visit: >>> http://example.com/yourdir/tilecache.cgi/1.0.0/basic_mapnik/ >>> 0/0/0.png >>> And I get error 500: Internal Server Error >>> find in the error.log: [Wed Dec 09 23:41:59 2009] [error] [client >>> 192.168.1.135] Premature end of script headers: tilecache.cgi >>> >>> so I install every things to get TileCache Running Standalone under >>> WSG >>> then I visit: http://hostname:8080/1.0.0/basic/0/0/0.png I get tile >>> and change to my mapnik layer >>> http://hostname:8080/1.0.0/basic_mapnik/0/0/0.png >>> >>> In the console get the "Segmentation fault" and the server is >>> down... >>> I also get the error on seeding tile when I run the command: >>> tilecache_seed.py >>> Is someone have any idea? >>> >>> this is my config: >>> ubuntu server 9.10 (64-bit) >>> tilecache2.10 >>> >>> >>> >>> >>> Alphatran wrote: >>>> >>>> Dear all members of TileCache Board, >>>> >>>> The last time, I configure and run TileCache perfectly. But I'm not >>>> lucky >>>> at this time >>>> >>>> When I run the command: tilecache_seed.py mytilecachelayername 0 5 >>>> >>>> It said: "Segmentation fault", no more no less ! >>>> >>>> I have search through the www but this error may be not popular. I >>>> hope >>>> you have experienced on this problem >>>> >>>> Please help me! >>>> >>> >>> -- >>> View this message in context: >>> http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4142627.html >>> Sent from the TileCache mailing list archive at Nabble.com. >>> _______________________________________________ >>> Tilecache mailing list >>> Tilecache@openlayers.org >>> http://openlayers.org/mailman/listinfo/tilecache >> >> _______________________________________________ >> Tilecache mailing list >> Tilecache@openlayers.org >> http://openlayers.org/mailman/listinfo/tilecache >> >> > > -- > View this message in context: http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4160184.html > Sent from the TileCache mailing list archive at Nabble.com. > _______________________________________________ > Tilecache mailing list > Tilecache@openlayers.org > http://openlayers.org/mailman/listinfo/tilecache From scottpez at hotmail.com Mon Dec 14 08:15:11 2009 From: scottpez at hotmail.com (Scott Pezanowski) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] tilecache layer in arcgis server javascript api Message-ID: Hi, I am wondering if anyone has been able to get a custom tile cached layer from TileCache to display correctly in the ArcGIS server javascript api? Or can someone direct me on the proper configuration. This page describes creating a custom tiled layer in the api: http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_custom_tiled.html It seems I need to add the scale and resolutions of my zoom levels. However, I am having difficulty doing this. This is what my tileinfo looks like: this.tileInfo = new esri.layers.TileInfo({ "rows" : 512, "cols" : 512, "dpi" : 72, "format" : "JPEG", "compressionQuality" : 0, "origin" : { "x" : -180, "y" : 90 }, "spatialReference" : { "wkid" : 4326 }, "lods" : [ {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416}, {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000}, {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000}, {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500} ] }); I used this link to compute my resolutions by hand: http://code.google.com/p/xenia/wiki/TileCache I actually do seem to be getting back tiles; However, all of them are outside the range of my data and I simply get white tiles. My data bounding box is -77.92,-40.75,-77.79,40.85. My tile urls look something like this /0/1216/1380.jpeg when I think they should look more like this /0/0/1.jpeg Thanks in advance for any help on what I may be doing wrong. Scott ********************************************* Scott Pezanowski email: scottpez@hotmail.com ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20091214/965539c3/attachment.html From petrus-v at hotmail.fr Mon Dec 14 09:11:32 2009 From: petrus-v at hotmail.fr (petrus-v) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Segmentation fault ERROR when run tilecache_seed.py In-Reply-To: References: <1252491325469-3609752.post@n2.nabble.com> <1260399878498-4142627.post@n2.nabble.com> <8CC80BCB-4199-4253-AA16-47BDB9476FFA@hailmail.net> <1260723309974-4160184.post@n2.nabble.com> Message-ID: <1260799892764-4164282.post@n2.nabble.com> Dane, I do a quick test and it's working now. in fact python-cairo was missing. Thank you very much, it's great. Pierre Dane Springmeyer wrote: > > Petrus, > > Actually, I think I know the problem. > > On Ubuntu Karmic do: > > sudo apt-get install python-cairo > > Then let me know if that works (with the python-mapnik package in > Karmic). It looks like a bug specifically in the package, as python- > cairo is a missing dependency. > > Dane > > > On Dec 13, 2009, at 8:55 AM, petrus-v wrote: > >> >> Hello Dane, >> >> I didn't success to set mapnik, I had already install from the >> package, so >> I'll install ubuntu 8.04.3 ? Hardy Heron ? and test it. >> >> Thanks. >> >> >> Dane Springmeyer wrote: >>> >>> Hello Petrus, >>> >>> Short answer: Upgrade to Mapnik trunk, or install mapnik from the >>> apt- >>> repository. >>> >>> Long answer: The Mapnik 0.6.1 release suffers from a shapefile >>> reading >>> bug that only manifests with newer compilers, like those just added >>> to >>> Ubuntu 9.10. We tested on Ubuntu 9.10 beta with no problems but now >>> if >>> you build from source you'll hit this bug. I was able to fix this >>> problem in the Mapnik 0.6.1 package available for Karmic, so try >>> uninstalling your current Mapnik (I assume you installed from >>> source?) >>> and re-installing from packages: >>> >>> That would look like >>> >>> sudo rm /usr/local/lib/libmapnik.dylib >>> sudo rm -rf /usr/local/lib/mapnik/ #careful! >>> and remove the python bindings whose location you can find with: >>> python -c "import mapnik;print mapnik.__file__" >>> >>> Then do: >>> >>> sudo apt-get install python-mapnik >>> >>> Dane >>> >>> >>> >>> On Dec 9, 2009, at 3:04 PM, petrus-v wrote: >>> >>>> >>>> Hi all, >>>> >>>> I'm getting the same error. >>>> >>>> the install success and I get tile when I visit: >>>> http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png >>>> >>>> then I test a Mapnik layer >>>> tilecache.cfg: >>>> [basic_mapnik] >>>> type=MapnikLayer >>>> mapfile=/var/www/wms/data/xml_mapnik/world/world_styles.xml >>>> >>>> which refer to a simple example from mapnik using borderline >>>> world_styles.xml: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> My Style >>>> >>>> shape >>>> >>> name="file">/var/www/wms/data/shp/world/world_borders >>>> >>>> >>>> >>>> >>>> then I visit: >>>> http://example.com/yourdir/tilecache.cgi/1.0.0/basic_mapnik/ >>>> 0/0/0.png >>>> And I get error 500: Internal Server Error >>>> find in the error.log: [Wed Dec 09 23:41:59 2009] [error] [client >>>> 192.168.1.135] Premature end of script headers: tilecache.cgi >>>> >>>> so I install every things to get TileCache Running Standalone under >>>> WSG >>>> then I visit: http://hostname:8080/1.0.0/basic/0/0/0.png I get tile >>>> and change to my mapnik layer >>>> http://hostname:8080/1.0.0/basic_mapnik/0/0/0.png >>>> >>>> In the console get the "Segmentation fault" and the server is >>>> down... >>>> I also get the error on seeding tile when I run the command: >>>> tilecache_seed.py >>>> Is someone have any idea? >>>> >>>> this is my config: >>>> ubuntu server 9.10 (64-bit) >>>> tilecache2.10 >>>> >>>> >>>> >>>> >>>> Alphatran wrote: >>>>> >>>>> Dear all members of TileCache Board, >>>>> >>>>> The last time, I configure and run TileCache perfectly. But I'm not >>>>> lucky >>>>> at this time >>>>> >>>>> When I run the command: tilecache_seed.py mytilecachelayername 0 5 >>>>> >>>>> It said: "Segmentation fault", no more no less ! >>>>> >>>>> I have search through the www but this error may be not popular. I >>>>> hope >>>>> you have experienced on this problem >>>>> >>>>> Please help me! >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4142627.html >>>> Sent from the TileCache mailing list archive at Nabble.com. >>>> _______________________________________________ >>>> Tilecache mailing list >>>> Tilecache@openlayers.org >>>> http://openlayers.org/mailman/listinfo/tilecache >>> >>> _______________________________________________ >>> Tilecache mailing list >>> Tilecache@openlayers.org >>> http://openlayers.org/mailman/listinfo/tilecache >>> >>> >> >> -- >> View this message in context: >> http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4160184.html >> Sent from the TileCache mailing list archive at Nabble.com. >> _______________________________________________ >> Tilecache mailing list >> Tilecache@openlayers.org >> http://openlayers.org/mailman/listinfo/tilecache > > _______________________________________________ > Tilecache mailing list > Tilecache@openlayers.org > http://openlayers.org/mailman/listinfo/tilecache > > -- View this message in context: http://n2.nabble.com/Segmentation-fault-ERROR-when-run-tilecache-seed-py-tp3609752p4164282.html Sent from the TileCache mailing list archive at Nabble.com. From crschmidt at metacarta.com Mon Dec 14 10:50:05 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] tilecache layer in arcgis server javascript api In-Reply-To: References: Message-ID: <20091214155005.GD5224@metacarta.com> On Mon, Dec 14, 2009 at 08:15:11AM -0500, Scott Pezanowski wrote: > > Hi, > I am wondering if anyone has been able to get a custom tile cached layer from TileCache to display correctly in the ArcGIS server javascript api? Or can someone direct me on the proper configuration. This page describes creating a custom tiled layer in the api: > http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_custom_tiled.html > It seems I need to add the scale and resolutions of my zoom levels. However, I am having difficulty doing this. > > This is what my tileinfo looks like: > > this.tileInfo = new esri.layers.TileInfo({ "rows" : 512, "cols" : 512, "dpi" : 72, "format" : "JPEG", "compressionQuality" : 0, "origin" : { "x" : -180, "y" : 90 }, "spatialReference" : { "wkid" : 4326 }, "lods" : [ {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416}, {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000}, {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000}, {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500} ] }); > > I used this link to compute my resolutions by hand: > http://code.google.com/p/xenia/wiki/TileCache > I actually do seem to be getting back tiles; However, all of them are outside the range of my data and I simply get white tiles. My data bounding box is -77.92,-40.75,-77.79,40.85. > My tile urls look something like this /0/1216/1380.jpeg when I think they should look more like this /0/0/1.jpeg Not entirely sure why you think the tile URLs should look like 0/0/1.jpg when you've given your origin as -180, -90. Also, you didn't include your tilecache config. Can you include your tilecache config, and explain why you think the origin should be what it is? -- Chris > Thanks in advance for any help on what I may be doing wrong. > Scott > > > ********************************************* Scott Pezanowski > > > email: scottpez@hotmail.com > ********************************************* > > > _______________________________________________ > Tilecache mailing list > Tilecache@openlayers.org > http://openlayers.org/mailman/listinfo/tilecache -- Christopher Schmidt MetaCarta From scottpez at hotmail.com Mon Dec 14 11:50:51 2009 From: scottpez at hotmail.com (Scott Pezanowski) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] tilecache layer in arcgis server javascript api In-Reply-To: <20091214155005.GD5224@metacarta.com> References: , <20091214155005.GD5224@metacarta.com> Message-ID: Chris, Thank you very much for your reply. Your message helped me get much closer to getting it working (I think). First, I had an error in my bbox where I had a negative latitude value for the bottom instead of a positive 40.75. I adjusted my origin to reflect the left/top of my tile data bbox -77.92/40.85 (instead of the world). I also adjusted the rows and cols parameters to a value of 256. The last change I made was to adjust my getTileUrl function to match the TMS scheme for url's {z}/{x}/{y}.jpeg I am now getting tiles back that show my data. The only issue now is that the tiles do not seem to match up on my map. More specifically, some of the rows seem mix-matched. Do you have any ideas on why that may be? Thanks again,Scott Here is my tilecache layer config: [centreimagerygeogarc] type=WMSLayer url={myurl} extension=jpeg layers={mylayer} bbox=-77.92,40.75,-77.79,40.85 resolutions=0.000144444444444444444,0.000031747816880420907984514989617448,0.000015873908440210453992257494808724,0.00000011023547527923926383512149172725 srs=EPSG:4326 extent_type=loose and my code: this.tileInfo = new esri.layers.TileInfo({ "rows" : 256, "cols" : 256, "dpi" : 72, "format" : "JPEG", "compressionQuality" : 0, "origin" : { "x" : -77.92, "y" : 40.85 }, "spatialReference" : { "wkid" : 4326 }, "lods" : [ {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416}, {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000}, {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000}, {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500} ] }); this.loaded = true; this.onLoad(this); }, getTileUrl: function(level, row, col) { return {myserverurl} + level + "/" + col.toString() + "/" + row.toString() + "." + "jpeg"; } ********************************************* Scott Pezanowski email: scottpez@hotmail.com ********************************************* > Date: Mon, 14 Dec 2009 10:50:05 -0500 > To: scottpez@hotmail.com > CC: tilecache@openlayers.org > Subject: Re: [Tilecache] tilecache layer in arcgis server javascript api > From: crschmidt@metacarta.com > > On Mon, Dec 14, 2009 at 08:15:11AM -0500, Scott Pezanowski wrote: > > > > Hi, > > I am wondering if anyone has been able to get a custom tile cached layer from TileCache to display correctly in the ArcGIS server javascript api? Or can someone direct me on the proper configuration. This page describes creating a custom tiled layer in the api: > > http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_custom_tiled.html > > It seems I need to add the scale and resolutions of my zoom levels. However, I am having difficulty doing this. > > > > This is what my tileinfo looks like: > > > > this.tileInfo = new esri.layers.TileInfo({ "rows" : 512, "cols" : 512, "dpi" : 72, "format" : "JPEG", "compressionQuality" : 0, "origin" : { "x" : -180, "y" : 90 }, "spatialReference" : { "wkid" : 4326 }, "lods" : [ {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416}, {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000}, {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000}, {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500} ] }); > > > > I used this link to compute my resolutions by hand: > > http://code.google.com/p/xenia/wiki/TileCache > > I actually do seem to be getting back tiles; However, all of them are outside the range of my data and I simply get white tiles. My data bounding box is -77.92,-40.75,-77.79,40.85. > > My tile urls look something like this /0/1216/1380.jpeg when I think they should look more like this /0/0/1.jpeg > > Not entirely sure why you think the tile URLs should look like 0/0/1.jpg when > you've given your origin as -180, -90. Also, you didn't include your tilecache > config. Can you include your tilecache config, and explain why you > think the origin should be what it is? > > -- Chris > > > Thanks in advance for any help on what I may be doing wrong. > > Scott > > > > > > ********************************************* Scott Pezanowski > > > > > > email: scottpez@hotmail.com > > ********************************************* > > > > > > _______________________________________________ > > Tilecache mailing list > > Tilecache@openlayers.org > > http://openlayers.org/mailman/listinfo/tilecache > > > -- > Christopher Schmidt > MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20091214/a1b1ec4f/attachment.html From scottpez at hotmail.com Mon Dec 14 13:14:27 2009 From: scottpez at hotmail.com (Scott Pezanowski) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] tilecache layer in arcgis server javascript api In-Reply-To: <20091214155005.GD5224@metacarta.com> References: , <20091214155005.GD5224@metacarta.com> Message-ID: Chris, I think I discovered my last issue. The ArcGIS api seems to be putting the rows in reverse order. Either top-down or bottom up, depending on the reverse of TMS. For my initial zoom level, I subtracted the row number from the total number of rows (3 rows), and my map looks good. Is there a way to find the number of rows for a given scale level? Thanks,Scott ********************************************* Scott Pezanowski email: scottpez@hotmail.com ********************************************* > Date: Mon, 14 Dec 2009 10:50:05 -0500 > To: scottpez@hotmail.com > CC: tilecache@openlayers.org > Subject: Re: [Tilecache] tilecache layer in arcgis server javascript api > From: crschmidt@metacarta.com > > On Mon, Dec 14, 2009 at 08:15:11AM -0500, Scott Pezanowski wrote: > > > > Hi, > > I am wondering if anyone has been able to get a custom tile cached layer from TileCache to display correctly in the ArcGIS server javascript api? Or can someone direct me on the proper configuration. This page describes creating a custom tiled layer in the api: > > http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_custom_tiled.html > > It seems I need to add the scale and resolutions of my zoom levels. However, I am having difficulty doing this. > > > > This is what my tileinfo looks like: > > > > this.tileInfo = new esri.layers.TileInfo({ "rows" : 512, "cols" : 512, "dpi" : 72, "format" : "JPEG", "compressionQuality" : 0, "origin" : { "x" : -180, "y" : 90 }, "spatialReference" : { "wkid" : 4326 }, "lods" : [ {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416}, {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000}, {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000}, {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500} ] }); > > > > I used this link to compute my resolutions by hand: > > http://code.google.com/p/xenia/wiki/TileCache > > I actually do seem to be getting back tiles; However, all of them are outside the range of my data and I simply get white tiles. My data bounding box is -77.92,-40.75,-77.79,40.85. > > My tile urls look something like this /0/1216/1380.jpeg when I think they should look more like this /0/0/1.jpeg > > Not entirely sure why you think the tile URLs should look like 0/0/1.jpg when > you've given your origin as -180, -90. Also, you didn't include your tilecache > config. Can you include your tilecache config, and explain why you > think the origin should be what it is? > > -- Chris > > > Thanks in advance for any help on what I may be doing wrong. > > Scott > > > > > > ********************************************* Scott Pezanowski > > > > > > email: scottpez@hotmail.com > > ********************************************* > > > > > > _______________________________________________ > > Tilecache mailing list > > Tilecache@openlayers.org > > http://openlayers.org/mailman/listinfo/tilecache > > > -- > Christopher Schmidt > MetaCarta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20091214/5c30608b/attachment.html From alex.rodier at yahoo.es Tue Dec 22 03:11:46 2009 From: alex.rodier at yahoo.es (Alexandre Rodier) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] Double image shown in openlayers map Message-ID: <604258.84690.qm@web28412.mail.ukl.yahoo.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: tilecache.cfg Type: application/octet-stream Size: 1098 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/tilecache/attachments/20091222/05b6c3f0/tilecache.obj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20091222/05b6c3f0/es0000173.html -------------- next part -------------- A non-text attachment was scrubbed... Name: tilecache.cfg Type: application/octet-stream Size: 1098 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/tilecache/attachments/20091222/05b6c3f0/tilecache-0001.obj From jacobmarble at gmail.com Tue Dec 22 18:34:41 2009 From: jacobmarble at gmail.com (Jacob Marble) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] traceback error Message-ID: <5161afcd0912221534w3c6bc8cfhfc7dd2fb3dcf09b2@mail.gmail.com> Hello, I'm just starting to use tilecache. I think I have found a bug, which I would like to discuss. I have verified that this exists in 2.10 and current SVN (397). My environment is Ubuntu 9.10 with repository-packaged python-mapscript 5.4.2 and Python 2.6.4. I'm running tilecache this way: ./tilecache_http_server.py -t One in 10 or 20 tiles causes the following to go to stdout, and I don't see any consistency (might be the threads): Traceback (most recent call last): File "/usr/lib/python2.6/wsgiref/handlers.py", line 93, in run self.result = application(self.environ, self.start_response) File "/home/webmap/tilecache-2.10/TileCache/Service.py", line 374, in wsgiApp return wsgiHandler(environ, start_response, theService) File "/home/webmap/tilecache-2.10/TileCache/Service.py", line 307, in wsgiHandler "".join(traceback.format_tb(sys.exc_traceback)))] AttributeError: 'module' object has no attribute 'exc_traceback' In TileCache/Service.py, there are references to sys.exc_traceback, which has been deprecated since Python 1.5 (http://docs.python.org/library/sys.html#sys.exc_traceback). Following the link should make this clear. It seems that sys.exc_traceback and friends were *removed* in about Python 2.6, or perhaps just in Ubuntu 9.10. Either way, I think this is a good way to fix the problem in a backwards-compatible way. Jacob -------------- next part -------------- A non-text attachment was scrubbed... Name: traceback.patch Type: text/x-patch Size: 1548 bytes Desc: not available Url : http://lists.osgeo.org/pipermail/tilecache/attachments/20091222/4b5bebfe/traceback.bin From jacobmarble at gmail.com Wed Dec 30 20:09:30 2009 From: jacobmarble at gmail.com (Jacob Marble) Date: Tue Apr 20 11:23:30 2010 Subject: [Tilecache] performance ideas Message-ID: <5161afcd0912301709y6d3a3420peb926ccf46a54af4@mail.gmail.com> I have a few thoughts regarding performance. I'm interested in any input that experienced users/developers can share. My environment is Ubuntu 9.10 1) I notice that when TC renders a metatile, it immediately crops and saves all subtiles within the metatile. Has anyone considered the idea of caching the metatile, and just cropping the requested subtile? I think this could improve user experience when the metasize is something very large (I'm shooting for 20x100 or so). 2) I notice that when a metatile is rendered in mapserver (I'm using the MS layer type), the function getBytes can take a long time when the tilesize is large. Is there a faster way to get the image from mapserver? I have tried changing the mapserver source code from Z_BEST_COMPRESSION to Z_NO_COMPRESSION, but there is no noticeable difference. My imagination tells me that the "bytes" are being organized into PNG format; is there a way to get raw bytes from MS? 3) The (sub)tiles returned from TC are larger in terms of bytes than I think they ought to be. For example, an empty tile is over 3000 bytes from TC, while MS's empty tiles are well under 1000 bytes. It looks like PIL uses zlib, which should be sufficient. 4) Has anyone considered soft-linking empty tiles to all point to one tile? This would save space on the cache. In Windows, an empty file (0 bytes) could mean "transparent tile". Another alternative that would work for any Cache backend would be to manually create the smallest possible 256x256 tile, and use that in place of the larger PIL empty tiles. Anyhow, these are some things that I will continue to investigate on my own, but please share your experience with these topics if you can. Thanks, Jacob