Re: [mapserver-users] displaying 3-band images
Hi, are you sure your raster can be read by mapserver cgi? Maybe try adding the ON_MISSING_DATA config option at map file level to rule out this error: CONFIG ON_MISSING_DATA FAIL Also, I think IMAGEMODE is a parameter of the outputformat object not the layer object. Cheers, Michael 2010/12/8 David Hildebrand david.hildebr...@afsc.ca I have a TIFF image I want to display. The image is a 3-band 8-bit image. The server logs show no error but my display is coming out blank. I am using ms4w with GDAL support so I’m not sure what is going wrong here. A sample of the mapfile is shown below. I get a parsing error if I include IMAGEMODE “RGB” in the layer definition. Any suggestions? LAYER NAME awifs PROCESSING BANDS=3,2,1 PROCESSING SCALE=AUTO METADATA wms_title awifs wms_opaque 1 ows_resolution 56 56 wms_srs EPSG:43001 wms_extent -701344.000 -417256.000 803040.000 711368.000 wcs_srs EPSG:43001 wcs_extent -701344.000 -417256.000 803040.000 711368.000 END STATUS on TYPE raster DATA //Plcoressatsb01/AWiFS/initial_delivery/images/July.tif PROJECTION init=epsg:43001 END EXTENT -701344.000 -417256.000 803040.000 711368.000 UNITS meters END === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.ca* *http://www.afsc.ca* *This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. -- *From:* Brent Wood [mailto:pcr...@yahoo.com] *Sent:* Monday, December 06, 2010 4:37 PM *To:* David Hildebrand; Brent Fraser *Cc:* mapserver-users@lists.osgeo.org *Subject:* Re: [mapserver-users] street maps Sigh, Get the link right!! PDF summarising Bing/Google licelice issues http://victorianspatialcouncil.org/cms/library/attachments/VSC%20Guidance%20Note%201_TC%20Use%20of%20%20Google%20Maps%20and%20Bing%20Maps%20v1.0-May%202010.pdf Brent Wood --- On *Tue, 12/7/10, Brent Fraser bfra...@geoanalytic.com* wrote: From: Brent Fraser bfra...@geoanalytic.com Subject: Re: [mapserver-users] street maps To: David Hildebrand david.hildebr...@afsc.ca Cc: mapserver-users@lists.osgeo.org Date: Tuesday, December 7, 2010, 10:02 AM David, This thread may get you started with OpenStreetMap. Be sure to read Google's and Bing's Term Of Service. http://lists.osgeo.org/pipermail/mapserver-users/2010-July/066061.html Best Regards, Brent Fraser On 12/6/2010 12:18 PM, David Hildebrand wrote: I want to add a street map (OpenStreetMap, Google, Bing, etc.) as a WMS layer but I’m not sure which service to use and what the URL would be to try them out? My AOI is only about 10 by 10 degrees wide. Any suggestions? === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.ca* *http://www.afsc.ca* *This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://mc/compose?to=mapserver-us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -Inline Attachment Follows- ___ mapserver-users mailing list mapserver-users@lists.osgeo.orghttp://mc/compose?to=mapserver-us...@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 -- --- Michael Schulz msch...@webgis.de in medias res Gesellschaft für Informationstechnologie mbH Schwimmbadstraße 2 D-79100 Freiburg i. Br. Tel: +49 (0)761 705798-102 Tel: +49 (0)761 705798-0 Fax: +49 (0)761 705798-09 http://www.webgis.de / http://www.zopecms.de -- Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
[mapserver-users] Re: msPostGISLayerWhichShapes() error
I have a same problem! -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/msPostGISLayerWhichShapes-error-tp4543171p5814516.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] Re: How to add attributes to feature/shape with mapscript java?
Hi!, Finaly I found the way set the id of a feature, mapscript maps the last value set by setvalue with layer.setClassItem ,but I only can add a one attribute with layer.setFilteritem(itemName); // Features add for (Iterator iterator = sites.iterator(); iterator.hasNext();) { Site site = (Site) iterator.next(); shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM ); lineObj line = new lineObj(); // latlon source data pointObj point = new pointObj( site.getLatLonPosition().getX() , site.getLatLonPosition().getY() , 0); shape = point.toShape(); shape.initValues(2); shape.setValue(0, site.getId().toString() ); // ID layer.addFeature(shape ); } } layer.setClassitem(id); I think that the way to add many attributes is with layer.SetItems but isn't implemented in mapscript swig, I found in maplayer.c msLayerSetItems function, why setlayerItem is not appear in mapscript? /* ** A helper function to set the items to be retrieved with a particular shape. Unused at the moment but will be used ** from within MapScript. Should not need modification. */ int msLayerSetItems(layerObj *layer, char **items, int numitems) Another problem that I have is to reproject the data, It seems that there is a bug with reprojections in mapscript, if projection map and projection layer is not the same the reprojected coordinates aren't correct. Also if I try to reproject manualy the coordinates are wrong. I'm leaving something? projectionObj proj4326 = new projectionObj(EPSG:4326); projectionObj proj32631 = new projectionObj(EPSG:32631); point.project(proj4326, proj32631); thanks! 2010/12/6 rai 8 max1...@gmail.com Hi!, I trying to add features to a layer with mapscript in a WFS server, there isn't any method to set attributes directly to a feature or a shape. I found initValues and setValue to set value to a shape object but in a xml/gml response it doesn't appear. Anyone knows a way to do this? // add feature shapeObj shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM ); shape.initValues(8); lineObj line = new lineObj(); pointObj point = new pointObj(2.160690, 41.479881, 1); line.add(point); shape.add( line); shape.setValue(0, attr1); shape.setValue(1, attr2); System.out.println( shape.getValue(0) + + shape.getValue(1) + + shape.getValue(2) ); layer.addFeature(shape ); shape = new shapeObj( mapscriptConstants.MS_SHP_POINTM ); line = new lineObj(); point = new pointObj(2.17, 41.48, 1); line.add(point); shape.add( line); layer.addFeature(shape ); Another workaround I found is generated a dbf file with all features and attributes that I want and then load a mapfile pointing to this dbf file, but this is inefficient. thanks! ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver crashes with large number of layers
Dear List, we're kind of stuck with the following problem: First of all we are running Mapserver 5.6.5 in CGI Mode on Windows 2003 Server (64bit). Webserver is Apache 2.2. We have a large Mapfile (seperated into 5 different parts using INCLUDE) with a total of 571 Layers. The layers have different MAXSCALEDENOM values so not all of them are drawn at all scales. The layers are referencing the DATA via TILEINDEX (it's S-57 data read through OGR). Most of the layers cover only a small area, so if I zoom in to the map more and more layers must be taken into account of drawing but only a small number must be drawn. All of the layers are divided into three groups using the GROUP parameter. What happens if I zoom in to the map at some point mapserver crashes (actually it's not crashing it just stucks). If I reduce the total number of layers (by commenting out parts of the mapfile) the map will be drawn again. So my guess is that there is a problem with the number of layers (or styles?, or symbols?, or number of layers per group?) included. I turned on debugging on all of my layers but that didn't helped. If I check the taskmanager mapserver.exe goes to 100% cpu usage and goes back to zero after a few seconds but it's not being terminated. It's still running in the process list. Debug output stops right in the middle of the line. No error message is send to the client or written to any of the logfiles. Actually no response is send to the client at all. If I terminate the process using the task manager Premature end of script headers: mapserv.exe is written to the apache error.log and the client shows Internal Server Error. Right know we have no idea of what to look at. If anybody has any hint what might goes wrong we maybe would be able to look at it and maybe fix it. But right now we're stuck. Best regards, Oliver ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver crashes with large number of layers
Dear List, we're kind of stuck with the following problem: First of all we are running Mapserver 5.6.5 in CGI Mode on Windows 2003 Server (64bit). Hi, I would first try to run it in FastCGI. We also found running PHP (if you are using MS4W for instance) in FastCGI helps. Webserver is Apache 2.2. We have a large Mapfile (seperated into 5 different parts using INCLUDE) with a total of 571 Layers. Try to keep separate mapfiles. The shorter they are the better. We also found putting STATUS OFF helps. The layers have different MAXSCALEDENOM values so not all of them are drawn at all scales. The layers are referencing the DATA via TILEINDEX (it's S-57 data read through OGR). Most of the layers cover only a small area, so if I zoom in to the map more and more layers must be taken into account of drawing but only a small number must be drawn. All of the layers are divided into three groups using the GROUP parameter. What happens if I zoom in to the map at some point mapserver crashes (actually it's not crashing it just stucks). If I reduce the total number of layers (by commenting out parts of the mapfile) the map will be drawn again. So my guess is that there is a problem with the number of layers (or styles?, or symbols?, or number of layers per group?) included. Keep mapfiles small is what we found was most useful. I turned on debugging on all of my layers but that didn't helped. If I check the taskmanager mapserver.exe goes to 100% cpu usage and goes back to zero after a few seconds but it's not being terminated. It's still running in the process list. Debug output stops right in the middle of the line. No error message is send to the client or written to any of the logfiles. Actually no response is send to the client at all. If I terminate the process using the task manager Premature end of script headers: mapserv.exe is written to the apache error.log and the client shows Internal Server Error. I've had premature end os script headers from time to time. I have no idea what triggers that. HTH, Yves ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] hiding / combining layers in a wms service
I am trying to combine several layers into a single layer for a wms server while using the wms_layer_group option. I have resampled my source tifs so that is displayed based resolutions and map scale to hopefully improve performance. The drawback to this is that clients see all layers. Is there a way to group all layers into one while keeping the hierarchy that is created with the wms_layer_group. # Waterloo LAYER NAME waterloo_2006_10km_wms TILEINDEX waterloo_2006_10km_wms_tindex MAXSCALE 1800 MINSCALE 4 METADATA wms_layer_group /Ontario/Waterloo Region/Waterloo Region 2006 wms_title Waterloo 2006 Low Resolution wms_extent 50 479 569998 4840001 wms_abstract Imagery from the spring of 2006. Maximum resolution 30cm. END PROJECTION init=epsg:26917 END TYPE RASTER STATUS OFF OFFSITE 0 0 0 PROCESSING RESAMPLE=BILINEAR END LAYER NAME waterloo_2006_5km_wms TILEINDEX waterloo_2006_5km_wms_tindex MAXSCALE 4 MINSCALE 7500 METADATA wms_layer_group /Ontario/Waterloo Region/Waterloo Region 2006 wms_title Waterloo 2006 Medium Resolution wms_extent 50 479 569998 4840001 wms_abstract Imagery from the spring of 2006. Maximum resolution 30cm. END PROJECTION init=epsg:26917 END TYPE RASTER STATUS OFF OFFSITE 0 0 0 PROCESSING RESAMPLE=BILINEAR END LAYER NAME waterloo_2006_1km_wms TILEINDEX waterloo_2006_1km_wms_tindex MAXSCALE 7500 METADATA wms_layer_group /Ontario/Waterloo Region/Waterloo Region 2006 wms_title Waterloo 2006 High Resolution wms_extent 50 479 569998 4840001 wms_abstract Imagery from the spring of 2006. Maximum resolution 30cm. END PROJECTION init=epsg:26917 END TYPE RASTER STATUS OFF OFFSITE 0 0 0 PROCESSING RESAMPLE=BILINEAR END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] displaying 3-band images
Michael: I inserted the following lines in my map file. CONFIG MS_ERRORFILE stdout DEBUG 5 CONFIG CPL_DEBUG ON CONFIG PROJ_DEBUG ON CONFIG ON_MISSING_DATA FAIL However, the behavior is the same and I get no additional messages. However, the following message shows up in the apache error file. GDAL: GDALDeregister_GTiff() called.\r My mapserver (ms4w) has been built with GDAL support because mapserv -v gives me the following. MapServer version 5.3-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I'm wondering if there is a problem in GDAL reading the projection information because using gdalinfo on the source file gives me the following in the output. Coordinate System is: LOCAL_CS[] Yet, when I add the correct projection information using gdal_translate -a_srs ... ArcView comes up with a blank image. Any clues? === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.ca about:www.afsc.ca http://www.afsc.ca http://www.afsc.ca/ This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. _ From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Michael Schulz Sent: Wednesday, December 08, 2010 1:20 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] displaying 3-band images Hi, are you sure your raster can be read by mapserver cgi? Maybe try adding the ON_MISSING_DATA config option at map file level to rule out this error: CONFIG ON_MISSING_DATA FAIL Also, I think IMAGEMODE is a parameter of the outputformat object not the layer object. Cheers, Michael 2010/12/8 David Hildebrand david.hildebr...@afsc.ca I have a TIFF image I want to display. The image is a 3-band 8-bit image. The server logs show no error but my display is coming out blank. I am using ms4w with GDAL support so I'm not sure what is going wrong here. A sample of the mapfile is shown below. I get a parsing error if I include IMAGEMODE RGB in the layer definition. Any suggestions? LAYER NAME awifs PROCESSING BANDS=3,2,1 PROCESSING SCALE=AUTO METADATA wms_title awifs wms_opaque 1 ows_resolution 56 56 wms_srs EPSG:43001 wms_extent -701344.000 -417256.000 803040.000 711368.000 wcs_srs EPSG:43001 wcs_extent -701344.000 -417256.000 803040.000 711368.000 END STATUS on TYPE raster DATA //Plcoressatsb01/AWiFS/initial_delivery/images/July.tif PROJECTION init=epsg:43001 END EXTENT -701344.000 -417256.000 803040.000 711368.000 UNITS meters END === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.ca http://www.afsc.ca http://www.afsc.ca/ This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. _ From: Brent Wood [mailto:pcr...@yahoo.com] Sent: Monday, December 06, 2010 4:37 PM To: David Hildebrand; Brent Fraser Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] street maps Sigh, Get the link right!! PDF summarising Bing/Google licelice issues http://victorianspatialcouncil.org/cms/library/attachments/VSC%20Guidance%20Note%201_TC%20Use%20of%20%20Google%20Maps%20and%20Bing%20Maps%20v1.0-May%202010.pdf Brent Wood --- On Tue, 12/7/10, Brent Fraser bfra...@geoanalytic.com wrote: From: Brent Fraser bfra...@geoanalytic.com Subject: Re: [mapserver-users] street maps To: David Hildebrand david.hildebr...@afsc.ca Cc: mapserver-users@lists.osgeo.org Date: Tuesday, December 7, 2010, 10:02 AM David, This thread may get you started with OpenStreetMap. Be sure to read Google's and Bing's Term Of Service. http://lists.osgeo.org/pipermail/mapserver-users/2010-July/066061.html
Re: [mapserver-users] Mapserver crashes with large number of layers
Hello, thanks for your help. Like you recommended I tried the request through the commandline hoping for some kind of new error messages. Instead the request just did what it should und returned the png without any error. So it works through commandline and crashes through cgi. I also made a test on a 32bit machine and it shows the same behaviour. And indeed we build mapserver by ourself but we can replicate the problem with the binary from MS4W. Best regards, Oliver 2010/12/8 Jeff McKenna jmcke...@gatewaygeomatics.com: Hello, I can give you the steps that I would do in this situation: - test this on a different machine - test on a 32bit machine - test on a Linux machine - if you build mapserv yourself, test with a binary/package (MS4W, FGS) and see if you can replicate the problem - convert your layers to shapefiles and retest (in other words see if avoiding using OGR helps at all) - get the exact CGI query string that causes problems in your browser and then try that same command through the commandline (examples at: http://www.mapserver.org/cgi/mapserv.html)...actually I would try that test first (because an error might be shown at the commandline, that is not displayed through the browser) - test with one big mapfile (avoid using includes just to see if that is the issue) - it might be an issue with tileindex on a layer...so if possible test without using a tileindex - but really, the best test is to start reducing the number of layers until you find the minimum number of layers that still cause the problem..then focus your testing on those few layers that are causing troubles (I often do this, and yes it takes time) Those are my initial thoughts. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 10-12-08 10:58 AM, Oliver Wesp wrote: Dear List, we're kind of stuck with the following problem: First of all we are running Mapserver 5.6.5 in CGI Mode on Windows 2003 Server (64bit). Webserver is Apache 2.2. We have a large Mapfile (seperated into 5 different parts using INCLUDE) with a total of 571 Layers. The layers have different MAXSCALEDENOM values so not all of them are drawn at all scales. The layers are referencing the DATA via TILEINDEX (it's S-57 data read through OGR). Most of the layers cover only a small area, so if I zoom in to the map more and more layers must be taken into account of drawing but only a small number must be drawn. All of the layers are divided into three groups using the GROUP parameter. What happens if I zoom in to the map at some point mapserver crashes (actually it's not crashing it just stucks). If I reduce the total number of layers (by commenting out parts of the mapfile) the map will be drawn again. So my guess is that there is a problem with the number of layers (or styles?, or symbols?, or number of layers per group?) included. I turned on debugging on all of my layers but that didn't helped. If I check the taskmanager mapserver.exe goes to 100% cpu usage and goes back to zero after a few seconds but it's not being terminated. It's still running in the process list. Debug output stops right in the middle of the line. No error message is send to the client or written to any of the logfiles. Actually no response is send to the client at all. If I terminate the process using the task manager Premature end of script headers: mapserv.exe is written to the apache error.log and the client shows Internal Server Error. Right know we have no idea of what to look at. If anybody has any hint what might goes wrong we maybe would be able to look at it and maybe fix it. But right now we're stuck. ___ 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] displaying 3-band images
Hi, What does gdalinfo tell about your image? -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: David Hildebrand Lähetetty: ke 8.12.2010 21:33 Vastaanottaja: Michael Schulz; mapserver-users@lists.osgeo.org Aihe: RE: [mapserver-users] displaying 3-band images Michael: I inserted the following lines in my map file. CONFIG MS_ERRORFILE stdout DEBUG 5 CONFIG CPL_DEBUG ON CONFIG PROJ_DEBUG ON CONFIG ON_MISSING_DATA FAIL However, the behavior is the same and I get no additional messages. However, the following message shows up in the apache error file. GDAL: GDALDeregister_GTiff() called.\r My mapserver (ms4w) has been built with GDAL support because mapserv -v gives me the following. MapServer version 5.3-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE I'm wondering if there is a problem in GDAL reading the projection information because using gdalinfo on the source file gives me the following in the output. Coordinate System is: LOCAL_CS[] Yet, when I add the correct projection information using gdal_translate -a_srs ... ArcView comes up with a blank image. Any clues? === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.ca about:www.afsc.ca http://www.afsc.ca http://www.afsc.ca/ This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. _ From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Michael Schulz Sent: Wednesday, December 08, 2010 1:20 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] displaying 3-band images Hi, are you sure your raster can be read by mapserver cgi? Maybe try adding the ON_MISSING_DATA config option at map file level to rule out this error: CONFIG ON_MISSING_DATA FAIL Also, I think IMAGEMODE is a parameter of the outputformat object not the layer object. Cheers, Michael 2010/12/8 David Hildebrand david.hildebr...@afsc.ca I have a TIFF image I want to display. The image is a 3-band 8-bit image. The server logs show no error but my display is coming out blank. I am using ms4w with GDAL support so I'm not sure what is going wrong here. A sample of the mapfile is shown below. I get a parsing error if I include IMAGEMODE RGB in the layer definition. Any suggestions? LAYER NAME awifs PROCESSING BANDS=3,2,1 PROCESSING SCALE=AUTO METADATA wms_title awifs wms_opaque 1 ows_resolution 56 56 wms_srs EPSG:43001 wms_extent -701344.000 -417256.000 803040.000 711368.000 wcs_srs EPSG:43001 wcs_extent -701344.000 -417256.000 803040.000 711368.000 END STATUS on TYPE raster DATA //Plcoressatsb01/AWiFS/initial_delivery/images/July.tif PROJECTION init=epsg:43001 END EXTENT -701344.000 -417256.000 803040.000 711368.000 UNITS meters END === David V. Hildebrand Agriculture Financial Services Corporation (403) 782-8239 www.afsc.ca http://www.afsc.ca http://www.afsc.ca/ This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and/or privileged information. Please contact Agriculture Financial Services Corporation immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed. Please consider the environment before printing this email. _ From: Brent Wood [mailto:pcr...@yahoo.com] Sent: Monday, December 06, 2010 4:37 PM To: David Hildebrand; Brent Fraser Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] street maps Sigh, Get the link right!! PDF summarising Bing/Google licelice issues http://victorianspatialcouncil.org/cms/library/attachments/VSC%20Guidance%20Note%201_TC%20Use%20of%20%20Google%20Maps%20and%20Bing%20Maps%20v1.0-May%202010.pdf Brent Wood --- On Tue, 12/7/10, Brent Fraser bfra...@geoanalytic.com wrote: From: Brent Fraser bfra...@geoanalytic.com Subject: Re: [mapserver-users]
Re: [mapserver-users] Mapserver crashes with large number of layers
On Wed, Dec 8, 2010 at 3:58 PM, Oliver Wesp oliver.w...@gmail.com wrote: Dear List, we're kind of stuck with the following problem: First of all we are running Mapserver 5.6.5 in CGI Mode on Windows 2003 Server (64bit). Webserver is Apache 2.2. We have a large Mapfile (seperated into 5 different parts using INCLUDE) with a total of 571 Layers. The layers have different MAXSCALEDENOM values so not all of them are drawn at all scales. The layers are referencing the DATA via TILEINDEX (it's S-57 data read through OGR). Most of the layers cover only a small area, so if I zoom in to the map more and more layers must be taken into account of drawing but only a small number must be drawn. All of the layers are divided into three groups using the GROUP parameter. What happens if I zoom in to the map at some point mapserver crashes (actually it's not crashing it just stucks). If I reduce the total number of layers (by commenting out parts of the mapfile) the map will be drawn again. So my guess is that there is a problem with the number of layers (or styles?, or symbols?, or number of layers per group?) included. I turned on debugging on all of my layers but that didn't helped. If I check the taskmanager mapserver.exe goes to 100% cpu usage and goes back to zero after a few seconds but it's not being terminated. It's still running in the process list. Debug output stops right in the middle of the line. No error message is send to the client or written to any of the logfiles. Actually no response is send to the client at Looks like a deadlock to me. If you have msvc on the machine try to attach the debugger to the process and see where it's stuck by requesting a stacktrace for example. If msvc is not available I'd try ProcessMonitor from sysinternals and last but not least good ole gdb (yes it does run on Windows). Recompile mapserver with debugging symbols to get accurate function names and line numbers from the debugger. Last step: verify that the mapserv process ran by apache is not loading different dlls from the command line you used to test it. HTH, Umberto all. If I terminate the process using the task manager Premature end of script headers: mapserv.exe is written to the apache error.log and the client shows Internal Server Error. Right know we have no idea of what to look at. If anybody has any hint what might goes wrong we maybe would be able to look at it and maybe fix it. But right now we're stuck. Best regards, Oliver ___ 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] MSXML2.ServerXMLHTTP - POST not GET - OpenLayers/Mapserver WFS
Apologies for cross-posting on two lists but I'm not sure who may be better placed to answer this one. Basically, the setup is MapServer and OpenLayers. I have two pages, both are exactly the same with the exception that one calls mapserver on Port 81 (Apache) and the other calls Mapserver on Port 81 via an asp page using MSXML2.ServerXMLHTTP to hide the mapfile string and its location. This method is documented here: http://mapserver.org/ogc/wms_server.html (3.On IIS servers (Windows), you can use the following ASP script . etc). OpenLayers.Layer.WFS works fine on both setups as this uses GET requests but this will be deprecated in version 3, see here: http://dev.openlayers.org/docs/files/OpenLayers/Layer/WFS-js.html. I am trying to port the setup so that it uses OpenLayers.Layer.Vector with OpenLayers.Protocol.WFS which uses POST as opposed to GET. This works fine with the setup that calls Apache directly on port 81 but does not work using MSXML2.ServerXMLHTTP in the asp page. When I say that it works fine with Apache, it returns valid GML but there's no geometry which, I believe, is sorted in MapServer 5.6.4 - I am using 5.6.3 in the latest MS4W package. The method using MSXML2.ServerXMLHTTP (see the first link above) converts everything to GET but I have changed the code to use post as follows: = Set xmlhttp = Server.CreateObject(MSXML2.ServerXMLHTTP) Select Case Request.ServerVariables(REQUEST_METHOD) Case GET strRequest = Request.QueryString MapserverUrl = urlmapserv.exe?MAP=map file.map strRequest xmlhttp.open GET, MapServerURL, False xmlhttp.send ' Case POST strRequest = Request.Form MapserverUrl = urlmapserv.exe?MAP=map file xmlhttp.Open POST, MapserverUrl, False Set SendDoc = server.createobject(Microsoft.XMLDOM) SendDoc.ValidateOnParse= True SendDoc.LoadXML(strRequest) 'Various header types (All tried at different times) 'xmlhttp.setRequestHeader Content-Type, application/x-www-form-urlencoded 'xmlhttp.setRequestHeader Content-Type, application/xml //OpenLayers 'xmlhttp.setRequestHeader Content-Type,text/xml 'Two ways of sending xml (Both tried) 'xmlhttp.send strRequest xmlhttp.send Sendoc End Select Response.ContentType = xmlhttp.getResponseHeader(content-type) Response.BinaryWrite xmlhttp.responseBody Set xmlhttp = Nothing = I have tried everything I can think of including setting a variable that contains the xml within the code above, i.e. it isn't sent from the html page with the map, to no avail. The closest I can get to it working is a response (as shown in Firebug) as follows: = ?xml version='1.0' encoding=ISO-8859-1 ? ServiceExceptionReport version=1.2.0 xmlns=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd; ServiceException code=InvalidParameterValue locator=filter msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : lt;filter ogc=quot;http://www.opengis.net/ogcquot;gt; lt;bboxgt; lt;propertynamegt;msGeometrylt;/propertynamegt; lt;box gml=quot;http://www.opengis.net/gmlquot; srsName=quot;EPSG:27700quot;gt; lt;coordinates decimal=quot;.quot; cs=quot;,quot; ts=quot; quot;gt;256643.52324254,664529.16740962 260422.47675746,667280.83259038lt;/coordinatesgt; lt;/boxgt; lt;/bboxgt; lt;/filtergt; /ServiceException /ServiceExceptionReport = The above is using a variable (that contains xml) in the asp file and not the Request.Form in the code above. I also get the following when using the Request.Form from the map page: = ?xml version='1.0' encoding=ISO-8859-1 ? ServiceExceptionReport version=1.2.0 xmlns=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/ogc http://schemas.opengis.net/wcs/1.0.0/OGC-exception.xsd; ServiceExceptionmsWCSParseRequest(): WCS server error. WCS Server does not support XML POST requests, please use KVP. /ServiceException /ServiceExceptionReport = What I want to get using MSXML2.ServerXMLHTTP is the same response as I get using the method that calls MapServer on port 81 i.e. I should get valid GML without the geometry. OpenLayers uses MSXML2.ServerXMLHTTP for the POST and all I am really trying to do is pass that request through another