Re: [mapserver-users] port from Apache to IIS
Hi, Thi worked last year for me, but I run IIS6. If not much changed between 6 and 7, it might help you: 0) Get the latest binaries (eg. the MS4W installation or any other) and install 1) Create a virtual directory in IIS pointing to the dir where mapserv.exe resides (eg. when using ms4w it's C:\ms4w\Apache\cgi-bin) and give it an appropriate alias name alias; for instance cgi-bin. 2) Set the execute permissions on this virtual directory to Scripts and Executables 3) Accept the virtual directory 4) Go to Web Service Extensions in the IIS service manager 5) Select Add a new web service extension. On the required files tab, add C:\YourMapserverInstalldir\mapserv.exe 6) Set it to allow 7) Through the security tab of the mapserver install directory, give IIS_WPG (a standard system usergroup) read/write and execute permission on ALL the underlying sub-directories 7a) go to IIS manager 7b) go to the server's Web Server Extensions 7c) choose add a new Web Service Extension... 7d) name it mapserver_cgi or similar, and press Add.. near the required files field. 7e) find the mapserv.exe again (look for CGI's not for dll's!) and press OK 7f) set it's status to Allowed. 8) Restart the World Wide Web publishing service in the services section of the administrative tools 9) Test mapserv by running http:\\yourserver\yourmapservaliasdir\mapserv.exe If you get the message No query information to decode. QUERY_STRING is set, but empty. Mapserver under IIS is ready to go! -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 08-04-09 07:18, Jessie Xu t-zhe...@microsoft.com wrote: I'd like to have mapserver running on IIS 7 and want to know how? I saw an article called 'IIS setup for Mapserver' but it is written in 2005 based on IIS 5. Could someone give me a hand to figure out how to port from Apache to IIS 7? What changes should be made to config files, virtual directories and permissions, etc? Thanks for help! Jessie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] use SLD to dynamic label switching
One thing to care care of if you use SLD is having not much to do with the SLDs themselves, but with TMP file settings. Using SLDs is dependent on the correct setting of the two settings IMAGEPATH -- where the mapserver software puts the SLD and other temporary files IMAGEURL -- where the web browser and other http services pick them up. Setting these incorrectly, and more importantly their security setting incorrrectly, will normally give no problems, but when using SLDs (and also in other cases, eg. when chaining Mapserver to external WMS and WFS services), they will make MS malfunction, but SILENTLY (ie. No error messages). Eg. in our set ups of a WMS with external SLD they are set as follows: For a *nix setup ( MacOSX) with Mapserver CGI 'behind' Apache: WEB IMAGEPATH /Users/kobben/Sites/ms_tmp/ IMAGEURL http://localhost/~kobben/ms_tmp/; ## METADATA [all your web metadata...] END #metadata END #web For a Win box with Mapserver CGI 'behind' IIS: IMAGEPATH C:/tmp/ms_tmp/ IMAGEURL http://geoserver.itc.nl/ms_tmp/; The IMAGEPATh is a directory that is reacheable by Mapserver at this real location (in this case expressed as Unix BSD path on my MacOSX or as UNC path on Win) and that has read write access set for the Mapserver process. Eg. on the Winbox it should have write access for the anonymous system service account under which Mapserver runs (usually something like SERVERNAME\IWAM_SERVERNAME). You can test this by seeing if files with names like) are being created when you request the WMS with external SLD. If they are the IMAGEPATH celarly works. Then test if you can point a browser to the IMAGEURL and pick up the tmp file. If that worsk the IMAGEURL is also OK. Now it should work... Hope this helps. -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 05-03-09 16:54, Balázs Bámer bamerbal...@gmail.com wrote: Hi All, I have a WMS service http://att-it.homelinux.net:22080/cgi-bin/spatial?SERVICE=WMSVERSION=1.1.1RE QUEST=GetMapLAYERS=szerkesztheto,csakolv,pontSTYLES=SRS=epsg:23700BBOX=420 000,4,95,37WIDTH=938HEIGHT=591FORMAT=image/pngSLD=http://att-i t.homelinux.net:22080/sld/spatialszerkeszthetoproba.xml Mapfile is here, the layer in question is szerkesztheto http://att-it.homelinux.net:22080/spatial.map which works without the SLD request part and does what I want. I want to use the SLD to alter rendering colors and add labels, because I beleive that this would be more efficient than having a geometry layer and a separate annotation one. Moreover, I want to try SLD. So with SLD the layer in question disappears. Inspecting the transformed layer (written in /tmp) http://att-it.homelinux.net:22080/spatialsld3.map the layer szerkesztheto is turned into annotation type which I didn't want. But even being this type, no labels are shown. Can this SLD trick be done, and if yes, where am I wrong? Thank you in advance! best regards: Balázs ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to pimp WMS meta information?
FYI, the valid way to extend the GetCapabilities is to use the VendorSpecificCapabilities / element. (See the WMS spec on the OGC pages www.opengeospatial.org) -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6, 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 25-09-08 20:23, Kralidis,Tom [Burlington] [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jochen Topf Sent: 25 September, 2008 9:49 AM To: Markus Spring Cc: Mapserver-users Subject: Re: [mapserver-users] How to pimp WMS meta information? On Tue, Sep 16, 2008 at 07:16:03AM +0200, Markus Spring wrote: trying to set up a multi-map service based WMS mapservices and OpenLayers, I would like to retrieve user-defined meta information from a map via the GetCapabilities request. For example, if I define METADATA WMS_TITLE Palliativstationen WMS_ONLINERESOURCE http://gis.local/wms/palliativ; WMS_SRS epsg:31468 WMS_SHOW_QUERY_IN large_popup END I would like to retrieve the value large_popup of WMS_SHOW_QUERY_IN through the GetCapabilities call. The background idea is that this information could be used by my application but should not harm other people's use of the WMS service. Is there any viable way to accomplish this with a mapserver based WMS service? I have used the WMS keywords on a WMS layer to add special infos only needed for my application. Not the cleanest approach, because other applications will, of course, also see those special keywords you put in, but as a workaround it is ok. Would be nice if there was an official way to do this, though. Out of the box, MapServer will return a well-formed, valid XML document which obeys the WMS standard. Having said this, you could use mapscript WxS (http://mapserver.gis.umn.edu/docs/howto/wxs_mapscript) to, on GetCapabilities, intercept the request/response mechanism and write out a modified GetCapbilities XML document, adding in your own XML elements and definitions, i.e.: Layer Namefoo/Name Titlebar/Title MyProperty name=WMS_SHOW_QUERY_INlarge_popup/MyProperty ... This would work, with the assumptions that: 1./ a WMS Capabilities parser which is doing DTD checking would choke on this, as it is not part of the WMS DTD 2./ if there is no DTD checking, the Capabilities will be processed, only 'aware' clients would know what to do with this info Of course, if you want to be to-spec 100%, there are ways to extend DTDs with inline ENTITY's, etc. :) Hope this helps. ..Tom ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to pimp WMS meta information?
Ah, that might be true, never tried it. I just followed up on the comment about using mapscript to alter the Getcapabilities.xml, and reminded you that the VendorSpecificCapabilities / element would be the place to go if you don't want a Validator to choke on the xml you've created... Barend On 26-09-08 09:27, Jochen Topf [EMAIL PROTECTED] wrote: On Fri, Sep 26, 2008 at 09:05:06AM +0200, Barend Kobben wrote: FYI, the valid way to extend the GetCapabilities is to use the VendorSpecificCapabilities / element. (See the WMS spec on the OGC pages www.opengeospatial.org) And I'd rather use that, but as far as I know you can't set this from a Mapserver map file? Jochen International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] MapFile2XML conversion - WAS: mapObject serialization in C# (variant)
Hi Bob, YES, by all means do move to XML. I think this would be a very important step forward (and my first guess is it would be not too complicated, but you never know...). I do see how some might be attracted to having an DB storage too, but I would urge you to always have that as an alternative, not as instead-of: keep the main configuration mechanism (XML-)file based! In many use cases there's no need for a DB and that would mean you'd have tho have a DB plus all its hassle, only for the configuration part. Also the current file-base config is ideal in situations were many people need to work on the one MS, such as in our educational setup, where we have many students working on their own config files in their private dirs, and they don't need to touch the 'main' MS setup on the server. Actually, what are your reasons for preferring an SQL sdolution over the file based one...? -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6 7500AA Enschede, The Netherlands +31 (0)53 4874253 On 10-06-08 20:30, Bob Basques [EMAIL PROTECTED] wrote: All, We've been pondering some sort of alternative to the Mapfiles for a few years now. A preferable approach would be something that could be stored in a DB in some fashion for querying/assembly processes. It seems on the surface like a DB schema could be developed to handle the MapFile storage aspects. A first step would be in how to best approach moving into an XML way of life for the MapFiles. Would it make any sense in the beginning to just build a MapFile2XML convertor (I would imagine this would be needed before anyone would sign up for XML) and once something like this is a state close to production, the innards of MapServer would then be made to parse the XML directly? Another approach might be to do something like MapFile2SQL first, and then the MapFile2XML. This might save some time and seem like it would make standardization easier, since it would need to be inside of the DB fist. Has anyone tried putting together any requirements list along these lines at all? Is it going to be something where we just need to jump in and build something even if it might be a wrong approach to begin with? This thread just got me thinking is all . . .you know how dangerous that can be . . . :c) bobb Tamas Szekeres [EMAIL PROTECTED] wrote: Hi, MapServer currently doesn`t support any other persitence representation than the mapfiles. There have been some initial plans related to an XML format in this list, but no one had any motivation to implement that. So I think the best what you can do at the moment is to use reflection to access the properties along with some other members of the objects and serialize the values manually. Best regards, Tamas 2008/6/9 BrainDrain [EMAIL PROTECTED]: Is there any 'standart' fast(!) way/method to serialize (xml/json/other markup) mapObj in C#? I need it for using server mapObj as JSON on rich client app running on browser. Look at my method (using reflection): public static ListDictionary PartialSerialize(object instance, Stack callerTypes, Type[] excludeTypes) { ListDictionary result = new ListDictionary(); object val; callerTypes.Push(instance.GetType()); PropertyInfo[] pis = instance.GetType().GetProperties(); foreach (PropertyInfo pi in pis) { if (pi.PropertyType.IsSerializable !pi.PropertyType.IsArray) result[pi.Name] = pi.GetValue(instance, new object[0]); else { //preventing useless nesting if (!callerTypes.Contains(pi.PropertyType) !((IList)excludeTypes).Contains(pi.PropertyType)) { val = pi.GetValue(instance, new object[0]); if (val != null) result[pi.Name] = PartialSerialize(val, callerTypes, excludeTypes); } } } callerTypes.Pop(); return result; } ... So I can convert mapObj on serever to hashtable automatically an then populate JSON object (still need to call explicitly getLayer, getClass etc., but this is not a problem): ... layers[i].Properties = Tools.PartialSerialize(layer, new Stack(), new Type[3] { typeof(mapObj), typeof(hashTableObj), typeof(colorObj)}); ... classes[j].Properties = Tools.PartialSerialize(layerClass, new Stack(), new Type[4] { typeof(layerObj), typeof(labelObj), typeof(hashTableObj), typeof(colorObj)}); ... styles[k].Properties = Tools.PartialSerialize(classStyle, new Stack(), new Type[2]{typeof(hashTableObj), typeof(colorObj)}); ... mapStub.Properties = Tools.PartialSerialize(map, new Stack(), new Type[11] { typeof(labelObj), typeof(hashTableObj), typeof(fontSetObj),
Re: [mapserver-users] mapserver wms: srs problem
Hi, It looks like your mixing up several things that shouldn't be mixed: 1) http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapSE RVICE=WMSVERSION=1.1.1REQUEST=GetCapabilities ...is a valid WMS GetCapabilities request. It might result in a valid WMS response (although I cannot test this as I obviously do not have the same localhost as you...) However: http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapmo de=map ...is a non-WMS request, it uses the 'old' MapServer CGI mode, not the OGC standardised WMS interface. To get a map the WMS way you'd request something like: http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\wms.mapm; SERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=LAYERS=aLayerBBOX=1,2,3,4 SRS=EPSG:4326format=image/gif 2) next, you advertise your data to be in lat-lon on the WGS 84 (PROJECTION init=epsg:4326), but you proclaim the EXTENT of the data to be in meters or some other projected unit: EXTENT 184056.505 4809728.25 767381.245 5478975.75 This obviously are not lat-lon degrees (which have a max extent of -180,180,-90,90)... Now MS will be really confused! H, this client wants lat-lon data that stretches over the whole of the universe... :-) 3) you then advertise the WMS to be able to deliver data in a non-projected and a projected SRS: wms_srs EPSG:4326 EPSG:26915 Which is fine, but you do it again for the LAYER, which I think is superfluous. 4) You do NOT tell the WMS what SRS the data originally is in. There is no PROJECTION object in the LAYER, which in some case might lead to MapServer trying to find out for itself, BUT NOT in the Postgis case you have. A connection to PostGIS in itself needs to be told which projection to fetch the data in (because PosGIS can reproject if necessary). One of the ways of doing that is to make the DATA statement a bit more elaborate than the_geom from shp_state, instead use DATA the_geom from shp_state using unique your_primary_key using srid=26915 Hope this helps... -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6 7500AA Enschede, The Netherlands +31 (0)53 4874253 International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] insert png image in svg output
so there is no way to have in output an svg file with all the layer ? because if I understood Mapserver don't support svg file in input and according to the svg spec a png file is only linked by a svg file. You can put a PNG inline inside SVG, but I do not see how that would help you. I think the problem is that you use a Template, where the SVG gets inserted into the HTML as an IMG object. Although I think it works sometimes in some User Agents, that is not the correct way. Remember that an SVG 'picture' is a piece of XML to be interpreted, not a ratser image you can just render directly to screen. So, if used inside (X)HTML it should be embedded properly, eg. like: object data=sample.svgz type=image/svg+xml width=400 height=300 embed src=sample.svgz type=image/svg+xml width=400 height=300 / /object See http://wiki.svg.org/SVG_and_HTML for more possibilities and explanation. -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6 7500AA Enschede, The Netherlands +31 (0)53 4874253 International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Using SLD and WMS with data comming from postgres
Did you check the SLD TMP file problem (from the thread Re: SLD ignored / External Graphic ignored) see excerpt below)? ***snip*** Using SLDs is dependent on the correct setting of the two settings IMAGEPATH -- where the mapserver software puts the SLD and other temporary files IMAGEURL -- where the web browser and other http services pick them up. Setting these incorrectly, and more importantly their security setting incorrrectly, will normally give no problems, but when using SLDs (and also in other cases, eg. when chaining Mapserver to external WMS and WFS services), they will make MS malfunction, but SILENTLY (ie. No error messages). Eg. in our set ups of a WMS with external SLD they are set as follows: For a *nix setup ( MacOSX) with Mapserver CGI 'behind' Apache: WEB IMAGEPATH /Users/kobben/Sites/ms_tmp/ IMAGEURL http://localhost/~kobben/ms_tmp/; ## METADATA [all your web metadata...] END #metadata END #web For a Win box with Mapserver CGI 'behind' IIS: IMAGEPATH C:/tmp/ms_tmp/ IMAGEURL http://geoserver.itc.nl/ms_tmp/; The IMAGEPATh is a directory that is reacheable by Mapserver at this real location (in this case expressed as Unix BSD path on my MacOSX or as UNC path on Win) and that has read write access set for the Mapserver process. Eg. on the Winbox it should have write access for the anonymous system service account under which Mapserver runs (usually something like SERVERNAME\IWAM_SERVERNAME). You can test this by seeing if files with names like) are being created when you request the WMS with external SLD. If they are the IMAGEPATH celarly works. Then test if you can point a browser to the IMAGEURL and pick up the tmp file. If that worsk the IMAGEURL is also OK. Now it should work... Hope this helps. -- Barend Köbben International Institute for Geo-Information Sciences and Earth Observation (ITC) PO Box 6 7500AA Enschede, The Netherlands +31 (0)53 4874253 International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] SLD ignored / External Graphic ignored
Hi, I never tried the external SVG graphics, but the SLD problem sounds very familiar. Almost always I find this kind of problem having not much to do with the SLDs themselves, but with TMP file settings. This is certainly more likely if you say sending the SLD it in SLD-BODY works. Using SLDs is dependent on the correct setting of the two settings IMAGEPATH -- where the mapserver software puts the SLD and other temporary files IMAGEURL -- where the web browser and other http services pick them up. Setting these incorrectly, and more importantly their security setting incorrrectly, will normally give no problems, but when using SLDs (and also in other cases, eg. when chaining Mapserver to external WMS and WFS services), they will make MS malfunction, but SILENTLY (ie. No error messages). Eg. in our set ups of a WMS with external SLD they are set as follows: For a *nix setup ( MacOSX) with Mapserver CGI 'behind' Apache: WEB IMAGEPATH /Users/kobben/Sites/ms_tmp/ IMAGEURL http://localhost/~kobben/ms_tmp/; ## METADATA [all your web metadata...] END #metadata END #web For a Win box with Mapserver CGI 'behind' IIS: IMAGEPATH C:/tmp/ms_tmp/ IMAGEURL http://geoserver.itc.nl/ms_tmp/; The IMAGEPATh is a directory that is reacheable by Mapserver at this real location (in this case expressed as Unix BSD path on my MacOSX or as UNC path on Win) and that has read write access set for the Mapserver process. Eg. on the Winbox it should have write access for the anonymous system service account under which Mapserver runs (usually something like SERVERNAME\IWAM_SERVERNAME). You can test this by seeing if files with names like) are being created when you request the WMS with external SLD. If they are the IMAGEPATH celarly works. Then test if you can point a browser to the IMAGEURL and pick up the tmp file. If that worsk the IMAGEURL is also OK. Now it should work... Hope this helps. International Institute for Geo-Information Science and Earth Observation (ITC) Chamber of Commerce: 410 27 560 E-mail disclaimer The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users