Re: [mapserver-users] windows 2008 server
We've installed mapserver (CGI mode only, using IIS7's FastCGI module) onto Windows Server 2008 x64 with no issues. -Dan Walton GIS Fire Tools http://gisfiretools.com On Tue, Jan 19, 2010 at 1:25 PM, steve.tout...@inspq.qc.ca wrote: Hi, My IT service wants to install windows 2008 server on my server. Does MapServer work on this platform? Is there known issues? thanks in advance Steve ___ 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] Error configuring WMS app : Projection library error. Invalid argument...
Stella, Try adding a config entry to your mapfile that points to the folder containing your epsg configuration file: MAP ... CONFIG PROJ_LIB C:/somedir/proj/nad/ ... END Dan Walton dgwal...@gmail.com [image: Linkedin] http://www.linkedin.com/in/danielwalton2010[image: Twitter] http://twitter.com/danwallie On Tue, Jan 5, 2010 at 9:56 AM, stela anders stelaand...@gmail.com wrote: Hello Frank! Thanks for your time ;) I´m working on Windows 7... I made all modifications you suggest me, but got the same error... The URL now is : http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.mapLAYERS=ArgentinaTRANSPARENT=trueFORMAT=image/pngSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG:4326BBOX=-62.9142,-17.3676,-57.2892,-11.7426WIDTH=256HEIGHT=256 The only difference that I noticed is that the error in browser now is in TEXT format... Before the error was write in a Image... I´m completely lost ! :( Any other idea? ps.: Sorry for my bad english Stella 2010/1/5 Frank Warmerdam warmer...@pobox.com stela anders wrote: LAYER NAME Argentina METADATA wms_titleArgentina ##required END TYPE POLYGON STATUS ON INCLUDE Connection.mapDATA the_geom from tbl_argentina USING UNIQUE gid USING SRID=0 PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs END CLASS COLOR 255 200 255 END END END When I try to open that with my OpenLayer app, I got images with that error : Error: msProcessProjection(): /Projection library error/. /Invalid argument Stella, I am not sure why you are getting this error. I search high and low and can't find Invalid argument in either MapServer or PROJ.4. Are you working on linux or Windows? Were the / characters really in this message? It is hard for me to understand how this could happen. With regard to your mapfile, I was surprised that you don't have wms_srs metadata on your layer. It is a shot in the dark, but perhaps you could add wms_srs EPSG:4326 metadata on the layer, and reorder the wms_srs metadata on the map to put EPSG:4326 first. Also, you could try changing: PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs END to: PROJECTION +init=epsg:4326 END in both the layer and map. This is slower to expand but it might make it easier for mapserver to relate to epsg codes. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdamhttp://pobox.com/%7Ewarmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ 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] Mapserver WMS under IIS 7 x64 serving up blank images
I figured out what was going on. It was an easting-northing mixup in the map and layer extents. Apparently earlier versions of mapserver/mapscript tolerated the bug. Anyway it's all working now under Windows Server 2008 x64 and IIS 7 FastCGI. A big thanks to the mapserver community. Open source rocks! Regards, Dan Walton GIS Fire Tools http://gisfiretools.com On Mon, Dec 7, 2009 at 4:25 PM, Daniel Walton dgwal...@gmail.com wrote: Tamas, Thanks for the tip. I used process monitor and everything looks OK in the permissions department. I think the problem relates to the fact that mapserver doesn't calculate an overlap between map and layer. I'm not sure what would cause this. -Dan On Mon, Dec 7, 2009 at 3:22 PM, Tamas Szekeres szeker...@gmail.comwrote: Daniel, This may also be an issue if GDAL couldn't actually open this file bacause of any reason (permission?). Make sure about this, by using a file monitoring tool, like SysInternals filemon for instance. Best regards, Tamas 2009/12/7 Steve Lime steve.l...@state.mn.us If I take the request out of WMS context to straight CGI with this request: http://www.fireimagery.com/ms/mapserv.exe?map=C :\maps\A091207074551.mapmode=mapmapsize=300+300layer=ZZ I get the following error: msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'. msDrawRaster(): Image handling error. Unrecognized or unsupported image format drawEPP(): Image handling error. EPPL7 support is not available. Typically you'll see that when GDAL failed to identify the filetype. EPPL7 is the last thing checked so that's not relevant by itself. I guess I'd start by making sure the image is valid. Steve On 12/7/2009 at 2:47 PM, in message 8ab83e650912071247w7b93cb8bt90fe0c6a7a460...@mail.gmail.com, Daniel Walton dgwal...@gmail.com wrote: Thanks Daniel. No dice, though, log is empty. On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette dmorisse...@mapgears.comwrote: Daniel Walton wrote: Yes, the same mapfile worked under MS4W on a 32-bit machine. I have verified that this same problem occurs using the x86 binaries from Tamas' site run in the current x64 environment. The source image is in PNG format in order to make transparency work well on the client. (My client is Silverlight-based, and PNG is the only supported format that supports transparency). The source image does have a world (*.WLD) file which contains these values (file is generated by running gdal_translate on a geotiff image): Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log output, if you haven't tried that already. -- Daniel Morissette http://www.mapgears.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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank images
Thanks to all who've been helping me along. I'm getting close to having x64 working now. I've worked through a slew of issues over the weekend, most related to permissions. My latest issue is that mapserv.exe, when invoked via IIS 7's FastCGI (classic mode) module, is returning blank images. GetCapabilities is working fine, and the GetMap images are the right size and format, but they're blank. Here's my setup: I downloaded and installed the x64 binaries (from Tamas, thanks!) into a single directory (C :\mapserver\). The IIS impersonated user has sufficient privileges on this folder and all data folders. I am accessing mapserver's WMS service with this URL: http://www.fireimagery.com/ms/mapserv.exe?map=C%3A%2Fmaps%2FA091207074551.mapSERVICE=WMSREQUEST=GetMapWIDTH=1680HEIGHT=536FORMAT=image/pngLAYERS=ZZS0TYLE=BGCOLOR=0x88TRANSPARENT=FALSEVERSION=1.3.0CRS=EPSG:4326BBOX=36.0156802563091,-123.307040153269,37.2036688809148,-119.583493717938EXCEPTIONS=XML The corresponding mapfile text is as follows: MAP EXTENT 36.0992948502284 -121.822480778145 36.3421121497716 -121.520865221855 IMAGECOLOR 255 255 255 IMAGETYPE PNG SIZE -1 -1 STATUS ON UNITS DD CONFIG PROJ_LIB C:/mapserver/ NAME A091207074551 OUTPUTFORMAT NAME aggpng24 MIMETYPE image/png DRIVER AGG/PNG EXTENSION PNG IMAGEMODE RGBA TRANSPARENT TRUE END PROJECTION init=epsg:4326 END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS OFF STYLE HILITE END WEB IMAGEPATH IMAGEURL METADATA wms_titleA091207074551 END QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER DATA C:\rawimages\A091207074551_output\A091207074551_0_config_PROCESS_RESULTS\BASINCOMPLEX_ftp.coloradoskye.com_2008_CA_Siege_080627_1200Local_SPOT_NIR_OUT.PNG EXTENT 36.0992948502284 -121.822480778145 36.3421121497716 -121.520865221855 METADATA wms_srsEPSG:4326 wms_extent36.1 -121.8 36.3 -121.5 wms_title BASINCOMPLEX_FTP.COLORADOSKYE.COM_2008_CA_SIEGE_080627_1200LOCAL_SPOT_NIR END NAME ZZ PROJECTION init=epsg:4326 END STATUS ON TYPE RASTER UNITS DD END END I have tried several different image formats and drivers, all produce blank images. Any ideas what might be wrong? Any way to set up more helpful error trapping? Thanks, Dan Walton GIS Fire Tools http://gisfiretools.com On Sun, Dec 6, 2009 at 4:04 PM, Tamas Szekeres szeker...@gmail.com wrote: Daniel, In bin/gdal/apps you can find the generic gdal/ogr applications, whereas the applications in bin/gdal/csharp have been implemented by using the gdal c# API. gdalinfo.exe and ogrinfo.exe provides similar functionalities in both cases. Best regards, Tamas 2009/12/6 Daniel Walton dgwal...@gmail.com Tamas, In your binary distibutions there are 2 versions of gdalinfo.exe and ogrinfo.exe, one in bin/gdal/apps and the other in bin/gdal/csharp. What is the difference between the two versions? -Dan On Sat, Dec 5, 2009 at 3:31 AM, Tamas Szekeres szeker...@gmail.comwrote: Have you configured mapping the .exe extension to this mapserv.exe with your IIS application? Make sure to enable CGI mode and copy all the x64 dll-s to the same directory as the mapserv.exe application. Set up the executing permissions to something like 'Scripts and Executables' Best regards, Tamas 2009/12/5 Daniel Walton dgwal...@gmail.com Tamas, Update: I removed the CGI mapping and just used the default CGI hander in IIS. Now the request returns a file named mapserv.exe. I attached it as a text file. Again, thanks for any insights. -Dan On Fri, Dec 4, 2009 at 9:14 PM, Daniel Walton dgwal...@gmail.comwrote: Tamas, I installed the binaries from your website into c:\mapserver, added all the paths to the system path variable, and set up the IIS folders. Now I get a 500 internal error when trying to access mapserv.exe. The application log gives this error: *Faulting application mapserv.exe, version 0.0.0.0, time stamp 0x4b1893cb, faulting module libmap.dll, version 6.0.6001.18000, time stamp 0x4791adec, exception code 0xc135, fault offset 0x000b1188, process id 0x4bc, application start time 0x01ca7557ca56f442.* Any idea what I'm doing wrong? Thanks, Dan On Fri, Dec 4, 2009 at 2:22 PM, Tamas Szekeres szeker...@gmail.comwrote: I've mostly used this with IIS6,but it should however work on IIS7 as well. On IIS6 I configure a web server extensions to mapserv.exe (CGI mode) and fcgiext.dll (for FastCGI). Set up the executing permission (Scripts and Executables) and the application extension mapping (.exe) to mapserv.exe or fcgiext.dll. Best regards, Tamas 2009/12/4 Daniel Walton dgwal...@gmail.com Tamas, That's exactly what I was hoping you'd say! Which IIS module mapping should I use for *.exe? On Fri, Dec 4, 2009 at 1:55 PM, Tamas Szekeres szeker
Re: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank images
Daniel, Yes, the same mapfile worked under MS4W on a 32-bit machine. I have verified that this same problem occurs using the x86 binaries from Tamas' site run in the current x64 environment. The source image is in PNG format in order to make transparency work well on the client. (My client is Silverlight-based, and PNG is the only supported format that supports transparency). The source image does have a world (*.WLD) file which contains these values (file is generated by running gdal_translate on a geotiff image): 0.0002148680 0.00 0.00 -0.0002148680 -121.7870074149 36.3421302860 Thanks, Dan On Mon, Dec 7, 2009 at 2:09 PM, Daniel Morissette dmorisse...@mapgears.comwrote: Daniel Walton wrote: Thanks to all who've been helping me along. I'm getting close to having x64 working now. I've worked through a slew of issues over the weekend, most related to permissions. My latest issue is that mapserv.exe, when invoked via IIS 7's FastCGI (classic mode) module, is returning blank images. GetCapabilities is working fine, and the GetMap images are the right size and format, but they're blank. Here's my setup: I downloaded and installed the x64 binaries (from Tamas, thanks!) into a single directory (C :\mapserver\). Why do you think the problems are related to IIS7/x64? Have you verified that the same mapfile produces valid maps under MS4W or another server environment? LAYER DATA C:\rawimages\A091207074551_output\A091207074551_0_config_PROCESS_RESULTS\BASINCOMPLEX_ftp.coloradoskye.com_2008_CA_Siege_080627_1200Local_SPOT_NIR_OUT.PNG EXTENT 36.0992948502284 -121.822480778145 36.3421121497716 -121.520865221855 Your DATA statement points to a PNG file. PNGs do not carry any georeferencing information by default, and the EXTENT line is not a replacement for missing image referencing info. Did you create a world file (.wld) for your PNG to specify the geographical extents of the image? That could very well explain the blank map. See: http://mapserver.org/input/raster.html#georeference-with-world-files Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank images
Thanks Daniel. No dice, though, log is empty. On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette dmorisse...@mapgears.comwrote: Daniel Walton wrote: Yes, the same mapfile worked under MS4W on a 32-bit machine. I have verified that this same problem occurs using the x86 binaries from Tamas' site run in the current x64 environment. The source image is in PNG format in order to make transparency work well on the client. (My client is Silverlight-based, and PNG is the only supported format that supports transparency). The source image does have a world (*.WLD) file which contains these values (file is generated by running gdal_translate on a geotiff image): Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log output, if you haven't tried that already. -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank images
Layer YY now references the GeoTIFF, same problem. http://www.fireimagery.com/ms/mapserv.exe?map=C:\maps\A091207074551.mapmode=mapmapsize=150+150layer=YYhttp://www.fireimagery.com/ms/mapserv.exe?map=C:%5Cmaps%5CA091207074551.mapmode=mapmapsize=150+150layer=YY Here is the error file content from this request: [Mon Dec 07 16:03:32 2009].406000 CGI Request 4 on process 2508 [Mon Dec 07 16:03:32 2009].406000 msWMSLoadGetMapParams(): enabling non-square pixels. [Mon Dec 07 16:03:32 2009].406000 msDrawMap(): kicking into non-square pixel preserving mode. [Mon Dec 07 16:03:32 2009].406000 msLayerIsVisible(): Skipping layer (YY) because LAYER.EXTENT does not intersect MAP.EXTENT [Mon Dec 07 16:03:32 2009].406000 msLayerIsVisible(): Skipping layer (YY) because LAYER.EXTENT does not intersect MAP.EXTENT [Mon Dec 07 16:03:32 2009].406000 msDrawMap(): Drawing Label Cache, 0.000s [Mon Dec 07 16:03:32 2009].406000 msDrawMap() total time: 0.000s [Mon Dec 07 16:03:32 2009].531000 msSaveImage() total time: 0.125s [Mon Dec 07 16:03:32 2009].531000 mapserv request processing time (msLoadMap not incl.): 0.125s [Mon Dec 07 16:03:32 2009].531000 msFreeMap(): freeing map at 017CFFB0. [Mon Dec 07 16:03:32 2009].531000 freeLayer(): freeing layer at 03240D60. [Mon Dec 07 16:03:32 2009].531000 freeLayer(): freeing layer at 01808290. [Mon Dec 07 16:04:25 2009].937000 CGI Request 5 on process 2508 [Mon Dec 07 16:04:25 2009].937000 msDrawRasterLayerLow(YY): entering. [Mon Dec 07 16:04:25 2009].937000 msDrawMap(): Layer 1 (YY), 0.000s [Mon Dec 07 16:04:25 2009].937000 msDrawMap(): Drawing Label Cache, 0.000s [Mon Dec 07 16:04:25 2009].937000 msDrawMap() total time: 0.000s [Mon Dec 07 16:04:25 2009].937000 msSaveImage() total time: 0.000s [Mon Dec 07 16:04:25 2009].937000 mapserv request processing time (loadmap not incl.): 0.000s [Mon Dec 07 16:04:25 2009 On Mon, Dec 7, 2009 at 3:22 PM, Steve Lime steve.l...@state.mn.us wrote: The error still indicates a problem recognizing the file type. Can you hit the source GeoTIFF? On 12/7/2009 at 3:18 PM, in message 8ab83e650912071318r3f35074anb9d6c9b64393a...@mail.gmail.com, Daniel Walton dgwal...@gmail.com wrote: I'm creating the PNG image from a GeoTIFF using: gdal_translate -of PNG -quiet -scale -co worldfile=yes [Geotiff_filename].tif [PNG_filename].PNG. Also, these PNG source images were working fine under MS4W x86. -Dan On Mon, Dec 7, 2009 at 3:14 PM, Steve Lime steve.l...@state.mn.us wrote: If I take the request out of WMS context to straight CGI with this request: http://www.fireimagery.com/ms/mapserv.exe?map=C :\maps\A091207074551.mapmode=mapmapsize=300+300layer=ZZ I get the following error: msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'. msDrawRaster(): Image handling error. Unrecognized or unsupported image format drawEPP(): Image handling error. EPPL7 support is not available. Typically you'll see that when GDAL failed to identify the filetype. EPPL7 is the last thing checked so that's not relevant by itself. I guess I'd start by making sure the image is valid. Steve On 12/7/2009 at 2:47 PM, in message 8ab83e650912071247w7b93cb8bt90fe0c6a7a460...@mail.gmail.com, Daniel Walton dgwal...@gmail.com wrote: Thanks Daniel. No dice, though, log is empty. On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette dmorisse...@mapgears.comwrote: Daniel Walton wrote: Yes, the same mapfile worked under MS4W on a 32-bit machine. I have verified that this same problem occurs using the x86 binaries from Tamas' site run in the current x64 environment. The source image is in PNG format in order to make transparency work well on the client. (My client is Silverlight-based, and PNG is the only supported format that supports transparency). The source image does have a world (*.WLD) file which contains these values (file is generated by running gdal_translate on a geotiff image): Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log output, if you haven't tried that already. -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank images
Tamas, Thanks for the tip. I used process monitor and everything looks OK in the permissions department. I think the problem relates to the fact that mapserver doesn't calculate an overlap between map and layer. I'm not sure what would cause this. -Dan On Mon, Dec 7, 2009 at 3:22 PM, Tamas Szekeres szeker...@gmail.com wrote: Daniel, This may also be an issue if GDAL couldn't actually open this file bacause of any reason (permission?). Make sure about this, by using a file monitoring tool, like SysInternals filemon for instance. Best regards, Tamas 2009/12/7 Steve Lime steve.l...@state.mn.us If I take the request out of WMS context to straight CGI with this request: http://www.fireimagery.com/ms/mapserv.exe?map=C :\maps\A091207074551.mapmode=mapmapsize=300+300layer=ZZ I get the following error: msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'. msDrawRaster(): Image handling error. Unrecognized or unsupported image format drawEPP(): Image handling error. EPPL7 support is not available. Typically you'll see that when GDAL failed to identify the filetype. EPPL7 is the last thing checked so that's not relevant by itself. I guess I'd start by making sure the image is valid. Steve On 12/7/2009 at 2:47 PM, in message 8ab83e650912071247w7b93cb8bt90fe0c6a7a460...@mail.gmail.com, Daniel Walton dgwal...@gmail.com wrote: Thanks Daniel. No dice, though, log is empty. On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette dmorisse...@mapgears.comwrote: Daniel Walton wrote: Yes, the same mapfile worked under MS4W on a 32-bit machine. I have verified that this same problem occurs using the x86 binaries from Tamas' site run in the current x64 environment. The source image is in PNG format in order to make transparency work well on the client. (My client is Silverlight-based, and PNG is the only supported format that supports transparency). The source image does have a world (*.WLD) file which contains these values (file is generated by running gdal_translate on a geotiff image): Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log output, if you haven't tried that already. -- Daniel Morissette http://www.mapgears.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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Anyone know how to set up Mapserver under IIS 7 x64?
I had Mapserver running well under IIS 7 x86 + PHP, but we now have a 64-bit requirement, and I am having trouble getting Mapserver to work. I tried 32-bit IIS emulation to no avail. I was wondering if anyone out there has accomplished this in 64 bit Windows, and if so, how? Thanks guys, Dan Walton Dan Walton GIS Fire Tools http://gisfiretools.com (612) 232-6784 callto:+16122326784 dgwal...@gmail.com [image: Linkedin] http://www.linkedin.com/in/danielwalton2010 [image: Twitter] http://twitter.com/danwallie ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Mapserver CGI 5.4 crashed my app (Windows 2003)
Paul, I got various errors with MapServer running in IIS 7.5 until I installed the latest build of PHP. Don't know if you've done that already, but I thought I would mention it. Regards, Dan Walton gisfiretools.com On Thu, Oct 22, 2009 at 9:29 AM, Paul james paulj...@gmail.com wrote: Hi Tamas! Thanks... Yes, thats working on Windows 2003/XP... The problem is happening only on Windows 7 (IIS 7.5) now... HTTP Error 502.2 - Bad Gateway Do you have any idea what is that? Its work fine with postgis... Paul On Wed, Oct 21, 2009 at 5:00 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, I've set up your data but it works for me: http://vbkto.dyndns.org/cgi-bin/mapserv.exe?mode=mapmap=mssql2008.map tried with the following binaries: http://vbkto.dyndns.org/sdk/release-1500-gdal-1-6-mapserver-5-4.zip http://vbkto.dyndns.org/sdk/release-1500-gdal-mapserver.zip My mapfile: MAP NAME SQL2008 STATUS ON SIZE 500 500 IMAGETYPE PNG IMAGECOLOR 254 254 254 EXTENT -79.7892 -44.2426 -24.9958 -9.11775 LAYER NAME tblGeo_AmericaSul TYPE POLYGON CONNECTIONTYPE PLUGIN PLUGIN msplugin_mssql2008.dll CONNECTION server=.\MSSQLSERVER2008;database=Maps;Integrated Security=true DATA the_geom from tblGeo_AmericaSul USING UNIQUE CodigoAmericaSul USING SRID=0 STATUS DEFAULT CLASS STYLE COLOR 255 0 0 END END END END Best regards, Tamas 2009/10/21 Paul james paulj...@gmail.com Tamas, the actual error generated is: HTTP Error 502.2 - Bad Gateway The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are . Using Windos 7 (IIS 7) Testing on Windows 2003, I got just a Blank image (no error message)... You can use the same mssql2008 data I sended you last time... Paul On Tue, Oct 20, 2009 at 4:56 PM, Tamas Szekeres szeker...@gmail.comwrote: Paul, I couldn't reproduce your problem by using my data and the recent mapserv version. http://vbkto.dyndns.org/cgi-bin/mapserv.exe?mode=mapmap=sql2008.map Could you provide your data for testing? Best regards, Tamas 2009/10/20 Paul james paulj...@gmail.com Hello Tamas Did you test that? Paul On Mon, Oct 19, 2009 at 3:40 PM, Paul james paulj...@gmail.comwrote: Testing : http://localhost/cgi-bin-54/mapserv.exe?map=C:/Mapserver/Mapfile/map.mapmode=map Using Postgis connection works fine with same setup... Using that mapfile with MAPSCRIPT/C# works fine as well... The problem is CGI + MSSQL2008 Plugin Mapfile: MAP EXTENT -79.7892 -34.2426 -24.9958 6.11775 FONTSET ..\Fontes\Fontes.txt IMAGECOLOR 230 254 254 IMAGETYPE png SIZE 400 200 STATUS ON UNITS dd NAME Geral OUTPUTFORMAT NAME png MIMETYPE image/png DRIVER GD/PNG EXTENSION png IMAGEMODE PC256 TRANSPARENT TRUE END PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END WEB IMAGEPATH 'C:\map\temp' IMAGEURL '/tmp/' QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LEGEND STATUS ON KEYSIZE 18 12 KEYSPACING 10 5 IMAGECOLOR 255 255 255 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END TEMPLATE ..\template.html END QUERYMAP COLOR 255 0 0 SIZE -1 -1 STATUS ON STYLE hilite END REFERENCE EXTENT -79.7892 -34.2426 -24.9958 6.11775 IMAGE ..\reference.png STATUS on SIZE 221 150 MINBOXSIZE 5 MAXBOXSIZE 150 COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 MARKERSIZE 8 END LAYER NAME test GROUP tests TYPE POLYGON STATUS ON CONNECTIONTYPE PLUGIN PLUGIN msplugin_mssql2008.dll CONNECTION server=x;Integrated Security=false;database=x;uid=x;pwd=x DATA the_geom from viwgeo_paisbrasil USING UNIQUE oid USING SRID=0 CLASS COLOR 255 200 255 END END END ___ 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] Call layer
I have this same problem, only I am using a Silverlight client to view the layers. I can view layers only by setting their status to DEFAULT. Whenever I request a layer whose status is ON, I get the response: Invalid CRS given : CRS must be valid for all requested layers. The CRS query string I passed is: CRS=EPSG:4326 The projection in my mapfile both for the whole map and individual layers is: PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs END It looks like the problem is in referencing the EPSG file, and I have tried every method I know to reference it: 1. setting CONFIG PROJ_LIB C:/ms4w/proj/nad/ at the top of my mapfile 2. adding the line SetEnv PROJ_LIB c:/ms4w/proj/nad/ to Apache's httpd.conf file 3. doing 1 and 2 but omitting the leading c: Further confirmation that this is the problem is that I tried to set the map's projection in MapScript using the line mapObj.setProjection(init=epsg:4326); and received the PROJ4 error: msProcessProjection(): Projection library error. No such file or directory Any ideas out there? Dan Walton dgwal...@gmail.com On Mon, Oct 5, 2009 at 8:49 AM, jbloc1...@googlemail.com wrote: Thanks for the response. I am using openlayers and my map does not appear unless layer is STATUS DEFAULT. I call layer as follows layer1 = new OpenLayers.Layer.WMS(OpenLayers WMS, http://localhost/cgi-bin/mapserv.exe http://localhost/cgi-bin/mapserv.exe?;, { layers: testlayer, map: '/ms4w/.../data/tr00.map', gutter: 15, minZoomLevel: 1, maxZoomLevel: 10, units:'meters' }); map.addLayer(layer1); I only view pink tiles when STATUS ON? Thanks On 5 Oct 2009, at 14:40, Fawcett, David david.fawc...@state.mn.us wrote: You don’t. That is how you tell MapServer that you want to view a particular layer that doesn’t have a status of default. In many cases, if you are viewing your map using a client like OpenLayers, the client does this for you. David. *From:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *On Behalf Of * jbloc1...@googlemail.com *Sent:* Monday, October 05, 2009 8:31 AM *To:* mapserver-users@lists.osgeo.org *Subject:* [mapserver-users] Call layer Hi, If the status of my layer is set to ON how do I call the layer without adding 'layer=[layername]' on the end of the URL? I am viewing the map via localhost/cgi-bin/mapserv.exe? Cheers for any help ___ 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] Help Serving Tiled Tiffs
Thanks to all of you who've been helping me learn the ropes. I am getting close (I hope) to being able to serve up on-the-fly-generated remote sensing imagery using GDAL and MS. I am using the latest MS4W distribution with GDAL 1.6. I have taken Tiff images and tiled and created overviews using Frank's suggestions: gdal_translate -co TILED=YES in.tif out.tif gdaladdo out.tif 2 4 8 16 32 64 When I request an image using a web browser like: http://localhost/cgi-bin/mapserv.exe?map=R:\Temp\Test\A091003033655.mapSERVICE=WMSVERSION=1.1.0REQUEST=GetMap; SRS=EPSG:4326BBOX=36.141921,-121.788916,36.324769,-121.565064FORMAT=image/tiffWIDTH=256HEIGHT=256STYLES=LAYERS=TEST_SWIR_TILED all I get is a white image. The BBOX parameter is the same as my mapfile extents, which is the same as the imagery bounds. The projections are the same as well (EPSG 4326). Questions: 1. Can I pull up an image this way in a browser (using FF 3.5) 2. If so, what am I doing wrong? 3. What are some other points of validation I can perform to break down the testing a bit more? 4. What needs to be done to be able to view the WMS images in Google Earth or ArcGIS explorer (e.g. adding querystring arguments via a proxy handler, etc?) Thanks again MS community. I look forward to someday joining the ranks. -Dan My Mapfile looks like this: MAP EXTENT 36.141921 -121.788916 36.324769 -121.565064 IMAGECOLOR 255 255 255 IMAGETYPE gif SIZE -1 -1 STATUS ON UNITS DD NAME MS OUTPUTFORMAT NAME GTiff MIMETYPE image/tiff DRIVER GDAL/GTiff EXTENSION tif IMAGEMODE RGB TRANSPARENT FALSE END PROJECTION proj=longlat ellps=WGS84 datum=WGS84 no_defs END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 5 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL STATUS OFF END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS OFF STYLE HILITE END SCALEBAR ALIGN CENTER COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL SIZE 200 3 STATUS OFF STYLE 0 UNITS MILES END WEB IMAGEPATH IMAGEURL QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER DATA R:\Temp\Test\test_SWIR_tiled.tif NAME TEST_SWIR_TILED STATUS DEFAULT TYPE RASTER UNITS DD END END Dan Walton dgwal...@gmail.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Type initializer exception with C# MapScript
Hey guys, I'm new to MS, and using the MS4W distribution. It was the only Windows binary dist. I found that had C# MapScript set up. Anyway, I get the following exception when I try to construct a mapObj: *The type initializer for 'OSGeo.MapServer.mapscriptPINVOKE' threw an exception.* Anyone else out there seen this? I have referenced mapscript_csharp.dll compiled by the MS4W folks, and here is the properties pane in VS2008: *Aliases: global Copy Local: true File Type: Assembly Identity: mapscript_csharp Path: C:\Domains\Website1\ImageService\ImageService1\bin\mapscript_csharp.dll Resolved: true Runtime Version: v2.0.50727 Specific Version: true Strong Name: true Version: 1.0.3491.26938* Here is the basic structure of my code: private void CreateMap(string folder) { //Add a new map (based on a unique ticket string) string mapfilename = folder + this.ticket + .map; string[] rasterfiles = Directory.GetFiles(folder, *.tif, SearchOption.AllDirectories); string[] shapefiles = Directory.GetFiles(folder, *.shp, SearchOption.AllDirectories); mapObj map = new mapObj(mapfilename); //Add raster layers to the map foreach (string rasterfile in rasterfiles) { //Call GDAL utils string tiledrasterfile = rasterfile.Substring(0,rasterfile.LastIndexOf(.)) + _tiled.tif; //Create image tiles for full raster Shell(gdalroot + gdal_translate, -co TILED=YES + rasterfile + + tiledrasterfile); //Add Overviews for various zoom levels Shell(gdalroot + gdaladdo, tiledrasterfile + 2 4 8 16 32 64); layerObj layer = new layerObj(map); layer.connectiontype = MS_CONNECTION_TYPE.MS_RASTER; layer.type = MS_LAYER_TYPE.MS_LAYER_RASTER; layer.data = rasterfile; layer.status = mapscript.MS_ON; } //Add shape layers to the map (ESRI shapefile) foreach (string shapefile in shapefiles) { layerObj layer = new layerObj(map); layer.connectiontype = MS_CONNECTION_TYPE.MS_SHAPEFILE; layer.type = MS_LAYER_TYPE.MS_LAYER_POLYGON; layer.data = shapefile; layer.status = mapscript.MS_ON; } map.save(mapfilename); } Dan Walton dgwal...@gmail.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Type initializer exception with C# MapScript - Step 2
More pre-apologies for the 101 type questions I'm asking here. Thanks for the replies. You were all right, I just had to check all the dll dependencies and copy those into my bin folder (32 dlls in all). Now I am one inch further down the road. I can create the mapfile (text shown below), but how to I get from mapfile to hosted WMS? I will break down the question into the parts I can see so far (please add or subtract if I'm off): 1. Do I need to create the mapfile in a specific folder for MapServer to 'see' it? 2. Are there any other configuration files that need to be created or edited for MapServer to expose my map via WMS? 3. Can the files in (2) be created/edited via MapScript? 4. What would be the base URL of the WMS once it's running? Thanks again for your patience in holding my hand for these baby steps! Mapfile currently being created at R:\Temp\A091002122006.map: *MAP EXTENT -1 -1 -1 -1 IMAGECOLOR 255 255 255 IMAGETYPE gif SIZE -1 -1 STATUS ON UNITS METERS NAME MS OUTPUTFORMAT NAME gif MIMETYPE image/gif DRIVER GD/GIF EXTENSION gif IMAGEMODE PC256 TRANSPARENT FALSE END LEGEND IMAGECOLOR 255 255 255 KEYSIZE 20 10 KEYSPACING 5 5 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL STATUS OFF END QUERYMAP COLOR 255 255 0 SIZE -1 -1 STATUS OFF STYLE HILITE END SCALEBAR ALIGN CENTER COLOR 0 0 0 IMAGECOLOR 255 255 255 INTERVALS 4 LABEL SIZE MEDIUM TYPE BITMAP BUFFER 0 COLOR 0 0 0 FORCE FALSE MINDISTANCE -1 MINFEATURESIZE -1 OFFSET 0 0 PARTIALS TRUE END POSITION LL SIZE 200 3 STATUS OFF STYLE 0 UNITS MILES END WEB IMAGEPATH IMAGEURL QUERYFORMAT text/html LEGENDFORMAT text/html BROWSEFORMAT text/html END LAYER DATA R:\Temp\A091002122006_output\A091002122006_PROCESS_RESULTS\AOI_1_S5_MIS_10m_20080706_EV30004214_Ortho_Basin_Indians_NIR.tif NAME AOI_1_S5_MIS_10M_20080706_EV30004214_ORTHO_BASIN_INDIANS_NIR STATUS ON TYPE RASTER UNITS METERS END LAYER DATA R:\Temp\A091002122006_output\A091002122006_PROCESS_RESULTS\AOI_1_S5_MIS_10m_20080706_EV30004214_Ortho_Basin_Indians_RATIO.tif NAME AOI_1_S5_MIS_10M_20080706_EV30004214_ORTHO_BASIN_INDIANS_RATIO STATUS ON TYPE RASTER UNITS METERS END LAYER DATA R:\Temp\A091002122006_output\A091002122006_PROCESS_RESULTS\AOI_1_S5_MIS_10m_20080706_EV30004214_Ortho_Basin_Indians_SWIR.tif NAME AOI_1_S5_MIS_10M_20080706_EV30004214_ORTHO_BASIN_INDIANS_SWIR STATUS ON TYPE RASTER UNITS METERS END LAYER DATA R:\Temp\A091002122006_output\A091002122006_PROCESS_RESULTS\AOI_1_S5_MIS_10m_20080706_EV30004214_Ortho_Basin_Indians_Hot_Spots.tif NAME AOI_1_S5_MIS_10M_20080706_EV30004214_ORTHO_BASIN_INDIANS_HOT_SPOTS STATUS ON TYPE RASTER UNITS METERS END LAYER DATA R:\Temp\A091002122006_output\A091002122006_PROCESS_RESULTS\AOI_1_S5_MIS_10m_20080706_EV30004214_Ortho_Basin_Indians_FIRE_HIGHLIGHT.tif NAME AOI_1_S5_MIS_10M_20080706_EV30004214_ORTHO_BASIN_INDIANS_FIRE_HIGHLIGHT STATUS ON TYPE RASTER UNITS METERS END END* On Fri, Oct 2, 2009 at 10:12 AM, Tamas Szekeres szeker...@gmail.com wrote: 2009/10/2 Daniel Walton dgwal...@gmail.com: Hey guys, I'm new to MS, and using the MS4W distribution. It was the only Windows binary dist. I found that had C# MapScript set up. Daniel, That's not exactly the case, you could also use the binaries available at this location: http://vbkto.dyndns.org/sdk/ FWTools (http://fwtools.maptools.org/) should also have the C# bindings included. Anyway, I get the following exception when I try to construct a mapObj: The type initializer for 'OSGeo.MapServer.mapscriptPINVOKE' threw an exception. Anyone else out there seen this? I have referenced mapscript_csharp.dll compiled by the MS4W folks, and here is the properties pane in VS2008: Yes, most of the users have ever seen that, which would normally mean that not all of the dll-s are available to load when your application is running. Make sure all of the required dependecies (like mapscript.dll, libmap.dll, gdal geos dll-s etc.) are available in your executing directory. You may also use a file monitoring tool (like Sysinternals filemon) to identify the expected location of the files at run-time. Best regards, Tamas ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MapScript C# Code Samples
Sorry for the newbie question, but does anyone have any sample C# MapScript code they can share or point me to that would demonstrate : 1. Adding a new map (based on a unique string name) 2. Adding a raster layer to the map (tiled tiff with overviews, WGS-84 + world file, no reprojection needed) 3. Adding a shape layer to the map (ESRI shapefile) Thanks MapServer Community, Dan Walton dgwal...@gmail.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users