Re: [mapserver-users] MODE=legendicon GROUP Layers
Certainly our mapfiles stay fairly static once we've set them up. Thanks for the suggestion, will have a look at trying it out. Cheers Andrew From: Basques, Bob (CI-StPaul) bob.basq...@ci.stpaul.mn.usmailto:bob.basq...@ci.stpaul.mn.us Date: Friday, 7 September 2012 17:06 To: Andrew Cowie cow...@landcareresearch.co.nzmailto:cow...@landcareresearch.co.nz, mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: RE: MODE=legendicon GROUP Layers All, I’ve gotten around this in the past by using dummy layers specifically for Legend Creation. You have complete control over the legend this way and can mix and match data sources however is required without needing to actually map the data out. It is more work overall, but if your MapFiles don’t change often, it’s usually a one time setup thing. I have a few map layers that have 7 or 8 different thresholds for display set MIN/MAXSCALEDENOMs and they all get a dummy layer that displays the same thing for all thresholds. Bobb From: mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrew Cowie Sent: Friday, September 07, 2012 10:46 AM To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org Subject: [mapserver-users] MODE=legendicon GROUP Layers Hello list Wondering if anyone can help… We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database – hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1http://%3cservername%3e/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks Andrew Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MODE=legendicon GROUP Layers
Thanks for the info Steve, that makes sense - when Groups are used to link related layers things get too ambiguous. We'll look at our options with this one. Cheers Andrew On 07/09/2012 17:22, Lime, Steve D (DNR) steve.l...@state.mn.us wrote: Legend icon only works with layers. Groups are just too ambiguous to uniquely identify the class to be rendered. Groups don't have to be organized by scale ranges. Often they link related layers, for example a bunch of road feature types. I think It would be possible to add support to see if a group name can resolve to a single layer based on scale but that doesn't exist in the code at this point. Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] on behalf of Andrew Cowie [cow...@landcareresearch.co.nz] Sent: Friday, September 07, 2012 10:46 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] MODE=legendicon GROUP Layers Hello list Wondering if anyone can helpŠ We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE =legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks Andrew Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MODE=legendicon GROUP Layers
Hello list Wondering if anyone can help… We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database – hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks Andrew Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MODE=legendicon GROUP Layers
All, I've gotten around this in the past by using dummy layers specifically for Legend Creation. You have complete control over the legend this way and can mix and match data sources however is required without needing to actually map the data out. It is more work overall, but if your MapFiles don't change often, it's usually a one time setup thing. I have a few map layers that have 7 or 8 different thresholds for display set MIN/MAXSCALEDENOMs and they all get a dummy layer that displays the same thing for all thresholds. Bobb From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrew Cowie Sent: Friday, September 07, 2012 10:46 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] MODE=legendicon GROUP Layers Hello list Wondering if anyone can help... We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database - hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1http://%3cservername%3e/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks Andrew Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MODE=legendicon GROUP Layers
Legend icon only works with layers. Groups are just too ambiguous to uniquely identify the class to be rendered. Groups don't have to be organized by scale ranges. Often they link related layers, for example a bunch of road feature types. I think It would be possible to add support to see if a group name can resolve to a single layer based on scale but that doesn't exist in the code at this point. Steve From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-boun...@lists.osgeo.org] on behalf of Andrew Cowie [cow...@landcareresearch.co.nz] Sent: Friday, September 07, 2012 10:46 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] MODE=legendicon GROUP Layers Hello list Wondering if anyone can help… We have been utilising the legendicon mode to create a custom legend in our application, however some recent work to try and speed up our WMS has reworked our mapfiles slightly, making use of GROUP LAYERs to group almost identical LAYERs together, the only difference in the LAYERs being MAX MINSCALEDENOM and the DATA request string to our PostGIS database – hitting a generalised version of the geometry at smaller scales. LAYER NAME 'lri_luc_main_gen_500k' GROUP 'lri_luc_main' DATA 'the_geom_gen_500k FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MINSCALEDENOM 251001 END LAYER NAME 'lri_luc_main_full' GROUP 'lri_luc_main' DATA 'the_geom FROM data.lri USING UNIQUE gid USING srid=2193' INCLUDE 'includes/lri_luc_main_layer.inc' MAXSCALEDENOM 251000 MINSCALEDENOM 15000 END The request for the legend icon is of the form: http://servername/cgi-bin/mapserv.fcgi?FORMAT=image/gifMAP=lri.mapMODE=legendiconICON=lri_luc_main,1 This worked fine before we started using GROUPs, however now we now encounter the error: mapserv(): Web application error. Icon layer=lri_luc_main not found in map file. Does the legendicon mode work with GROUP layers? If not, is there a way round this? Or alternatively, perhaps there is a better way to request a generalised version of the geometry that doesn't involve GROUP LAYERs? Any help or suggestions much appreciated. Many thanks Andrew Please consider the environment before printing this email Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users