Re: [mapserver-users] WMS layer swapping according to scale
Hello Rahkonen, Thanks for answering so quickly. I had already proved that, but I had obtained a warning in the GetCapabilities request and I didn't have realized that it was working. Do you know how I can solve the warning?: Layer Namegroup/Name !-- WARNING: Mandatory metadata '..._GROUP_TITLE' was missing in this context. -- ... Layer queryable=1 opaque=0 cascaded=0 Namelayer1/Name ... /Layer Layer queryable=0 opaque=0 cascaded=0 Namelayer2/Name /Layer /Layer Also, I have read in http://www.mail-archive.com/mapserver-us...@lists.umn.edu/msg02321.html that there can be problems with the GetFeatureInfo query. ¿Does anyone know what these problems are? Thank you again for your help. -- Regards Gracia El día 9 de noviembre de 2010 10:39, Rahkonen Jukka jukka.rahko...@mmmtike.fi escribió: Hi, Layers cannot have a same name in WMS. Use different names for layers and put them under the same GROUP. Use GROUP in WMS requests. Layers could look like LAYER GROUP group NAME close STATUS ON DATA close.shp TYPE POLYGON MAXSCALEDENOM 6 METADATA wms_title close END END LAYER GROUP group NAME far STATUS ON DATA far.shp TYPE POINT MINSCALEDENOM 6 METADATA wms_title far END END -Jukka Rahkonen- Gracia Fernández López wrote: Hello, I want to replace the polygon representations in a layer by markers when the zoom is out of a scale level. To do that, I have defined two layers in Mapserver to represent the same objects: one of them is a Polygon, and the other one is a Point (centroid), and I want to swap one for the other depending on the scale. With the Mapserver queries, I had defined the same name for both layers and it worked well. Now I need to do the same with WMS queries, but neither I can assign the same name to the layers (if I do that they are changed automatically), nor use the GROUP option (I obtain a warning with GetCapabilities). I also tried using the parameter wms_group_layer, but it puts a common title but not a common name, so I can not query the group in the LAYERS param. Do anyone knows how to solve this issue in Mapserver? Or do I have to do that in the viewer side? Thanks in advance for any help. -- Regards Gracia ___ 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] draw polygons ordered by field ? (from File System)
Sebastian E. Ovide wrote: Is it possible define an order on how the polygons are drawn ? Say for example to draw the polygons with field RISK 0 first, then with RISK =1 and so on... I know that using PG we can use Select * from XXX order by RISK Is there any way to do that using ESRI/MapInfo files ? Have a look at the sortshp utility: http://mapserver.org/utilities/sortshp.html Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] draw polygons ordered by field ? (from File System)
The only way I know of is to use the sortshp utility. http://mapserver.org/utilities/sortshp.html Best regards, Bart Hi All, Reading a shapefile (ESRI/MapInfo) from FS with polygons overlapping. Each polygon is drawn with a different color based on a field called RISK. Is it possible define an order on how the polygons are drawn ? Say for example to draw the polygons with field RISK 0 first, then with RISK =1 and so on... I know that using PG we can use Select * from XXX order by RISK Is there any way to do that using ESRI/MapInfo files ? Thanks -- Sebastian E. Ovide ___ 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
[mapserver-users] draw polygons ordered by field ? (from File System)
Hi All, Reading a shapefile (ESRI/MapInfo) from FS with polygons overlapping. Each polygon is drawn with a different color based on a field called RISK. Is it possible define an order on how the polygons are drawn ? Say for example to draw the polygons with field RISK 0 first, then with RISK =1 and so on... I know that using PG we can use Select * from XXX order by RISK Is there any way to do that using ESRI/MapInfo files ? Thanks -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] draw polygons ordered by field ? (from File System)
Hi, Sortshp can order data only by one attribute. If that is not enough you can sort shapefile by two or more attributes with ogr2ogr by giving ORDER BY inside the -sql parameter. Of course it is possible to split the shapefile into several layers by using FILTER. In that case the drawing order can be controlled by ordering the layers in the mapfile but perhaps you do not want many layers. However, if the result is to be used through WMS the layers can be combined back with GROUP. -Jukka Rahkonen- Bart van den Eijnden wrote: The only way I know of is to use the sortshp utility. http://mapserver.org/utilities/sortshp.html Best regards, Bart Hi All, Reading a shapefile (ESRI/MapInfo) from FS with polygons overlapping. Each polygon is drawn with a different color based on a field called RISK. Is it possible define an order on how the polygons are drawn ? Say for example to draw the polygons with field RISK 0 first, then with RISK =1 and so on... I know that using PG we can use Select * from XXX order by RISK Is there any way to do that using ESRI/MapInfo files ? Thanks -- Sebastian E. Ovide ___ 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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS
Actually EXPRESSIONs can handle regex too: CLASSITEM ‘tag’ CLASS EXPRESSION /^TVOP2/ … END This catches all tag’s that begin with the pattern TVOP2. You might want to do a FILTER instead if this is the ONLY filter you need to apply. You’d see a small performance boost if that were the case. Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of tommaso Sent: Tuesday, November 09, 2010 5:29 AM To: wildcolour Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS Hi, for regular expression you need to set the parameters FILTERITEM and FILTER. From the documentation (http://mapserver.org/mapfile/expressions.html#regular-expression-comparisonhttp://mapserver.org/mapfile/expressions.html#regular-expression-comparison)) LAYER NAME regexp-example FILTERITEM placename FILTER /hotel/ ... END I think, the parameter EXPRESSION does not allow regular expression comparison. Cheers, Tommaso On Mon, 2010-11-08 at 15:29 -0800, wildcolour wrote: Thanks, this looks great. I will try it tonight, but I think is looking just right. One more related question. The column we are using is called 'Tag' and the seemed to have grouped the 'class' and the 'title' in the one column. For example all secondary roads have the tag TVOP2 but roads with the name 'smith st' will look like this TVOP2,SMITH ST So my question is in the expression can I do a 'is like' query?? I am guessing somthing like this EXPRESSION 'TVOP2%' Thanks for the great support Matt :) ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS
Matt, It looks like Steve Lime's regular expression example will get you what you are looking for. One strategy to think about with MapServer (and any other Web map server) is that when you are looking for the best performance, you want to pre-process your data as much as possible. This means pre-classifying your data if complicated expressions are necessary, projecting your data to get it all in the same spatial reference system, etc. MapServer can do on-the-fly projection, complicated expressions, etc. pretty efficiently. But, if you can do these tasks once in pre-processing, they won't have to be done every time someone makes a map request. In your case, if performance matters, I would consider creating a new column in your data source and splitting out the two 'tags'. An expression that is an exact string match will be faster than a more complicated expression. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of wildcolour Sent: Monday, November 08, 2010 5:29 PM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS Thanks, this looks great. I will try it tonight, but I think is looking just right. One more related question. The column we are using is called 'Tag' and the seemed to have grouped the 'class' and the 'title' in the one column. For example all secondary roads have the tag TVOP2 but roads with the name 'smith st' will look like this TVOP2,SMITH ST So my question is in the expression can I do a 'is like' query?? I am guessing somthing like this EXPRESSION 'TVOP2%' Thanks for the great support Matt :) -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Real-life-sample-of-a-Mapfile-for-shp-files-on-WMS-tp5718787p5719102.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
[mapserver-users] RE: Real life sample of a Mapfile for shp files on WMS
Wow Thanks guys, these where great examples, I got there straight away. Thanks for the advice on performance. This may become an issue, and sounds like it is better to deal with it early. This is a very powerful tool, with a great community base, I am very impressed Now of the fun part, making the maps look pretty :) Thanks again Matt :) -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Real-life-sample-of-a-Mapfile-for-shp-files-on-WMS-tp5718787p5722388.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
Re: [mapserver-users] WMS 1.3.0 questions
Hi, Have a try with EPSG:4326 and you should see a difference. Despite of axes flipping with some projections there should really not be any difference in the GetMap output - image is an image. Do GetCapabilities and you should see difference. I am remembering also that VERSION is a compulsory parameter in WMS GetMap so there is no need to play with the defaults, just give the version and you will get what you want. -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Yves Moisan Lähetetty: ti 9.11.2010 23:58 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: [mapserver-users] WMS 1.3.0 questions Hi All, I tried to look for an answer to the question what do I have to do to get MapServer to serve a 1.3.0 WMS by default and I haven't found yet. Is there anything to do in the mapfile per se or is it just by the virtue of having a version = 5.4 ? I thought the latter but then I tried things like : http://toMapserv.cgi?...REQUEST=GetMapVERSION=1.3.0CRS=EPSG%3A42304BBOX=-5175875.27581...WIDTH=1605HEIGHT=316 and http://toMapserv.cgi?...REQUEST=GetMapVERSION=1.1.1CRS=EPSG%3A42304BBOX=-5175875.27581...WIDTH=1605HEIGHT=316 and wondered if I'm getting back the response from a 1.3.0 in the first case and a 1.1.1 in the second case. Both images were the same, so I thought everything was fine until I tried an unexisting version number (e.g. 1.1.122) and still got back an image ! The only error message that made me think MS was indeed looking at the version number is when I submitted VERSION=abc. then MS complained it wanted x.y or x.y.z. So how can I tell I get a real WMS with my specified version number instead of what appears to be a default one ? Doc pointers appreciated. Yves ___ 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] WMS 1.3.0 questions
Hello Yves, Some related thoughts: - related ticket for configuring default WMS version: http://trac.osgeo.org/mapserver/ticket/3444 ...please add yourself to the CC list of that ticket and join in the discussions and testing and feedback, thanks - doc pointers: http://www.mapserver.org/ogc/wms_server.html#wms-1-3-0-support ...specifically see the 2 working 1.3.0 example requests there -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 10-11-10 6:58 AM, Yves Moisan wrote: Hi All, I tried to look for an answer to the question what do I have to do to get MapServer to serve a 1.3.0 WMS by default and I haven't found yet. Is there anything to do in the mapfile per se or is it just by the virtue of having a version = 5.4 ? I thought the latter but then I tried things like : http://toMapserv.cgi?...REQUEST=GetMapVERSION=1.3.0CRS=EPSG%3A42304BBOX=-5175875.27581...WIDTH=1605HEIGHT=316 and http://toMapserv.cgi?...REQUEST=GetMapVERSION=1.1.1CRS=EPSG%3A42304BBOX=-5175875.27581...WIDTH=1605HEIGHT=316 and wondered if I'm getting back the response from a 1.3.0 in the first case and a 1.1.1 in the second case. Both images were the same, so I thought everything was fine until I tried an unexisting version number (e.g. 1.1.122) and still got back an image ! The only error message that made me think MS was indeed looking at the version number is when I submitted VERSION=abc. then MS complained it wanted x.y or x.y.z. So how can I tell I get a real WMS with my specified version number instead of what appears to be a default one ? Doc pointers appreciated. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Seeking suggestions on WebGIS
Dear Friends, I am newbie to UMN MapServer and with the knowledge gained through the forum, I designed WebGIS for Ocean Data and Information System. I am herewith providing the link for the same. Please go through and suggest your valuable opinions, for improvement if any. http://115.113.76.8/cgi-bin/mapserv54?map=INSITU_RECENTMAPFILElayer=oceanlayer=copyrightlayer=mooredlayer=driftinglayer=awslayer=currentmeterlayer=tidelayer=xbtlayer=waveriderzoom=0program=%2Fcgi-bin%2Fmapserv54root=%2Finsitugraphicsroot=%2Finsitu%2Fgraphicsmap_web=template+insitu.html Ocean Data Information System with regards Venkat -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Seeking-suggestions-on-WebGIS-tp5723484p5723484.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