Imported Upstream version 6.2.0

parent d112c353
.gitattributes export-ignore
.gitignore export-ignore
.libs
*.o
*.lo
config.log
config.status
*.dll
*.swp
*.pyc
Makefile
legend
libmapserver.a
libmapserver.la
libtool
mapscript/csharp/Makefile
mapscript/java/Makefile
mapscript/perl/Makefile.PL
mapscript/python/_mapscript.la
mapscript/python/build/
mapscript/python/mapscript.py
mapscript/python/mapscript_wrap.c
mapscript/php/php_mapscript.la
mapscript/java/edu
mapscript/java/javamapscript_wrap.c
mapscript/java/libjavamapscript.la
mapscript/java/mapscript.jar
mapscript/perl/MYMETA.yml
mapscript/perl/Makefile.old
mapscriptvars
mapserv
mapserver-config
msencrypt
nbproject
scalebar
shp2img
shptree
shptreetst
shptreevis
sortshp
tile4ms
autom4te.cache
tags
[submodule "msautotest"]
path = msautotest
url = git://github.com/mapserver/msautotest.git
language: c
compiler:
- gcc
before_install:
- git submodule update --init --recursive
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update -qq
- sudo apt-get install -qq php-pear colordiff postgis libpq-dev libpng12-dev libjpeg-dev libgif-dev libgeos-dev libgd2-noxpm-dev libfreetype6-dev libfcgi-dev libcurl4-gnutls-dev libcairo2-dev libgdal1-dev libproj-dev libxml2-dev
- sudo pear config-set auto_discover 1 && sudo pear install --alldeps channel://pear.phpunit.de/PHPUnit-3.6.12
- echo "extension=php_mapscript.so" | sudo tee -a /etc/php5/cli/php.ini
- cd msautotest
- ./create_postgis_test_data.sh
- cd ..
install:
- ./configure --with-gd --with-postgis --with-wmsclient --with-wfsclient --with-kml --with-cairo --with-wcs --with-proj --with-geos --with-gdal --with-ogr --with-wfs --with-sos --with-php
- make -j3
- sudo make install
- sudo ldconfig
script:
- make -j3 test
- cd msautotest/php && ./run_test.py
notifications:
email:
recipients:
- thomas.bonfort@gmail.com
irc:
channels:
- "irc.freenode.org#mapserver"
use_notice: true
......@@ -4,7 +4,7 @@
sdlime Steve Lime steve.lime at dnr.state.mn.us Overall
dan Daniel Morissette dmorissette at mapgears.com OGC Web Services, PHP MapScript
sean Sean Gillies sgillies at frii.com SWIG MapScript (retired)
assefa Assefa Yewondwossen assefa at dmsolutions.ca OGC Web Services, Flash, SVG,
assefa Assefa Yewondwossen assefay at gmail.com OGC Web Services, PHP MapScript
julien Julien-Samuel Lacroix jlacroix at dmsolutions.ca OGC Web Services
warmerdam Frank Warmerdam warmerdam at pobox.com Raster, outputFormatObj,
hobu Howard Butler hobu.inc at gmail.com mapsde.c
......
This diff is collapsed.
......@@ -10,7 +10,72 @@ MapServer Migration Guide
:depth: 2
:backlinks: top
Mapserver 6.0 to 6.2 Migration
==============================
This section documents the changes that must be made to MapServer
applications when migrating from version 6.0.x (or earlier versions)
to 6.2 (i.e. backwards incompatibilities), as well as information
on some of the new features.
--------------------
Build system changes
--------------------
If you are building MapServer from source, then the following may be of interest to you:
* Use of libtool: In version 6.2, the Unix/Linux build scripts and Makefiles were converted to use libtool. One impact of this change is that the 'mapserv' file in the main source tree is a libtool wrapper script and not the actual binary. To use 'mapserv' you actually have to use 'make install' and then point to the installed binary. More info is available in the Compiling on Unix document at http://mapserver.org/trunk/installation/unix.html#installation
* The --with-php configure option has been changed to point directly to the php-config script instead of to the directory where the PHP headers are located.
-----------
CGI Changes
-----------
* Changing MIN/MAXSCALE or MIN/MAXSCALEDENOM via URL is no longer supported.
-----------------
Rendering changes
-----------------
* STYLE->GAP interpretation
Starting in 6.2, STYLE->GAP specifies the gap between the symbols
using the centre to centre distance.
In earlier versions of Mapserver, GAP was used as the approximate
distance between the symbol boundaries.
See ticket #3867 for more information.
In order to get the same effect with 6.2 as with 6.0, STYLE->GAP
must be increased with the size of the symbol.
* Removal of one pixel gap between symbols
In earlier versions of Mapserver, an extra gap of one pixel was
added between the symbols (in addition to the gap specified in
STYLE->GAP). This has been discontinued in 6.2.
See ticket #3868 for more information.
In order to get the same effect with 6.2 as with 6.0, STYLE->GAP
must be increased with one pixel.
* STYLE->INITIALGAP introduced
Support for more powerful line styling has been provided with the
introduction of STYLE->INITIALGAP. See ticket #3879 and the
documentation for more information.
* SYMBOL->ANCHORPOINT introduced
A symbol anchorpoint has been introduced to facilitate precise
positioning of symbols. See ticket #4066 and the documentation for
more information.
* Change in vector symbol size calculation.
In 6.2, vector symbol coordinates are shifted to get rid of
negative x and y coordinate values.
See ticket #4116 for more information.
In order to get the shifting effect that could be obtained using
negative coordinate values, SYMBOL->ANCHORPOINT should be used
instead.
MapServer 5.6 to 6.0 Migration
==============================
......@@ -178,6 +243,21 @@ are evaluated in OGC WCS services. Previous versions used "wms_*"
prefixed entries as fallback which is dropped in version 6.0 in favor of
forcing explicit decisions.
-------------------------------------------------------
Mapfile Changes - OGC requests - DUMP parameter removed
-------------------------------------------------------
The DUMP LAYER parameter has been removed. To enable output of
geometries in WMS getfeatureinfo requests - GML
(INFO_FORMAT=application/vnd.ogc.gml), LAYER METADATA is used
instead::
METADATA
gml_geometries "geom"
gml_geom_type "polygon"
...
END
--------------------------------------------------------
Mapfile Changes - Ability to escape single/double quotes
--------------------------------------------------------
......@@ -185,7 +265,7 @@ Mapfile Changes - Ability to escape single/double quotes
We can now escape single and double quotes in strings and logical
expressions. Examples:
::
::
NAME "RO\"AD" # double quote inside a a double quote delimited string
NAME 'RO\'AD' # single quote inside a a single quote delimited string
......@@ -195,10 +275,10 @@ NOTE: The escape character (backslash) will only work if the
following character is ", ' or \.
For Windows users: if you have a path string delimited by single/double
quotes that ends with \, you will have to escape the last backslash.
quotes that ends with \, you will have to escape the last backslash.
::
SHAPEPATH "C:\ms4w\shapefiles\"
# should be modified to...
SHAPEPATH "C:\ms4w\shapefiles\\"
......
This diff is collapsed.
......@@ -48,7 +48,7 @@ MS_OBJS = mapbits.obj maphash.obj mapshape.obj mapxbase.obj \
mapoglrenderer.obj mapoglcontext.obj mapogl.obj \
maptile.obj $(EPPL_OBJ) $(REGEX_OBJ) mapgeomtransform.obj mapunion.obj \
mapkmlrenderer.obj mapkml.obj mapdummyrenderer.obj mapgeomutil.obj mapquantization.obj \
mapogcfiltercommon.obj mapcluster.obj $(AGG_OBJ)
mapogcfiltercommon.obj mapcluster.obj mapuvraster.obj mapservutil.obj $(AGG_OBJ)
MS_HDRS = mapserver.h mapfile.h
......
......@@ -3,7 +3,7 @@ Summary
-------
The MapServer is a system for developing web-based GIS applications.
MapServer is a system for developing web-based GIS applications.
The basic system consists of a CGI program that can be configured to
respond to a variety of spatial requests like making maps, scalebars,
and point, area and feature queries. Virtually all aspects of an
......@@ -16,10 +16,10 @@ visit:
http://www.mapserver.org/
Bug reports and enhancment submissions can be reported in the MapServer
Bugzilla at the following url. If you do make changes and/or enhancements,
issue tracker at the following url. If you do make changes and/or enhancements,
please let us know so that they might be incorporated into future releases.
http://trac.osgeo.org/mapserver
https://github.com/mapserver/mapserver/issues
Join the MapServer user mailing list online at:
......@@ -87,3 +87,4 @@ License
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -5,7 +5,7 @@ README.CONFIGURE - MapServer "configure" script compilation options
For Unix users, Mapserver comes with a GNU autoconf "configure" script
that should take care of (hopefully!) all compilation issues for you.
The configure script won't work on Windows NT. See the file README.WIN32
The configure script won't work on Windows. See the file README.WIN32
for details on compiling on Windows systems.
The default configure behavior is to try to locate on your system the most
......@@ -22,16 +22,19 @@ directory where you extracted the MapServer source code package and...
::
$ cd mapserver-6.0.x
$ cd mapserver-6.2.x
$ ./configure
$ make
$ make install
Unless something went wrong, you should have executables in the current
directory for the "mapserv" CGI program and the other utility programs.
You can copy the "mapserv" program to your HTTP server's CGI directory
and start using it.
Unless something went wrong, this should compile and install the "mapserv"
CGI program and the other utility programs.
See the MapServer web site at http://mapserver.gis.umn.edu/ for usage
You should then locate the installed "mapserv" executable and link to it
from your web server's cgi-bin directory. More information on how to do this
is available at http://mapserver.org/installation/unix.html#installation
See the MapServer web site at http://mapserver.org/ for usage
instructions.
......@@ -125,8 +128,8 @@ Optional Packages:
--with-fastcgi=path Enable FastCGI, point to installed tree.
--with-httpd Specify path to 'httpd' executable.
--with-warnings[=flags] Enable strict warnings (or user defined warnings)
--with-php=DIR Specify directory where PHP4's include files are
installed (or a pointer to the full source tree)
--with-php=yes|no|/path/to/php-config
Specify location of php-config script.
Required in order to compile the PHP/MapScript
module.
--without-ld-shared Disable shared library support
......@@ -303,8 +306,21 @@ GEOS Support:
- GEOS support is optional, and is not included by default.
MapServer requires GEOS version 2.2.3 or more recent.
- The GEOS library can be found at http://geos.refractions.net/
- The GEOS library can be found at http://trac.osgeo.org/geos/
XMP Support:
------------
::
--with-exempi=PATH
- XMP support is optional, and is not incuded by default.
- XMP support allows metadata (title, attribute, license, etc) to be directly embedded in the images generated by MapServer.
- The exempi library can be found at http://libopenraw.freedesktop.org/wiki/Exempi
OGR Support:
......@@ -683,8 +699,8 @@ PHP/MapScript module:
::
--with-php=DIR Specify directory where PHP4's include files are
installed (or a pointer to the full source tree)
--with-php=yes|no|/path/to/php-config
Specify location of php-config script.
Required in order to compile the PHP/MapScript
module.
--enable-perlv-ld-detect (applies to --with-php only)
......@@ -694,22 +710,15 @@ PHP/MapScript module:
- The --with-php option will trigger the compilation of the PHP MapScript
module in the ./mapscript/php3/ directory.
- DIR should be the location of the PHP4 or PHP5 distribution (source or dev
package). The module may work with older versions of PHP (4.1.x or 4.2.x), but
PHP 4.3.x is strongly recommended. The configure script should
automatically detect which version of PHP you are attempting to build
with and take the necessary actions.
e.g. $ ./configure --with-php=../php-4.3.11
- The PHP module has to be built as a shared library that will then
be loaded as a Dynamic Module by the PHP interpreter using the dl()
PHP command. See the Wiki for detailed build instructions for various
platforms: http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScript
See also the file ./mapscript/php3/README for more details on the
MapScript classes and functions.
module in the ./mapscript/php/ directory.
- The argument to the --with-php option is the full path to the php-config
script
e.g. $ ./configure --with-php=/usr/local/bin/php-config
- PHP MapScript now requires PHP 5.2.0 or more recent.
Support for PHP3 has been dropped after MapServer version 3.5.
Support for PHP4 has been dropped after MapServer version 5.6.
- Some libraries are used by both PHP and MapServer, and using different
versions of these libs will lead to potential crashes at runtime. In most
......
This diff is collapsed.
#!/bin/bash
ASTYLEOPTS="--style=kr --indent=spaces=2 -c --lineend=linux -S"
ASTYLEBIN=astyle
$ASTYLEBIN $ASTYLEOPTS *.c *.h *.cpp opengl/*.h
$ASTYLEBIN $ASTYLEOPTS -R 'mapscript/*.c'
$ASTYLEBIN $ASTYLEOPTS -R 'mapscript/*.h'
#find . -name '*.orig' -exec rm -f {} \;
This diff is collapsed.
......@@ -5,7 +5,7 @@
* Purpose: cgiRequestObj and CGI parsing utility related declarations.
* Author: Steve Lime and the MapServer team.
*
* Notes: Portions derived from NCSA HTTPd Server's example CGI programs (util.c).
* Notes: Portions derived from NCSA HTTPd Server's example CGI programs (util.c).
*
******************************************************************************
* Copyright (c) 1996-2005 Regents of the University of Minnesota.
......@@ -17,7 +17,7 @@
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* The above copyright notice and this permission notice shall be included in
* all copies of this Software or works derived from this Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
......@@ -47,19 +47,18 @@
enum MS_REQUEST_TYPE {MS_GET_REQUEST, MS_POST_REQUEST};
/* structure to hold request information */
typedef struct
{
typedef struct {
#ifndef SWIG
char **ParamNames;
char **ParamValues;
#endif
#ifdef SWIG
%immutable;
%immutable;
#endif
int NumParams;
#ifdef SWIG
%mutable;
%mutable;
#endif
enum MS_REQUEST_TYPE type;
......@@ -69,13 +68,13 @@ typedef struct
char *httpcookiedata;
} cgiRequestObj;
/*
** Function prototypes
*/
#ifndef SWIG
MS_DLL_EXPORT int loadParams(cgiRequestObj *request, char* (*getenv2)(const char*, void* thread_context),
MS_DLL_EXPORT int loadParams(cgiRequestObj *request, char* (*getenv2)(const char*, void* thread_context),
char *raw_post_data, ms_uint32 raw_post_data_length, void* thread_context);
MS_DLL_EXPORT void getword(char *, char *, char);
MS_DLL_EXPORT char *makeword_skip(char *, char, char);
......
......@@ -3,7 +3,7 @@
*
* Project: MapServer
* Purpose: Functions for operating on a classObj that don't belong in a
* more specific file such as mapfile.c.
* more specific file such as mapfile.c.
* Adapted from mapobject.c.
* Author: Sean Gillies, sgillies@frii.com
*
......@@ -17,7 +17,7 @@
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* The above copyright notice and this permission notice shall be included in
* all copies of this Software or works derived from this Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
......@@ -36,149 +36,180 @@
# include "cpl_conv.h"
#endif
MS_CVSID("$Id$")
/*
** Add a label to a classObj (order doesn't matter for labels like it does with styles)
*/
int msAddLabelToClass(classObj *class, labelObj *label)
{
if (!label) {
msSetError(MS_CHILDERR, "Can't add a NULL label.", "msAddLabelToClass()");
return MS_FAILURE;
}
if (msGrowClassLabels(class) == NULL) return MS_FAILURE;
/* msGrowClassLabels will alloc the label, free it in this case */
free(class->labels[class->numlabels]);
class->labels[class->numlabels] = label;
MS_REFCNT_INCR(label);
class->numlabels++;
return MS_SUCCESS;
}
/*
** Remove a label from a classObj.
*/
labelObj *msRemoveLabelFromClass(classObj *class, int nLabelIndex)
{
int i;
labelObj *label;
if (nLabelIndex < 0 || nLabelIndex >= class->numlabels) {
msSetError(MS_CHILDERR, "Cannot remove label, invalid index %d", "msRemoveLabelFromClass()", nLabelIndex);
return NULL;
} else {
label=class->labels[nLabelIndex];
for (i=nLabelIndex; i<class->numlabels-1; i++) {
class->labels[i]=class->labels[i+1];
}
class->labels[class->numlabels-1]=NULL;
class->numlabels--;
MS_REFCNT_DECR(label);
return label;
}
}
/**
* Move the style up inside the array of styles.
*/
*/
int msMoveStyleUp(classObj *class, int nStyleIndex)
{
styleObj *psTmpStyle = NULL;
if (class && nStyleIndex < class->numstyles && nStyleIndex >0)
{
psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
initStyle(psTmpStyle);
msCopyStyle(psTmpStyle, class->styles[nStyleIndex]);
msCopyStyle(class->styles[nStyleIndex],
class->styles[nStyleIndex-1]);
msCopyStyle(class->styles[nStyleIndex-1], psTmpStyle);
return(MS_SUCCESS);
}
msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveStyleUp()",
nStyleIndex);
return (MS_FAILURE);
styleObj *psTmpStyle = NULL;
if (class && nStyleIndex < class->numstyles && nStyleIndex >0) {
psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
initStyle(psTmpStyle);
msCopyStyle(psTmpStyle, class->styles[nStyleIndex]);
msCopyStyle(class->styles[nStyleIndex],
class->styles[nStyleIndex-1]);
msCopyStyle(class->styles[nStyleIndex-1], psTmpStyle);
return(MS_SUCCESS);
}
msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveStyleUp()",
nStyleIndex);
return (MS_FAILURE);
}
/**
* Move the style down inside the array of styles.
*/
*/
int msMoveStyleDown(classObj *class, int nStyleIndex)
{
styleObj *psTmpStyle = NULL;
styleObj *psTmpStyle = NULL;
if (class && nStyleIndex < class->numstyles-1 && nStyleIndex >=0)
{
psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
initStyle(psTmpStyle);
msCopyStyle(psTmpStyle, class->styles[nStyleIndex]);
if (class && nStyleIndex < class->numstyles-1 && nStyleIndex >=0) {
psTmpStyle = (styleObj *)malloc(sizeof(styleObj));
initStyle(psTmpStyle);
msCopyStyle(class->styles[nStyleIndex],
class->styles[nStyleIndex+1]);
msCopyStyle(class->styles[nStyleIndex+1], psTmpStyle);
msCopyStyle(psTmpStyle, class->styles[nStyleIndex]);
return(MS_SUCCESS);
}
msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveStyleDown()",
nStyleIndex);
return (MS_FAILURE);
msCopyStyle(class->styles[nStyleIndex],
class->styles[nStyleIndex+1]);
msCopyStyle(class->styles[nStyleIndex+1], psTmpStyle);
return(MS_SUCCESS);
}
msSetError(MS_CHILDERR, "Invalid index: %d", "msMoveStyleDown()",
nStyleIndex);
return (MS_FAILURE);
}
/* Moved here from mapscript.i
/* Moved here from mapscript.i
*
* Returns the index at which the style was inserted
*
*/
int msInsertStyle(classObj *class, styleObj *style, int nStyleIndex) {
int i;
if (!style)
{
msSetError(MS_CHILDERR, "Can't insert a NULL Style", "msInsertStyle()");
return -1;
}
/* Ensure there is room for a new style */
if (msGrowClassStyles(class) == NULL) {
return -1;
}
/* Catch attempt to insert past end of styles array */
else if (nStyleIndex >= class->numstyles) {
msSetError(MS_CHILDERR, "Cannot insert style beyond index %d", "insertStyle()", class->numstyles-1);
return -1;
}
else if (nStyleIndex < 0) { /* Insert at the end by default */
class->styles[class->numstyles]=style;
MS_REFCNT_INCR(style);
class->numstyles++;
return class->numstyles-1;
}
else if (nStyleIndex >= 0 && nStyleIndex < class->numstyles) {
/* Move styles existing at the specified nStyleIndex or greater */
/* to a higher nStyleIndex */
for (i=class->numstyles-1; i>=nStyleIndex; i--) {
class->styles[i+1] = class->styles[i];
}
class->styles[nStyleIndex]=style;
MS_REFCNT_INCR(style);
class->numstyles++;
return nStyleIndex;
}
else {
msSetError(MS_CHILDERR, "Invalid nStyleIndex", "insertStyle()");
return -1;
int msInsertStyle(classObj *class, styleObj *style, int nStyleIndex)
{
int i;
if (!style) {
msSetError(MS_CHILDERR, "Can't insert a NULL Style", "msInsertStyle()");
return -1;
}
/* Ensure there is room for a new style */
if (msGrowClassStyles(class) == NULL) {
return -1;
}
/* Catch attempt to insert past end of styles array */
else if (nStyleIndex >= class->numstyles) {
msSetError(MS_CHILDERR, "Cannot insert style beyond index %d", "insertStyle()", class->numstyles-1);