[mapserver-users] Php Mapscript help
Hi, I have been having this problem and simple google search seems no to shed any light on this. i have an index.php file that i want to load as a WMS service. Attached is the index file as specified on the doc. On my php info, it states mapscript is installed. http://dpaste.com/553024/ On loading this on my browser as index.php?service=WMSversion=1.1.1Request=GetCapabilities A file is downloaded but on opening it on a text editor is its empty. I want to load this layer as a WMS layer on openlayers, the following does not return any results. any pointers? var indexlayer = new OpenLayers.Layer.WMS(test, http://localhost/map/phpmapscript-demo/index.phtml?,{format:'image/png'}); -- Regards, Jude Mwenda Skype id: jmwenda Twitter: www.twitter.com/judemwenda Web: www.africangeogeek.com Was ist mein Leben, wenn ich nicht mehr nützlich für andere. Johann Wolfgang von Goethe ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] wfs 1.1.0 via mapserver and ogr
Hi, Hi, I try to load some data to MapServer (and display them as WMS) from WFS 1.1.0 server (also MapServer-based). From various reasons, I defined the WFS layer as OGR layer type, with connection set to WFS definition file: LAYER CONNECTION wfs.wfs CONNECTIONTYPE OGR DATA line #EXTENT 12.735342 48.152419 17.141855 51.38089 METADATA ows_abstractMy abstract wfs_typenameline wfs_version 1.1.0 wms_title Line END # METADATA NAME line PROJECTION +init=epsg:4326 END # PROJECTION STATUS ON TEMPLATE foo TILEITEM location TYPE LINE UNITS METERS CLASS STYLE ANGLE 0 COLOR 238 153 0 OFFSET 0 0 OUTLINECOLOR 134 81 0 SIZE 5 WIDTH 5 END # STYLE END # CLASS END # LAYER (wfs.wfs should be attached to this e-mail). When I try to display the data (using shp2img or standard WMS request), nothing is displayed, because of MapServer-OGR asks the WFS server with following request: http://localhost/cgi-bin/ows?SERVICE=WFSVERSION=1.1.0REQUEST=GetFeatureTYPENAME=lineFILTER=Filter xmlns:gml=http://www.opengis.net/gml;BBOXPropertyNamemsGeometry/PropertyNamegml:Boxgml:coordinates48.7275012197312094,12.9295317871890720 51.1769623652315175,18.1965700336475784/gml:coordinates/gml:Box/BBOX/Filter This is WRONG because of the axes are inverted, the filter *should* look like 12.9295317871890720,48.7275012197312094 18.1965700336475784,51.1769623652315175 Then it works. My question is, where can/should I influence this behaviour? I tried several options in PROJECTION section of the MapFile (+axis=neu, ...) but nothing made the OGR driver to change the axes order. So it seems, that MapServer is creating the WFS 1.0.0 style filters with Easting-Northing also when the connection is defined as WFS 1.1.0 and gml Box is used in the filter, but Box does not exist in GML3 and Envelope should be used instead. (according to http://lists.osgeo.org/pipermail/gdal-dev/2011-June/029029.html) With WFS 1.0.0 it works perfectly (axes are in EAST-NORTH order). What to do, so that mapserver reades WFS 1.1.0 via OGR properly? Thanks Jachym -- Jachym Cepicky e-mail: jachym.cepicky gmail com URL: http://les-ejk.cz GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp wfs.wfs Description: Binary data ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Google tile schema to coordinates conversion
On Fri, Jun 10, 2011 at 05:43:27PM +0200, Armin Burger wrote: I would like to set up a scripting solution based on MapScript that replies correctly to requests using the Google tile schema x+y+z. Does anybody know a formula how to transform the XYZ request values to bounding box coordinates in the Google Spherical Mercator projection? Just for the curious: the Bing map uses Quadkeys into the URL instead of x+y+z, here you can find the math beyond that: http://msdn.microsoft.com/en-us/library/bb259689.aspx -- Niccolo Rigacci Firenze - Italy Tel. ufficio: 055-0118525 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Google tile schema to coordinates conversion
On 6/11/2011 8:36 AM, Niccolo Rigacci wrote: On Fri, Jun 10, 2011 at 05:43:27PM +0200, Armin Burger wrote: I would like to set up a scripting solution based on MapScript that replies correctly to requests using the Google tile schema x+y+z. Does anybody know a formula how to transform the XYZ request values to bounding box coordinates in the Google Spherical Mercator projection? Just for the curious: the Bing map uses Quadkeys into the URL instead of x+y+z, here you can find the math beyond that: http://msdn.microsoft.com/en-us/library/bb259689.aspx You might also want to look at mod_geocache as if supports all common tiling schemes off of a single tilecache. It also has a demo mode that will generate a sample OpenLayers page(s) to demo setup and access to the cache using each tiling scheme. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problem using mapserver with WCS
Thank you Frank! I looked at your mapfile and i noticed there were some configurations that were missing. Now its working! regards, Virginia On Fri, Jun 10, 2011 at 10:02 AM, Frank Warmerdam warmer...@pobox.comwrote: On 11-06-09 11:58 PM, Virginia Maffei wrote: Thanks Frank, i dropped the map= from the url but now it throws an error that i dont understand: msWCSGetCoverageMetadata(): WCS server error. Unable to determine the SRS for this layer, no projection defined and no metadata available. Do you have any idea whats the problem i'm having? the mapfile is the same one. Virginia, I notice you do not have any PROJECTION blocks or SRS service metadata at the layer or map level. I would suggest you re-review the WCS documentation. You might want to use the following as an example of a fairly minimalist WCS service mapfile (ignore all the request comments at the start - these are part of the autotest). http://svn.osgeo.org/mapserver/trunk/msautotest/wxs/wcs_simple.map Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam 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] GetCoverage pops up to download mapserv.exe
Hi, i'm trying to do a getcoverage with WCS and it just pops up asking if i want to download mapserv.exe. The url i'm using is: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-1.mapSERVICE=WCSVERSION=1.0.0REQUEST=GetCoveragecoverage=localidadesCRS=EPSG:32721BBOX=40,70,80,60WIDTH=491HEIGHT=543FORMAT=GTiff does anyone knows whats happening and how to resolve it? I checked the FAQ but i didn't understand thanks! Virginia ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Requested BBOX outside requested coverage
Hi, i want to do a getcoverage with wcs but the log throws: [Sat Jun 11 18:27:50 2011].26000 msWCSGetCoverage(): WCS server error. Requested BBOX (-66.5079075029609,-84.6440997947261,-30.3257514953085,-83.1977984037033) is outside requested coverage BBOX (366582.290141166,6127927.10038269,857582.290141166,6670927.10038269) [Sat Jun 11 18:27:50 2011].26000 freeLayer(): freeing layer at 021CB940. the url is: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-1.mapSERVICE=WCSVERSION=1.0.0REQUEST=GetCoveragecoverage=localidadesCRS=EPSG:32721BBOX=40,70,80,60WIDTH=491HEIGHT=543FORMAT=GTiff Could someone explain me whats wrong and how does bbox works? Sorry, but i'm very new at this... thank you! Virginia ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] GetCoverage pops up to download mapserv.exe
Assuming your cgi-bin directory is properly configured to run mapserv.exe as a cgi executable, rather than serving it as a static file, this is probably the result of mapserver encountering a problem and delivering an error message to the browser, probably in the form of an xml response, and what is happening is that the browser is confused about the mime type of the response. Try saving the file and viewing it with an editor; you'll probably find an error message in it. On Sat, Jun 11, 2011 at 5:32 PM, Virginia Maffei vmaf...@gmail.com wrote: Hi, i'm trying to do a getcoverage with WCS and it just pops up asking if i want to download mapserv.exe. The url i'm using is: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-1.mapSERVICE=WCSVERSION=1.0.0REQUEST=GetCoveragecoverage=localidadesCRS=EPSG:32721BBOX=40,70,80,60WIDTH=491HEIGHT=543FORMAT=GTiff does anyone knows whats happening and how to resolve it? I checked the FAQ but i didn't understand thanks! Virginia ___ 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] GetCoverage pops up to download mapserv.exe
Thanks Mark! the message its showing is: ?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; ServiceException code=NoApplicableCode locator=bboxmsWCSGetCoverage(): WCS server error. Requested BBOX (-66.5079075029609,-84.6440997947261,-30.3257514953085,-83.1977984037033) is outside requested coverage BBOX (366582.290141166,6127927.10038269,857582.290141166,6670927.10038269) /ServiceException /ServiceExceptionReport I posted it in another post but i thought this issue wasn't related with the other one. Do you have any idea about how bbox works? regards, Virginia On Sat, Jun 11, 2011 at 7:03 PM, Mark Phillips m...@geomtech.com wrote: Assuming your cgi-bin directory is properly configured to run mapserv.exe as a cgi executable, rather than serving it as a static file, this is probably the result of mapserver encountering a problem and delivering an error message to the browser, probably in the form of an xml response, and what is happening is that the browser is confused about the mime type of the response. Try saving the file and viewing it with an editor; you'll probably find an error message in it. On Sat, Jun 11, 2011 at 5:32 PM, Virginia Maffei vmaf...@gmail.comwrote: Hi, i'm trying to do a getcoverage with WCS and it just pops up asking if i want to download mapserv.exe. The url i'm using is: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-1.mapSERVICE=WCSVERSION=1.0.0REQUEST=GetCoveragecoverage=localidadesCRS=EPSG:32721BBOX=40,70,80,60WIDTH=491HEIGHT=543FORMAT=GTiff does anyone knows whats happening and how to resolve it? I checked the FAQ but i didn't understand thanks! Virginia ___ 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] GetCoverage pops up to download mapserv.exe
Virginia, I don't feel like I understand WCS very well myself --- I'm currently struggling with getting my own WCS service working the way I need, and am not having a lot of success. But for what it's worth, it looks to me like your issue has to do with projections. One of your BBOXes seems to be specified in lon/lat (the numbers (-66.5079075029609,-84.6440997947261,-30.3257514953085,-83.1977984037033 look like lon/lat values), and the other one looks like values in a different projection. I suspect that the problem has something to do with the projections specified in your mapfile, and/or the projection being requested in the request. I'm afraid I can't offer much more specific advise than that right now, though, because I don't understand the details myself! --Mark On Sat, Jun 11, 2011 at 6:41 PM, Virginia Maffei vmaf...@gmail.com wrote: Thanks Mark! the message its showing is: ?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; ServiceException code=NoApplicableCode locator=bboxmsWCSGetCoverage(): WCS server error. Requested BBOX (-66.5079075029609,-84.6440997947261,-30.3257514953085,-83.1977984037033) is outside requested coverage BBOX (366582.290141166,6127927.10038269,857582.290141166,6670927.10038269) /ServiceException /ServiceExceptionReport I posted it in another post but i thought this issue wasn't related with the other one. Do you have any idea about how bbox works? regards, Virginia On Sat, Jun 11, 2011 at 7:03 PM, Mark Phillips m...@geomtech.com wrote: Assuming your cgi-bin directory is properly configured to run mapserv.exe as a cgi executable, rather than serving it as a static file, this is probably the result of mapserver encountering a problem and delivering an error message to the browser, probably in the form of an xml response, and what is happening is that the browser is confused about the mime type of the response. Try saving the file and viewing it with an editor; you'll probably find an error message in it. On Sat, Jun 11, 2011 at 5:32 PM, Virginia Maffei vmaf...@gmail.comwrote: Hi, i'm trying to do a getcoverage with WCS and it just pops up asking if i want to download mapserv.exe. The url i'm using is: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-1.mapSERVICE=WCSVERSION=1.0.0REQUEST=GetCoveragecoverage=localidadesCRS=EPSG:32721BBOX=40,70,80,60WIDTH=491HEIGHT=543FORMAT=GTiff does anyone knows whats happening and how to resolve it? I checked the FAQ but i didn't understand thanks! Virginia ___ 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] GetCoverage pops up to download mapserv.exe
Thanks Mark! Every comment or help is welcome :) good luck with your WCS! regards, Virginia On Sat, Jun 11, 2011 at 7:57 PM, Mark Phillips m...@geomtech.com wrote: Virginia, I don't feel like I understand WCS very well myself --- I'm currently struggling with getting my own WCS service working the way I need, and am not having a lot of success. But for what it's worth, it looks to me like your issue has to do with projections. One of your BBOXes seems to be specified in lon/lat (the numbers (-66.5079075029609,-84.6440997947261,-30.3257514953085,-83.1977984037033 look like lon/lat values), and the other one looks like values in a different projection. I suspect that the problem has something to do with the projections specified in your mapfile, and/or the projection being requested in the request. I'm afraid I can't offer much more specific advise than that right now, though, because I don't understand the details myself! --Mark On Sat, Jun 11, 2011 at 6:41 PM, Virginia Maffei vmaf...@gmail.comwrote: Thanks Mark! the message its showing is: ?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; ServiceException code=NoApplicableCode locator=bboxmsWCSGetCoverage(): WCS server error. Requested BBOX (-66.5079075029609,-84.6440997947261,-30.3257514953085,-83.1977984037033) is outside requested coverage BBOX (366582.290141166,6127927.10038269,857582.290141166,6670927.10038269) /ServiceException /ServiceExceptionReport I posted it in another post but i thought this issue wasn't related with the other one. Do you have any idea about how bbox works? regards, Virginia On Sat, Jun 11, 2011 at 7:03 PM, Mark Phillips m...@geomtech.com wrote: Assuming your cgi-bin directory is properly configured to run mapserv.exe as a cgi executable, rather than serving it as a static file, this is probably the result of mapserver encountering a problem and delivering an error message to the browser, probably in the form of an xml response, and what is happening is that the browser is confused about the mime type of the response. Try saving the file and viewing it with an editor; you'll probably find an error message in it. On Sat, Jun 11, 2011 at 5:32 PM, Virginia Maffei vmaf...@gmail.comwrote: Hi, i'm trying to do a getcoverage with WCS and it just pops up asking if i want to download mapserv.exe. The url i'm using is: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/example1-1.mapSERVICE=WCSVERSION=1.0.0REQUEST=GetCoveragecoverage=localidadesCRS=EPSG:32721BBOX=40,70,80,60WIDTH=491HEIGHT=543FORMAT=GTiff does anyone knows whats happening and how to resolve it? I checked the FAQ but i didn't understand thanks! Virginia ___ 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