Re: [mapserver-users] Re: WMS and tiles cutting off
Thank you for the response David. I have optimized the query all I can. I have optimized the query to the point that even with all categories selected, the query has a run time of 52 ms. I can only assume that the issue lies with the generation of the images. I will try to run it without the IN part of the query, but I can't imagine that it'st he problem. I think the problem is that there are a large number of symbols that need to be generated, and it's taking mapserver a long time to load them in. Also, yes I have indexes on all columns that I am calling in, and yes, they are all using the same SRS. I am still trying a few more things, but I don't think it's the database query that's causing the problem. On Fri, Apr 30, 2010 at 9:37 AM, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Adam, It sounds like you have boiled the issue down to too much of a time lag between the time the query is executed and the image appears in the client. Is it taking a long time for MapServer to draw the image, or is it the delivery of the image to the requesting machine and subsequent placement in the client? If it is taking MapServer a long time, maybe there are some more data optimizations that you can do. Is there a better way to structure your data, can you do any pre-processing? Is it all in the same SRS, got attribute and spatial indexes? I have used the SQL IN for some apps with reasonable performance, but in the last 6 months or so, there were some posts on this list comparing the use of IN to a layer (or class?) filter. The latter solution was significantly faster. If it is taking a long time to get to the client, then that is likely an infrastructure issue on either end. If you want some more help digging in more deeply, post some more stats and mapfile snippets. David. *From:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Adam Eskreis *Sent:* Thursday, April 29, 2010 4:24 PM *To:* Lime, Steve D (DNR) *Cc:* mapserver-users@lists.osgeo.org *Subject:* Re: [mapserver-users] Re: WMS and tiles cutting off I tried doing ratio:1 unfortunately it doesn't seem like enough of a performance increase. Separate layers for each category is an option, however, there are over a hundred categories, and any combination of categories can be on at any given time, so this could prove to have performance issues of it's own. However, I thank you guys Steve and Kaipi for your advice. I think I am just going to go back to my old method, which was using php mapscript to generate the tiles, then each time the user selected new categories, purge the cache and remake the mapfile. It's not the ideal solution but it seems to be the only one. Thanks again, -Adam On Thu, Apr 29, 2010 at 3:50 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: Note that by default I believe openlayers will request an image that is *much* larger than what is visible. Setting the layers (OL) ratio:1 makes it the same size as the view port and that can speed up rendering considerably. Alternatively you could create a separate set of tiles for each category I suppose and switch OL layers as necessary... Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.com] Sent: Thursday, April 29, 2010 2:25 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.orgmailto: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.orgmailto: mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.commailto:aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache
Re: [mapserver-users] Re: WMS and tiles cutting off
Hi, If the query is optimized then try to find out real bottle neck. I believe that first step would be to throw away your client and test with shp2img and by having DEBUG 5 with all your layers. If you believe that the reason is due to symbols, then have a try by commenting out all the symbols you will soon know it for sure. I have not played with symbols myself but I can imagine that some sort of symbols are faster to render than others (truetype/pixmap/inline). -Jukka Rahkonen- Adam Eskreis wrote: Thank you for the response David. I have optimized the query all I can. I have optimized the query to the point that even with all categories selected, the query has a run time of 52 ms. I can only assume that the issue lies with the generation of the images. I will try to run it without the IN part of the query, but I can't imagine that it'st he problem. I think the problem is that there are a large number of symbols that need to be generated, and it's taking mapserver a long time to load them in. Also, yes I have indexes on all columns that I am calling in, and yes, they are all using the same SRS. I am still trying a few more things, but I don't think it's the database query that's causing the problem. On Fri, Apr 30, 2010 at 9:37 AM, Fawcett, David (MPCA) david.fawc...@state.mn.us wrote: Adam, It sounds like you have boiled the issue down to too much of a time lag between the time the query is executed and the image appears in the client. Is it taking a long time for MapServer to draw the image, or is it the delivery of the image to the requesting machine and subsequent placement in the client? If it is taking MapServer a long time, maybe there are some more data optimizations that you can do. Is there a better way to structure your data, can you do any pre-processing? Is it all in the same SRS, got attribute and spatial indexes? I have used the SQL IN for some apps with reasonable performance, but in the last 6 months or so, there were some posts on this list comparing the use of IN to a layer (or class?) filter. The latter solution was significantly faster. If it is taking a long time to get to the client, then that is likely an infrastructure issue on either end. If you want some more help digging in more deeply, post some more stats and mapfile snippets. David. *From:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Adam Eskreis *Sent:* Thursday, April 29, 2010 4:24 PM *To:* Lime, Steve D (DNR) *Cc:* mapserver-users@lists.osgeo.org *Subject:* Re: [mapserver-users] Re: WMS and tiles cutting off I tried doing ratio:1 unfortunately it doesn't seem like enough of a performance increase. Separate layers for each category is an option, however, there are over a hundred categories, and any combination of categories can be on at any given time, so this could prove to have performance issues of it's own. However, I thank you guys Steve and Kaipi for your advice. I think I am just going to go back to my old method, which was using php mapscript to generate the tiles, then each time the user selected new categories, purge the cache and remake the mapfile. It's not the ideal solution but it seems to be the only one. Thanks again, -Adam On Thu, Apr 29, 2010 at 3:50 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: Note that by default I believe openlayers will request an image that is *much* larger than what is visible. Setting the layers (OL) ratio:1 makes it the same size as the view port and that can speed up rendering considerably. Alternatively you could create a separate set of tiles for each category I suppose and switch OL layers as necessary... Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.com] Sent: Thursday, April 29, 2010 2:25 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points
RE: [mapserver-users] Re: WMS and tiles cutting off
How big are (and how many) the images requested by OL? You've been through so many changes I'm not sure exactly what configuration you're using: - tiled vs. untiled? - layer ratio setting? Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.com] Sent: Monday, May 03, 2010 6:23 PM To: Rahkonen Jukka Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Thank you for the advice Jukka. I tried just running shp2img. The results are almost instant. I also tried using my client with the symbols turned off, and the result was about half the load time. So I guess from this we can assume that there is a certain amount of overhead that openlayers is giving me, as well the symbols are causing some overhead. The only thing is, what to do? I can't sacrifice any more quality on my symbols (whcih are 8 bit png images) and openlayers as far as I know is the best client out there. Things are starting to look grim On Mon, May 3, 2010 at 2:44 PM, Rahkonen Jukka jukka.rahko...@mmmtike.fimailto:jukka.rahko...@mmmtike.fi wrote: Hi, If the query is optimized then try to find out real bottle neck. I believe that first step would be to throw away your client and test with shp2img and by having DEBUG 5 with all your layers. If you believe that the reason is due to symbols, then have a try by commenting out all the symbols you will soon know it for sure. I have not played with symbols myself but I can imagine that some sort of symbols are faster to render than others (truetype/pixmap/inline). -Jukka Rahkonen- Adam Eskreis wrote: Thank you for the response David. I have optimized the query all I can. I have optimized the query to the point that even with all categories selected, the query has a run time of 52 ms. I can only assume that the issue lies with the generation of the images. I will try to run it without the IN part of the query, but I can't imagine that it'st he problem. I think the problem is that there are a large number of symbols that need to be generated, and it's taking mapserver a long time to load them in. Also, yes I have indexes on all columns that I am calling in, and yes, they are all using the same SRS. I am still trying a few more things, but I don't think it's the database query that's causing the problem. On Fri, Apr 30, 2010 at 9:37 AM, Fawcett, David (MPCA) david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us wrote: Adam, It sounds like you have boiled the issue down to too much of a time lag between the time the query is executed and the image appears in the client. Is it taking a long time for MapServer to draw the image, or is it the delivery of the image to the requesting machine and subsequent placement in the client? If it is taking MapServer a long time, maybe there are some more data optimizations that you can do. Is there a better way to structure your data, can you do any pre-processing? Is it all in the same SRS, got attribute and spatial indexes? I have used the SQL IN for some apps with reasonable performance, but in the last 6 months or so, there were some posts on this list comparing the use of IN to a layer (or class?) filter. The latter solution was significantly faster. If it is taking a long time to get to the client, then that is likely an infrastructure issue on either end. If you want some more help digging in more deeply, post some more stats and mapfile snippets. David. *From:* mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Adam Eskreis *Sent:* Thursday, April 29, 2010 4:24 PM *To:* Lime, Steve D (DNR) *Cc:* mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org *Subject:* Re: [mapserver-users] Re: WMS and tiles cutting off I tried doing ratio:1 unfortunately it doesn't seem like enough of a performance increase. Separate layers for each category is an option, however, there are over a hundred categories, and any combination of categories can be on at any given time, so this could prove to have performance issues of it's own. However, I thank you guys Steve and Kaipi for your advice. I think I am just going to go back to my old method, which was using php mapscript to generate the tiles, then each time the user selected new categories, purge the cache and remake the mapfile. It's not the ideal solution but it seems to be the only one. Thanks again, -Adam On Thu, Apr 29, 2010 at 3:50 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: Note that by default I believe openlayers will request an image that is *much* larger than what is visible. Setting the layers (OL) ratio:1 makes
Re: [mapserver-users] Re: WMS and tiles cutting off
Ok well, got a big update here. I was able to switch it back to a 256x256 WMS tiled layer. My problem was that the symbols were being clipped, however, by using the openlayers gutter property, I was able to fix this problem. I am using a 1.0 ratio, and the tiles seem to be loading in much faster, and with a gutter value of 32 the clipping is completely gone. For those that don't know, the gutter parameter is one that is a property of the OpenLayers.Layer class. This is the description: {Integer} Determines the width (in pixels) of the gutter around image tiles to ignore. By setting this property to a non-zero value, images will be requested that are wider and taller than the tile size by a value of 2 x gutter. This allows artifacts of rendering at tile edges to be ignored. Set a gutter value that is equal to half the size of the widest symbol that needs to be displayed. Defaults to zero. Non-tiled layers always have zero gutter. I am going to see if my client is satisfied with the speed, and I will continue trying different things to optimize, obviously if anyone has any suggestions they are welcome =). Thanks a lot for the help so far everyone. -Adam On Mon, May 3, 2010 at 7:52 PM, Lime, Steve D (DNR) steve.l...@state.mn.uswrote: How big are (and how many) the images requested by OL? You've been through so many changes I'm not sure exactly what configuration you're using: - tiled vs. untiled? - layer ratio setting? Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.com] Sent: Monday, May 03, 2010 6:23 PM To: Rahkonen Jukka Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Thank you for the advice Jukka. I tried just running shp2img. The results are almost instant. I also tried using my client with the symbols turned off, and the result was about half the load time. So I guess from this we can assume that there is a certain amount of overhead that openlayers is giving me, as well the symbols are causing some overhead. The only thing is, what to do? I can't sacrifice any more quality on my symbols (whcih are 8 bit png images) and openlayers as far as I know is the best client out there. Things are starting to look grim On Mon, May 3, 2010 at 2:44 PM, Rahkonen Jukka jukka.rahko...@mmmtike.fi mailto:jukka.rahko...@mmmtike.fi wrote: Hi, If the query is optimized then try to find out real bottle neck. I believe that first step would be to throw away your client and test with shp2img and by having DEBUG 5 with all your layers. If you believe that the reason is due to symbols, then have a try by commenting out all the symbols you will soon know it for sure. I have not played with symbols myself but I can imagine that some sort of symbols are faster to render than others (truetype/pixmap/inline). -Jukka Rahkonen- Adam Eskreis wrote: Thank you for the response David. I have optimized the query all I can. I have optimized the query to the point that even with all categories selected, the query has a run time of 52 ms. I can only assume that the issue lies with the generation of the images. I will try to run it without the IN part of the query, but I can't imagine that it'st he problem. I think the problem is that there are a large number of symbols that need to be generated, and it's taking mapserver a long time to load them in. Also, yes I have indexes on all columns that I am calling in, and yes, they are all using the same SRS. I am still trying a few more things, but I don't think it's the database query that's causing the problem. On Fri, Apr 30, 2010 at 9:37 AM, Fawcett, David (MPCA) david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us wrote: Adam, It sounds like you have boiled the issue down to too much of a time lag between the time the query is executed and the image appears in the client. Is it taking a long time for MapServer to draw the image, or is it the delivery of the image to the requesting machine and subsequent placement in the client? If it is taking MapServer a long time, maybe there are some more data optimizations that you can do. Is there a better way to structure your data, can you do any pre-processing? Is it all in the same SRS, got attribute and spatial indexes? I have used the SQL IN for some apps with reasonable performance, but in the last 6 months or so, there were some posts on this list comparing the use of IN to a layer (or class?) filter. The latter solution was significantly faster. If it is taking a long time to get to the client, then that is likely an infrastructure issue on either end. If you want some more help digging in more deeply, post some more stats and mapfile snippets. David. *From:* mapserver-users-boun
Re: [mapserver-users] Re: WMS and tiles cutting off
I usually find that an untiled openlayers wms layer with transitionEffect:resize has a pretty similar effect that that of a tiled layer, as the map isn't hidden as soon as the user stops panning, but is replaced with the new image once that one arrives. YMMV. regards, thomas On Thu, Apr 29, 2010 at 21:25, Adam Eskreis aeskr...@gmail.com wrote: Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user selects a category, only the points in that category are shown. My query in the mapfile looks something like thi: SELECT point_geom,gid,symbol,angle FROM mapdata WHERE category IN(%CATEGORIES%); And each time the user changes the categories, I use openlayers to merge new parameters, and input the new category values that should be used. Is tilecache still useable if I have a system like this set up? Thanks, -Adam On Thu, Apr 29, 2010 at 6:14 AM, kaipi mapcoll...@gmx.netmailto:mapcoll...@gmx.net wrote: Hi, you can use http://tilecache.org/ Tilecache with the option metatiling enabled. With metatiling enabled Tilecache will fetch larger tiles (eg. 4096x4096) from Mapserver and will cut them into smaller tiles (eg. 256x256). It will also increase performance because Mapserver does not need to render tiles when they are already in cache. kaipi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-and-tiles-cutting-off-tp4978418p4979280.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: WMS and tiles cutting off
On Apr 29, 2010, at 5:23 PM, ext Adam Eskreis wrote: I tried doing ratio:1 unfortunately it doesn't seem like enough of a performance increase. Separate layers for each category is an option, however, there are over a hundred categories, and any combination of categories can be on at any given time, so this could prove to have performance issues of it's own. However, I thank you guys Steve and Kaipi for your advice. I think I am just going to go back to my old method, which was using php mapscript to generate the tiles, then each time the user selected new categories, purge the cache and remake the mapfile. It's not the ideal solution but it seems to be the only one. Haven't really followed this thread, but if your problem is that the map goes blank when they drag, untiled, combined with the transitionEffect: 'resize' option will cause the map that you already have to not disappear after a drag. Just a thought. -- Chris ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: WMS and tiles cutting off
Adam, It sounds like you have boiled the issue down to too much of a time lag between the time the query is executed and the image appears in the client. Is it taking a long time for MapServer to draw the image, or is it the delivery of the image to the requesting machine and subsequent placement in the client? If it is taking MapServer a long time, maybe there are some more data optimizations that you can do. Is there a better way to structure your data, can you do any pre-processing? Is it all in the same SRS, got attribute and spatial indexes? I have used the SQL IN for some apps with reasonable performance, but in the last 6 months or so, there were some posts on this list comparing the use of IN to a layer (or class?) filter. The latter solution was significantly faster. If it is taking a long time to get to the client, then that is likely an infrastructure issue on either end. If you want some more help digging in more deeply, post some more stats and mapfile snippets. David. From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis Sent: Thursday, April 29, 2010 4:24 PM To: Lime, Steve D (DNR) Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I tried doing ratio:1 unfortunately it doesn't seem like enough of a performance increase. Separate layers for each category is an option, however, there are over a hundred categories, and any combination of categories can be on at any given time, so this could prove to have performance issues of it's own. However, I thank you guys Steve and Kaipi for your advice. I think I am just going to go back to my old method, which was using php mapscript to generate the tiles, then each time the user selected new categories, purge the cache and remake the mapfile. It's not the ideal solution but it seems to be the only one. Thanks again, -Adam On Thu, Apr 29, 2010 at 3:50 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: Note that by default I believe openlayers will request an image that is *much* larger than what is visible. Setting the layers (OL) ratio:1 makes it the same size as the view port and that can speed up rendering considerably. Alternatively you could create a separate set of tiles for each category I suppose and switch OL layers as necessary... Steve From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.commailto:aeskr...@gmail.com] Sent: Thursday, April 29, 2010 2:25 PM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.usmailto:steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.commailto:aeskr...@gmail.commailto:aeskr...@gmail.commailto:aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user
Re: [mapserver-users] Re: WMS and tiles cutting off
I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user selects a category, only the points in that category are shown. My query in the mapfile looks something like thi: SELECT point_geom,gid,symbol,angle FROM mapdata WHERE category IN(%CATEGORIES%); And each time the user changes the categories, I use openlayers to merge new parameters, and input the new category values that should be used. Is tilecache still useable if I have a system like this set up? Thanks, -Adam On Thu, Apr 29, 2010 at 6:14 AM, kaipi mapcoll...@gmx.net wrote: Hi, you can use http://tilecache.org/ Tilecache with the option metatiling enabled. With metatiling enabled Tilecache will fetch larger tiles (eg. 4096x4096) from Mapserver and will cut them into smaller tiles (eg. 256x256). It will also increase performance because Mapserver does not need to render tiles when they are already in cache. kaipi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-and-tiles-cutting-off-tp4978418p4979280.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: WMS and tiles cutting off
So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user selects a category, only the points in that category are shown. My query in the mapfile looks something like thi: SELECT point_geom,gid,symbol,angle FROM mapdata WHERE category IN(%CATEGORIES%); And each time the user changes the categories, I use openlayers to merge new parameters, and input the new category values that should be used. Is tilecache still useable if I have a system like this set up? Thanks, -Adam On Thu, Apr 29, 2010 at 6:14 AM, kaipi mapcoll...@gmx.netmailto:mapcoll...@gmx.net wrote: Hi, you can use http://tilecache.org/ Tilecache with the option metatiling enabled. With metatiling enabled Tilecache will fetch larger tiles (eg. 4096x4096) from Mapserver and will cut them into smaller tiles (eg. 256x256). It will also increase performance because Mapserver does not need to render tiles when they are already in cache. kaipi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-and-tiles-cutting-off-tp4978418p4979280.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: WMS and tiles cutting off
Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user selects a category, only the points in that category are shown. My query in the mapfile looks something like thi: SELECT point_geom,gid,symbol,angle FROM mapdata WHERE category IN(%CATEGORIES%); And each time the user changes the categories, I use openlayers to merge new parameters, and input the new category values that should be used. Is tilecache still useable if I have a system like this set up? Thanks, -Adam On Thu, Apr 29, 2010 at 6:14 AM, kaipi mapcoll...@gmx.netmailto: mapcoll...@gmx.net wrote: Hi, you can use http://tilecache.org/ Tilecache with the option metatiling enabled. With metatiling enabled Tilecache will fetch larger tiles (eg. 4096x4096) from Mapserver and will cut them into smaller tiles (eg. 256x256). It will also increase performance because Mapserver does not need to render tiles when they are already in cache. kaipi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-and-tiles-cutting-off-tp4978418p4979280.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: WMS and tiles cutting off
Note that by default I believe openlayers will request an image that is *much* larger than what is visible. Setting the layers (OL) ratio:1 makes it the same size as the view port and that can speed up rendering considerably. Alternatively you could create a separate set of tiles for each category I suppose and switch OL layers as necessary... Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.com] Sent: Thursday, April 29, 2010 2:25 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [aeskr...@gmail.commailto:aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user selects a category, only the points in that category are shown. My query in the mapfile looks something like thi: SELECT point_geom,gid,symbol,angle FROM mapdata WHERE category IN(%CATEGORIES%); And each time the user changes the categories, I use openlayers to merge new parameters, and input the new category values that should be used. Is tilecache still useable if I have a system like this set up? Thanks, -Adam On Thu, Apr 29, 2010 at 6:14 AM, kaipi mapcoll...@gmx.netmailto:mapcoll...@gmx.netmailto:mapcoll...@gmx.netmailto:mapcoll...@gmx.net wrote: Hi, you can use http://tilecache.org/ Tilecache with the option metatiling enabled. With metatiling enabled Tilecache will fetch larger tiles (eg. 4096x4096) from Mapserver and will cut them into smaller tiles (eg. 256x256). It will also increase performance because Mapserver does not need to render tiles when they are already in cache. kaipi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-and-tiles-cutting-off-tp4978418p4979280.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: WMS and tiles cutting off
I tried doing ratio:1 unfortunately it doesn't seem like enough of a performance increase. Separate layers for each category is an option, however, there are over a hundred categories, and any combination of categories can be on at any given time, so this could prove to have performance issues of it's own. However, I thank you guys Steve and Kaipi for your advice. I think I am just going to go back to my old method, which was using php mapscript to generate the tiles, then each time the user selected new categories, purge the cache and remake the mapfile. It's not the ideal solution but it seems to be the only one. Thanks again, -Adam On Thu, Apr 29, 2010 at 3:50 PM, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: Note that by default I believe openlayers will request an image that is *much* larger than what is visible. Setting the layers (OL) ratio:1 makes it the same size as the view port and that can speed up rendering considerably. Alternatively you could create a separate set of tiles for each category I suppose and switch OL layers as necessary... Steve From: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.com] Sent: Thursday, April 29, 2010 2:25 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off Ok, I just gave an untiled layer a try, unfortunately though, due to the large amount of symbols being displayed on the screen, there is about a 2 second delay every time the map is panned. My client will most certainly find this unacceptable. I have tried using smaller images, but I cannot sacrifice any more quality. I believe my database query to be as optimized as it can be (has about 50 ms runtime, I honestly don't think I can get it any lower than that). If these are the only options, is there something else besides WMS that you all would recommend using to solve this issue? Thanks, -Adam On Thu, Apr 29, 2010 at 2:54 PM, Lime, Steve D (DNR) steve.l...@state.mn.usmailto:steve.l...@state.mn.us wrote: So use two layers. One for the background, use tilecache for that. Then use an untiled wms/mapserver layer for the overlayed points. - Steve From: mapserver-users-boun...@lists.osgeo.orgmailto: mapserver-users-boun...@lists.osgeo.org [ mapserver-users-boun...@lists.osgeo.orgmailto: mapserver-users-boun...@lists.osgeo.org] On Behalf Of Adam Eskreis [ aeskr...@gmail.commailto:aeskr...@gmail.com] Sent: Thursday, April 29, 2010 1:24 PM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Re: WMS and tiles cutting off I have thought about using tilecache with metatiling, however there is a caveat about this map that i forgot to mention in my main post, and it has to do with that categories parameter. Basically, each point/symbol on the map has an associated category in the database backend. I am using mapserver/WMS parameters to change the categories which are called. Each time the user selects a category, only the points in that category are shown. My query in the mapfile looks something like thi: SELECT point_geom,gid,symbol,angle FROM mapdata WHERE category IN(%CATEGORIES%); And each time the user changes the categories, I use openlayers to merge new parameters, and input the new category values that should be used. Is tilecache still useable if I have a system like this set up? Thanks, -Adam On Thu, Apr 29, 2010 at 6:14 AM, kaipi mapcoll...@gmx.netmailto: mapcoll...@gmx.netmailto:mapcoll...@gmx.netmailto:mapcoll...@gmx.net wrote: Hi, you can use http://tilecache.org/ Tilecache with the option metatiling enabled. With metatiling enabled Tilecache will fetch larger tiles (eg. 4096x4096) from Mapserver and will cut them into smaller tiles (eg. 256x256). It will also increase performance because Mapserver does not need to render tiles when they are already in cache. kaipi -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-and-tiles-cutting-off-tp4978418p4979280.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.orgmailto: mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users