[mapserver-users] mapserver logging

2010-05-10 Thread Chantal Rosmuller
Hi list,

I have a few questions about mapserver logging,

Where can I change the log file location and logging verbosity?

Where can I find documentation about the logfile syntax?

I would like to analyse the logfiles (get some statistiscs about amount of 
visitors etc) is there software or a script for that or should I write one 
myself?

Thanks,

Regards Chantal

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver logging

2010-05-10 Thread Lars Lingner
On 10.05.2010 11:20, Chantal Rosmuller wrote:
 Hi list,
 
 I have a few questions about mapserver logging,
 
 Where can I change the log file location and logging verbosity?
 
 Where can I find documentation about the logfile syntax?
 

The debug parameter is described here:
http://mapserver.org/mapfile/map.html

 I would like to analyse the logfiles (get some statistiscs about amount of 
 visitors etc) is there software or a script for that or should I write one 
 myself?
 

I'm not aware of such an script.

Lars
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] PHP/MapScript - Error - msLayerGetShape() - URGENT

2010-05-10 Thread Ian Tidy
I have just upgraded from Ubuntu Linux 9.10 to 10.04 LTS and I am now getting 
the following error:
[Mon May 10 21:09:50 2010].196000 msLayerGetShape(): Shapefile error. Shapefile 
layer has not been opened.
[Mon May 10 21:09:50 2010].196000 msDrawMap(): Image handling error. Failed to 
draw layer named 'ncspropinfo'.

Everything was working until I upgraded to OS (and MapServer).  I have been 
able to replicate the problem on a Windows machine using MS4W 3 Beta.

My Linux server reports MapServer version:
MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI 
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

While my (Windows) laptop reports MapServer version:
MapServer version 5.6.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG 
SUPPORTS=TILECACHE INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Any ideas on why this would suddenly happen?

Regards Ian
__
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
Hastings St, Private Bag 6010, Napier, New Zealand
Phone +64-6-835-7579 Ext. 8115
Fax +64-6-834-4195
Skype:ian.tidy.ncc
mailto:i...@napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=mailto%3aiant%40napier.govt.nz
http://www.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fwww.napier.govt.nz
 | 
http://maps.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fmaps.napier.govt.nz





#
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#

##
Attention: 
This e-mail message and accompanying data may contain information that
is confidential and subject to legal privilege. Any information
provided is given in good faith. However unless specifically stated to
the contrary, Napier City Council accepts no liability for the
content of this e-mail or for the consequences of any action taken on
the basis of the information provided, unless that information is
subsequently confirmed in writing. If you are not the intended recipient,
you are notified that any use, dissemination, distribution or copying
of this message or data is prohibited. If you received this e-mail
message in error, please notify us immediately and erase all copies
of this message and attachments. Thank you.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: PHP/MapScript - Error - msLayerGetShape() - URGENT

2010-05-10 Thread Ian Tidy
I have worked out that this happens for layers I am drawing after querying 
them.  But I don't understand why...
__
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
mailto:i...@napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=mailto%3aiant%40napier.govt.nz
http://www.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fwww.napier.govt.nz
 | 
http://maps.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fmaps.napier.govt.nz


_
From: Ian Tidy
Sent: Monday, 10 May 2010 9:20 p.m.
To: mapserver-users@lists.osgeo.org
Cc: Ian Tidy
Subject: PHP/MapScript - Error - msLayerGetShape() - URGENT


I have just upgraded from Ubuntu Linux 9.10 to 10.04 LTS and I am now getting 
the following error:
[Mon May 10 21:09:50 2010].196000 msLayerGetShape(): Shapefile error. Shapefile 
layer has not been opened.
[Mon May 10 21:09:50 2010].196000 msDrawMap(): Image handling error. Failed to 
draw layer named 'ncspropinfo'.

Everything was working until I upgraded to OS (and MapServer).  I have been 
able to replicate the problem on a Windows machine using MS4W 3 Beta.

My Linux server reports MapServer version:
MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI 
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

While my (Windows) laptop reports MapServer version:
MapServer version 5.6.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG 
SUPPORTS=TILECACHE INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Any ideas on why this would suddenly happen?

Regards Ian
__
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
Hastings St, Private Bag 6010, Napier, New Zealand
Phone +64-6-835-7579 Ext. 8115
Fax +64-6-834-4195
Skype:ian.tidy.ncc
mailto:i...@napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=mailto%3aiant%40napier.govt.nz
http://www.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fwww.napier.govt.nz
 | 
http://maps.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fmaps.napier.govt.nz





#
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#

##
Attention: 
This e-mail message and accompanying data may contain information that
is confidential and subject to legal privilege. Any information
provided is given in good faith. However unless specifically stated to
the contrary, Napier City Council accepts no liability for the
content of this e-mail or for the consequences of any action taken on
the basis of the information provided, unless that information is
subsequently confirmed in writing. If you are not the intended recipient,
you are notified that any use, dissemination, distribution or copying
of this message or data is prohibited. If you received this e-mail
message in error, please notify us immediately and erase all copies
of this message and attachments. Thank you.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: PHP/MapScript - Error - msLayerGetShape() - URGENT

2010-05-10 Thread Ian Tidy
I think I found the problem,  in my PHP script that processes the Query Results 
was the line '$oLayer-Close()'.  I am guessing that this now closes the layer. 
 I have commented it out and the application seems to be working.
__
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
mailto:i...@napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=mailto%3aiant%40napier.govt.nz
http://www.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fwww.napier.govt.nz
 | 
http://maps.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fmaps.napier.govt.nz


_
From: Ian Tidy
Sent: Monday, 10 May 2010 9:40 p.m.
To: mapserver-users@lists.osgeo.org
Cc: Ian Tidy
Subject: RE: PHP/MapScript - Error - msLayerGetShape() - URGENT


I have worked out that this happens for layers I am drawing after querying 
them.  But I don't understand why...
__
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
mailto:i...@napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=mailto%3aiant%40napier.govt.nz
http://www.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fwww.napier.govt.nz
 | 
http://maps.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fmaps.napier.govt.nz


_
From: Ian Tidy
Sent: Monday, 10 May 2010 9:20 p.m.
To: mapserver-users@lists.osgeo.org
Cc: Ian Tidy
Subject: PHP/MapScript - Error - msLayerGetShape() - URGENT


I have just upgraded from Ubuntu Linux 9.10 to 10.04 LTS and I am now getting 
the following error:
[Mon May 10 21:09:50 2010].196000 msLayerGetShape(): Shapefile error. Shapefile 
layer has not been opened.
[Mon May 10 21:09:50 2010].196000 msDrawMap(): Image handling error. Failed to 
draw layer named 'ncspropinfo'.

Everything was working until I upgraded to OS (and MapServer).  I have been 
able to replicate the problem on a Windows machine using MS4W 3 Beta.

My Linux server reports MapServer version:
MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI 
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

While my (Windows) laptop reports MapServer version:
MapServer version 5.6.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG 
SUPPORTS=TILECACHE INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Any ideas on why this would suddenly happen?

Regards Ian
__
Ian Tidy
GIS Analyst / Developer
Works Asset Department
Napier City Council
Hastings St, Private Bag 6010, Napier, New Zealand
Phone +64-6-835-7579 Ext. 8115
Fax +64-6-834-4195
Skype:ian.tidy.ncc
mailto:i...@napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=mailto%3aiant%40napier.govt.nz
http://www.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fwww.napier.govt.nz
 | 
http://maps.napier.govt.nzhttps://owa.napier.govt.nz/owa/i...@napier.govt.nz/redir.aspx?C=09f8d79cadaa42939f897937480990d3URL=http%3a%2f%2fmaps.napier.govt.nz





#
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#

##
Attention: 
This e-mail message and accompanying data may contain information that
is confidential and subject to legal privilege. Any information
provided is given in good faith. However unless specifically stated to
the contrary, Napier City Council accepts no liability for the
content of this e-mail or for the consequences of any action taken on
the basis of the information provided, unless that information is
subsequently confirmed in writing. If you are not the intended recipient,
you are notified that any use, dissemination, distribution or copying
of this message or data 

RE: Re: [mapserver-users] Testing KML support

2010-05-10 Thread Peter Hopfgartner
Hi Yewondwossen,

compilation fails on CentOS (GCC 4.1.2):

g++ -O2 -fPIC -Wall -DHAVE_VSNPRINTF -DNEED_STRLCAT -DNEED_STRRSTR  
-DUSE_CAIRO -DUSE_KML-DUSE_LIBXML2-DUSE_WMS_SVR-DUSE_POSTGIS 
-DPOSTGIS_HAS_SERVER_VERSION -DUSE_JPEG -DUSE_PROJ  -DUSE_AGG  
-DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT 
-DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS 
-DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_ZLIB -I/usr/include 
-I/usr/include/freetype2 -Irenderers/agg/include -I/usr/include 
-I/usr/include/libxml2  -I/usr/include/cairo -I/usr/include/freetype2 
-I/usr/include/libpng12 -c -o mapkmlrenderer.o mapkmlrenderer.cpp
mapkmlrenderer.h: In constructor ‘KmlRenderer::KmlRenderer(int, int, 
colorObj*)’:
mapkmlrenderer.h:60: warning: ‘KmlRenderer::GroundOverlayNode’ will be 
initialized after
mapkmlrenderer.h:50: warning:   ‘int KmlRenderer::Width’
mapkmlrenderer.cpp:38: warning:   when initialized here
mapkmlrenderer.h:93: warning: ‘KmlRenderer::FirstLayer’ will be initialized 
after
mapkmlrenderer.h:88: warning:   ‘outputFormatObj* 
KmlRenderer::RasterizerOutputFormat’
mapkmlrenderer.cpp:38: warning:   when initialized here
mapkmlrenderer.h:103: warning: ‘KmlRenderer::RasterMode’ will be initialized 
after
mapkmlrenderer.h:52: warning:   ‘double KmlRenderer::MapCellsize’
mapkmlrenderer.cpp:38: warning:   when initialized here
mapkmlrenderer.cpp: In member function ‘void 
KmlRenderer::closeNewLayer(imageObj*, layerObj*)’:
mapkmlrenderer.cpp:375: error: invalid conversion from ‘const char*’ to ‘char*’
mapkmlrenderer.cpp:375: error:   initializing argument 2 of ‘char* 
msStringConcatenate(char*, char*)’
mapkmlrenderer.cpp: In member function ‘xmlNode* 
KmlRenderer::createPlacemarkNode(xmlNode*, char*)’:
mapkmlrenderer.cpp:463: warning: format ‘%d’ expects type ‘int’, but argument 3 
has type ‘long int’
make: *** [mapkmlrenderer.o] Error 1


I've fixed this (adding simply a cast, I'm not sure that this is the correct 
approach):

--- mapkmlrenderer.cpp  (revision 10149)
+++ mapkmlrenderer.cpp  (working copy)
@@ -372,7 +372,7 @@
 tmpUrl = strdup( img-imageurl);
 tmpUrl = msStringConcatenate(tmpUrl, (char 
*)(msGetBasename(tmpFileName)));
 tmpUrl = msStringConcatenate(tmpUrl, .);
-tmpUrl = msStringConcatenate(tmpUrl, 
MS_IMAGE_EXTENSION(RasterizerOutputFormat));
+tmpUrl = msStringConcatenate(tmpUrl, (char 
*)MS_IMAGE_EXTENSION(RasterizerOutputFormat));
 
 createGroundOverlayNode(LayerNode, tmpUrl, layer);
 msFree(tmpFileName);

and now KML is in the output list. Running it over a simple test map file KML 
is produced, seems to produce reasonable results.

Regards

Peter
Yewondwossen Assefa yass...@dmsolutions.ca wrote
Subject: Re: [mapserver-users] Testing KML support
Date: 07.05.2010 23:02


Hi Peter,

There is supposed to be --with-kml.
I have added the OUTPUT=KML if built with the flag.
Note that the driver is still in development/cleanup state. I will 
update the RFC  (http://mapserver.org/development/rfc/ms-rfc-58.html) 
once this phase is over.

regards,

On 07/05/2010 12:23 PM, Peter Hopfgartner wrote:
 Hi,

 I'm would like to look at the KML functionality in the current
MapServer
 trunk.

 There does not seem to be any specific option in configure, so I
enabled
 it by setting the environment variable CPPFLAGS:

 $ export CPPFLAGS=-DUSE_KML
 $ ./configure --with-proj --with-postgis --with-cairovim
 --with-xml2-config=/usr/bin/xml2-config
 $ make


 The resulting shp2img has a lot of Kml-related symbols in it:

 $ nm shp2img | grep -i kml | wc -l
 71

 Anyway, KML does not seem to be oin the OUTPUT formats list:

 [peter.hopfgart...@vm-centos5-64-1 mapserver]$ ./shp2img -v
 MapServer version 5.7-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
 OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
 SUPPORTS=WMS_SERVER INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE

 Indeed, trying to produce some KML from a map file, I get:

 $ /usr/local/bin/shp2img -i KML -m kml_test.map  test.kml
 loadOutputFormat(): General error message. OUTPUTFORMAT clause
 references driver KML, but this driver isn't configured.


 Am I missing something?

 Regards,

 Peter




-- 

Assefa Yewondwossen
Software Analyst

Email: yass...@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver logging

2010-05-10 Thread Chantal Rosmuller
Thank you Jukka,

I am familiar with awstats but I would also like to analyse information about 
actual mapserver actions, like ḧow many zoom actions. Your tip is helpful 
because indeed I see a lot of mapserver actions in the requested url in the 
apache log file. Can I find the meaning of all the get variables somewhere in 
the mapserver documentation?



Op maandag 10 mei 2010 12:16:25 schreef Rahkonen Jukka:
 Hi,
 
 There are two kind of logs. The one that Lars is referring to is so called
  Mapserver errorfile and while it is good for debugging it cannot be used
  for making statistics about visitors etc.  Webserver statistics can be
  made from the http server log files.  For example in MS4W installations
  http logs can be found from D:\Program Files\ms4w\Apache\logs. What will
  be logged into these log files is configured in the Apache httpd.conf
  file.
 
 Apache log files suit well for analysing WMS usage because requests are
  coming through http GET method and then almost everything gets stored into
  the log.  If requests are coming though POST then Apache access.log does
  not give as much information.
 
 There are many tools for analysing http server logs. Any search engine will
  return you lots of reading if you have a try with http log analyze. I
  have been using AWStats and even the AWStats demo report gives useful
  numbers about the number of visitors, bandwidth, top ten IP addresses of
  the visitors etc.  Perl programmer could make a report that suits better
  for making statistics about Mapserver usage. I would start by searching
  where the Apache access.log file is and having a look at it with some text
  editor.
 
 
 -Jukka Rahkonen-
 
  -Alkuperäinen viesti-
  Lähettäjä: mapserver-users-boun...@lists.osgeo.org
  [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Lars Lingner
  Lähetetty: 10. toukokuuta 2010 12:35
  Vastaanottaja: mapserver-users@lists.osgeo.org
  Aihe: Re: [mapserver-users] mapserver logging
 
  On 10.05.2010 11:20, Chantal Rosmuller wrote:
   Hi list,
  
   I have a few questions about mapserver logging,
  
   Where can I change the log file location and logging verbosity?
  
   Where can I find documentation about the logfile syntax?
 
  The debug parameter is described here:
  http://mapserver.org/mapfile/map.html
 
   I would like to analyse the logfiles (get some statistiscs
 
  about amount of
 
   visitors etc) is there software or a script for that or
 
  should I write one
 
   myself?
 
  I'm not aware of such an script.
 
  Lars
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver logging

2010-05-10 Thread Rahkonen Jukka
Hi,

Look at the Mapserver documents it your users are sending Mapserver CGI calls 
and from Mapserver and OGC documents if they are doing WMS requests. It may be 
harder to deside what to search from the logs if you are running some program 
on the server that is sending the final requests to Mapserver.  It is not 
trivial to analyse WMS calls either.  Lines may be long and look odd, like this 
one including user style as SLD_BODY

ip.ip.ip.1 - secured [05/May/2010:09:42:02 +0300] GET 
/cgi-bin/securedwms?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=512HEIGHT=642LAYERS=testtest1TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=316699.16841900314,6691568.0,345950.9565809969,6728247.0SRS=EPSG:3067STYLES=SLD_BODY=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3CStyledLayerDescriptor%20version%3D%221.1.0%22%3E%3CNamedLayer%3E%3CName%3Etesttest1%3C%2FName%3E%3CUserStyle%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CName%3ERule%201%3C%2FName%3E%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3test%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3test%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%3CPolygonSymbolizer%3E%3CStroke%3E%3CCssParameter%20name%3D%22stroke%22%3E%2300%3C%2FCssParameter%3E%3CCssParameter%20name%3D%22stroke-width%22%3E5%3C%2FCssParameter%3E%3C%2FStroke%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%3E%23FF%3C%2FCssParameter%3E%3CCssParameter%20name%3D%22fill-opacity%22%3E1%3C%2FCssParameter%3E%3C%2FFill%3E%3C%2FPolygonSymbolizer%3E%3C%2FRule%3E%20%3C%2FFeatureTypeStyle%3E%3C%2FUserStyle%3E%3C%2FNamedLayer%3E%3C%2FStyledLayerDescriptor%3E
 HTTP/1.1 200 4298

However, you can start by calculating the number of GetMap calls. Next you can 
try to anylyze which layers are most popular but then you need to deside how 
handle requests like layers=layer_1,layer_2, layers=layer_2,layer_1 or 
layers=layer_3,layer_1,layer_2. It may also be hard to say from the logs if 
someone who asked for layer_1 ever got it. Request could have been outside the 
extents of the layer or then the request was not between the scale range.

You can sum up the number of bytes you have sent. However, sometimes it could 
make more sense to count the number of pixels sent by multiplying WIDTH x 
HEIGHT because maybe compressed jpeg image is worth about as much for the end 
user as uncompressed 24 bit png.  Or perhaps some statistics about BBOX suit 
your need better.

I fear that for getting an answer to question How many zoom actions you must 
do some harder research. Mapserver or Apache do not know if someone is zooming 
or panning. I think I would take a sample and sort requests by the IP address 
and then try analyze by the timestamps how ofter users are making actions on a 
map. I suppose users could be classified to a few groups by their map activity. 
 Then I would take a smaller sample from each group and repeat line by line all 
the requests and see what they really made on a map and try to understand why.


-Jukka-

Chantal Rosmuller wrote:

 
 Thank you Jukka,
 
 I am familiar with awstats but I would also like to analyse 
 information about 
 actual mapserver actions, like ḧow many zoom actions. Your 
 tip is helpful 
 because indeed I see a lot of mapserver actions in the 
 requested url in the 
 apache log file. Can I find the meaning of all the get 
 variables somewhere in 
 the mapserver documentation?
 
 
 
 Op maandag 10 mei 2010 12:16:25 schreef Rahkonen Jukka:
  Hi,
  
  There are two kind of logs. The one that Lars is referring 
 to is so called
   Mapserver errorfile and while it is good for debugging it 
 cannot be used
   for making statistics about visitors etc.  Webserver 
 statistics can be
   made from the http server log files.  For example in MS4W 
 installations
   http logs can be found from D:\Program 
 Files\ms4w\Apache\logs. What will
   be logged into these log files is configured in the Apache 
 httpd.conf
   file.
  
  Apache log files suit well for analysing WMS usage because 
 requests are
   coming through http GET method and then almost everything 
 gets stored into
   the log.  If requests are coming though POST then Apache 
 access.log does
   not give as much information.
  
  There are many tools for analysing http server logs. Any 
 search engine will
   return you lots of reading if you have a try with http 
 log analyze. I
   have been using AWStats and even the AWStats demo report 
 gives useful
   numbers about the number of visitors, bandwidth, top ten 
 IP addresses of
   the visitors etc.  Perl programmer could make a report 
 that suits better
   for making statistics about Mapserver usage. I would start 
 by searching
   where the Apache access.log file is and having a look at 
 it with some text
   editor.
  
  
  -Jukka Rahkonen-
  
   -Alkuperäinen viesti-
   Lähettäjä: mapserver-users-boun...@lists.osgeo.org
   [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Lars Lingner
   Lähetetty: 10. 

Re: [mapserver-users] mapserver logging

2010-05-10 Thread Jeff McKenna

Lars Lingner wrote:


Where can I find documentation about the logfile syntax?


Hello Lars,

There is a new document available, Debugging MapServer, that should 
help you learn how to log through MapServer: 
http://www.mapserver.org/optimization/debugging.html


-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver logging

2010-05-10 Thread Chantal Rosmuller
Thanks, guess I'll have to start experimenting :)


Op maandag 10 mei 2010 14:05:18 schreef Rahkonen Jukka:
 Hi,
 
 Look at the Mapserver documents it your users are sending Mapserver CGI
  calls and from Mapserver and OGC documents if they are doing WMS requests.
  It may be harder to deside what to search from the logs if you are running
  some program on the server that is sending the final requests to
  Mapserver.  It is not trivial to analyse WMS calls either.  Lines may be
  long and look odd, like this one including user style as SLD_BODY
 
 ip.ip.ip.1 - secured [05/May/2010:09:42:02 +0300] GET
  /cgi-bin/securedwms?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=512HEI
 GHT=642LAYERS=testtest1TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=316699.16
 841900314,6691568.0,345950.9565809969,6728247.0SRS=EPSG:3067STYLES=SLD_B
 ODY=%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3CStyled
 LayerDescriptor%20version%3D%221.1.0%22%3E%3CNamedLayer%3E%3CName%3Etesttes
 t1%3C%2FName%3E%3CUserStyle%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CName%3ERul
 e%201%3C%2FName%3E%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3AP
 ropertyName%3test%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3test%3C%2Fogc
 %3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%3CPolygo
 nSymbolizer%3E%3CStroke%3E%3CCssParameter%20name%3D%22stroke%22%3E%2300
 %3C%2FCssParameter%3E%3CCssParameter%20name%3D%22stroke-width%22%3E5%3C%2FC
 ssParameter%3E%3C%2FStroke%3E%3CFill%3E%3CCssParameter%20name%3D%22fill%22%
 3E%23FF%3C%2FCssParameter%3E%3CCssParameter%20name%3D%22fill-opacity%22
 %3E1%3C%2FCssParameter%3E%3C%2FFill%3E%3C%2FPolygonSymbolizer%3E%3C%2FRule%
 3E%20%3C%2FFeatureTypeStyle%3E%3C%2FUserStyle%3E%3C%2FNamedLayer%3E%3C%2FSt
 yledLayerDescriptor%3E HTTP/1.1 200 4298
 
 However, you can start by calculating the number of GetMap calls. Next you
  can try to anylyze which layers are most popular but then you need to
  deside how handle requests like layers=layer_1,layer_2,
  layers=layer_2,layer_1 or layers=layer_3,layer_1,layer_2. It may
  also be hard to say from the logs if someone who asked for layer_1 ever
  got it. Request could have been outside the extents of the layer or then
  the request was not between the scale range.
 
 You can sum up the number of bytes you have sent. However, sometimes it
  could make more sense to count the number of pixels sent by multiplying
  WIDTH x HEIGHT because maybe compressed jpeg image is worth about as much
  for the end user as uncompressed 24 bit png.  Or perhaps some statistics
  about BBOX suit your need better.
 
 I fear that for getting an answer to question How many zoom actions you
  must do some harder research. Mapserver or Apache do not know if someone
  is zooming or panning. I think I would take a sample and sort requests by
  the IP address and then try analyze by the timestamps how ofter users are
  making actions on a map. I suppose users could be classified to a few
  groups by their map activity.  Then I would take a smaller sample from
  each group and repeat line by line all the requests and see what they
  really made on a map and try to understand why.
 
 
 -Jukka-
 
 Chantal Rosmuller wrote:
  Thank you Jukka,
 
  I am familiar with awstats but I would also like to analyse
  information about
  actual mapserver actions, like ḧow many zoom actions. Your
  tip is helpful
  because indeed I see a lot of mapserver actions in the
  requested url in the
  apache log file. Can I find the meaning of all the get
  variables somewhere in
  the mapserver documentation?
 
  Op maandag 10 mei 2010 12:16:25 schreef Rahkonen Jukka:
   Hi,
  
   There are two kind of logs. The one that Lars is referring
 
  to is so called
 
Mapserver errorfile and while it is good for debugging it
 
  cannot be used
 
for making statistics about visitors etc.  Webserver
 
  statistics can be
 
made from the http server log files.  For example in MS4W
 
  installations
 
http logs can be found from D:\Program
 
  Files\ms4w\Apache\logs. What will
 
be logged into these log files is configured in the Apache
 
  httpd.conf
 
file.
  
   Apache log files suit well for analysing WMS usage because
 
  requests are
 
coming through http GET method and then almost everything
 
  gets stored into
 
the log.  If requests are coming though POST then Apache
 
  access.log does
 
not give as much information.
  
   There are many tools for analysing http server logs. Any
 
  search engine will
 
return you lots of reading if you have a try with http
 
  log analyze. I
 
have been using AWStats and even the AWStats demo report
 
  gives useful
 
numbers about the number of visitors, bandwidth, top ten
 
  IP addresses of
 
the visitors etc.  Perl programmer could make a report
 
  that suits better
 
for making statistics about Mapserver usage. I would start
 
  by searching
 
where the Apache access.log file is and having a look 

Re: [mapserver-users] mapserver logging

2010-05-10 Thread Lars Lingner
On 10.05.2010 14:05, Jeff McKenna wrote:
 Lars Lingner wrote:

 Where can I find documentation about the logfile syntax?
 
 Hello Lars,
 
 There is a new document available, Debugging MapServer, that should
 help you learn how to log through MapServer:
 http://www.mapserver.org/optimization/debugging.html
 

Great. Something more to translate ;)

Lars
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver logging

2010-05-10 Thread Jeff McKenna

Lars Lingner wrote:

On 10.05.2010 14:05, Jeff McKenna wrote:

Lars Lingner wrote:

Where can I find documentation about the logfile syntax?

Hello Lars,

There is a new document available, Debugging MapServer, that should
help you learn how to log through MapServer:
http://www.mapserver.org/optimization/debugging.html



Great. Something more to translate ;)


Thanks Lars.  (I guess my message was for Chantal, my apologies)

-jeff




--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapserver logging

2010-05-10 Thread Chantal Rosmuller


Op maandag 10 mei 2010 14:16:57 schreef Jeff McKenna:
 Lars Lingner wrote:
  On 10.05.2010 14:05, Jeff McKenna wrote:
  Lars Lingner wrote:
  Where can I find documentation about the logfile syntax?
 
  Hello Lars,
 
  There is a new document available, Debugging MapServer, that should
  help you learn how to log through MapServer:
  http://www.mapserver.org/optimization/debugging.html
 
  Great. Something more to translate ;)
 
 Thanks Lars.  (I guess my message was for Chantal, my apologies)
 
 -jeff
 

Thanks, I 'll have a look.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] wms layer query

2010-05-10 Thread Fawcett, David (MPCA)
Have you tried a direct getFeatureInfo request from a browser?  

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Eric Weisbender
Sent: Friday, May 07, 2010 2:19 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] wms layer query

Hello,

I have a wms layer defined in my map file coming from a USGS service that is 
supposed to be queryable  but when I query it I get nothing in return.  It 
draws fine and the GetCapabilities request says Layer queryable=1.  I 
wondering if it's my layer definition or if you just can't do this in basic 
mapserver.  Below is my layer def and any help is beer worthy.  Thanks in 
advance.


LAYER
  NAME firetest
  METADATA
wms_srs EPSG:4326
wms_name1
wms_server_version  1.1.1
wms_format  image/png
wms_title 1
wfs_title 1
wms_metadataurl_format text/html
 gml_include_items all
 wms_include_items all
 END
  STATUS OFF
  TYPE RASTER
  #MINSCALE 3800
  CONNECTIONTYPE WMS
  CONNECTION 
http://rmgsc.cr.usgs.gov/arcgis/services/nhss_haz/MapServer/WMSServer?service=WMSversion=1.1.1request=GetMaplayers=1styles=defaluttransparent=TRUEformat=image/png;
  PROJECTION
  init=epsg:4326
  END
  CLASS
NAME fire wms test
KEYIMAGE '/data/gis/www/html/ms_common/fire.png'
  END
  TEMPLATE http://gis.hq.wapa.gov/ms_common/fires.html;
  HEADER http://gis.hq.wapa.gov/ms_common/fires_header.html;
  FOOTER http://gis.hq.wapa.gov/ms_common/fires_footer.html;
  TOLERANCE 10
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] Testing KML support

2010-05-10 Thread Daniel Morissette

Peter Hopfgartner wrote:


I've fixed this (adding simply a cast, I'm not sure that this is the correct 
approach):

--- mapkmlrenderer.cpp  (revision 10149)
+++ mapkmlrenderer.cpp  (working copy)
@@ -372,7 +372,7 @@
 tmpUrl = strdup( img-imageurl);
 tmpUrl = msStringConcatenate(tmpUrl, (char 
*)(msGetBasename(tmpFileName)));
 tmpUrl = msStringConcatenate(tmpUrl, .);
-tmpUrl = msStringConcatenate(tmpUrl, 
MS_IMAGE_EXTENSION(RasterizerOutputFormat));
+tmpUrl = msStringConcatenate(tmpUrl, (char 
*)MS_IMAGE_EXTENSION(RasterizerOutputFormat));
 
 createGroundOverlayNode(LayerNode, tmpUrl, layer);

 msFree(tmpFileName);



That would be a valid patch, but I think a better fix would be to change 
the second arg of msStringConcatenate() to be a const char *. i.e.



char *msStringConcatenate(char *pszDest, const char *pszSrc)


Daniel
--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: PHP/MapScript - Error - msLayerGetShape() - URGENT

2010-05-10 Thread Daniel Morissette

Ian Tidy wrote:
I have worked out that this happens for layers I am drawing after 
querying them.  But I don’t understand why...



Starting with MapServer 5.6, when reading shapes out of a resultset, you 
should use the new layer.resultsGetShape() method instead of 
layer.getShape() or layer.getFeature().


More info in the 5.6 migration guide at
http://trac.osgeo.org/mapserver/browser/trunk/mapserver/MIGRATION_GUIDE.TXT

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] wfs Geometry not returned in GML

2010-05-10 Thread pablo lopez
Hi list,
I recently updated to mapserver 5.6.3, and found out that my wfs requests
were not returning the geometry in the response GML.
Doing some googling I discoverd a bug reported in 5.6.1
http://trac.osgeo.org/mapserver/ticket/3235 regarding this issue.
So I have a couple of questions:
a) Is this bug fixed in 5.6.3?
b)If its not, I reckon the only way to fix this issue would be to compile
mapserver from source after applying the patch, am I right?
Thanks in advance
Pablo
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users