Commit a0fb5c6d authored by Bas Couwenberg's avatar Bas Couwenberg

New upstream version 7.4.0~beta1

parent bdbe4db7
......@@ -16,9 +16,9 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 7)
set (MapServer_VERSION_MINOR 2)
set (MapServer_VERSION_REVISION 2)
set (MapServer_VERSION_SUFFIX "")
set (MapServer_VERSION_MINOR 4)
set (MapServer_VERSION_REVISION 0)
set (MapServer_VERSION_SUFFIX "-beta1")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
set(TARGET_VERSION_MINOR ${MapServer_VERSION_MINOR})
......@@ -33,6 +33,10 @@ endif(MapServer_IS_DEV_VERSION)
MATH(EXPR MapServer_VERSION_NUM "${MapServer_VERSION_MAJOR}*10000+${MapServer_VERSION_MINOR}*100+${MapServer_VERSION_REVISION}")
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
# Add custom function to check Python modules are installed
include(FindPythonModule)
if (APPLE)
set(CMAKE_FIND_FRAMEWORK "LAST")
endif (APPLE)
......@@ -142,6 +146,7 @@ option(WITH_THREAD_SAFETY "Choose if a thread-safe version of libmapserver shoul
option(WITH_GIF "Enable GIF support (for PIXMAP loading)" ON)
option(WITH_PYTHON "Enable Python mapscript support" OFF)
option(WITH_PHP "Enable PHP mapscript support" OFF)
option(WITH_PHPNG "Enable PHPNG (SWIG) mapscript support" OFF)
option(WITH_PERL "Enable Perl mapscript support" OFF)
option(WITH_RUBY "Enable Ruby mapscript support" OFF)
option(WITH_JAVA "Enable Java mapscript support" OFF)
......@@ -864,6 +869,11 @@ if(WITH_PHP)
set(USE_PHP_MAPSCRIPT 1)
endif(WITH_PHP)
if(WITH_PHPNG)
add_subdirectory("mapscript/phpng")
set(USE_PHPNG_MAPSCRIPT 1)
endif(WITH_PHPNG)
if(WITH_APACHE_MODULE)
add_subdirectory("apache")
set(USE_APACHE_MODULE 1)
......@@ -895,7 +905,10 @@ ms_link_libraries( ${CMAKE_DL_LIBS} m )
endif(UNIX)
if (WIN32)
ms_link_libraries( ${MS_EXTERNAL_LIBS} ws2_32.lib)
ms_link_libraries( ${MS_EXTERNAL_LIBS} ws2_32.lib)
if (MSVC)
set_target_properties(mapserver PROPERTIES COMPILE_FLAGS "/wd4267 /wd4244 /wd4018")
endif(MSVC)
endif (WIN32)
configure_file (
......@@ -982,6 +995,7 @@ status_optional_feature("XML Mapfile support" "${USE_XMLMAPFILE}")
message(STATUS " * Mapscripts")
status_optional_feature("Python" "${USE_PYTHON_MAPSCRIPT}")
status_optional_feature("PHP" "${USE_PHP_MAPSCRIPT}")
status_optional_feature("PHPNG" "${USE_PHPNG_MAPSCRIPT}")
status_optional_feature("PERL" "${USE_PERL_MAPSCRIPT}")
status_optional_feature("RUBY" "${USE_RUBY_MAPSCRIPT}")
status_optional_feature("JAVA" "${USE_JAVA_MAPSCRIPT}")
......
......@@ -12,6 +12,17 @@ For a complete change history, please see the Git log comments. For more
details about recent point releases, please see the online changelog at:
http://mapserver.org/development/changelog/
7.4.0-beta1 release (2019-3-29)
-------------------------------
- Python MapScript binding is available as installable Wheels with a full test suite and examples
- C# MapScript binding is now compatible with .NET Core
- PHP 7 MapScript binding support - both PHP/MapScript and Swig/MapScript
- Added workaround to allow compiling against Proj 6 (#5766)
7.2.2 release (2019-2-19)
--------------------------
......@@ -26,11 +37,13 @@ http://mapserver.org/development/changelog/
--------------------------
- Fixed issue with ring handling with polygons in MVT support (#5626)
- No other major changes, see detailed changelog for bug fixes
7.2.0-beta2 release (2018-6-13)
- Update beta1 release notes to remove reference to PHP7 support
- No other major changes, see detailed changelog for bug fixes
7.2.0-beta1 release (2018-5-9)
......
......@@ -147,7 +147,7 @@ Refer to the CMakeLists.txt file for up-to-date options.
- option(WITH_THREAD_SAFETY "Choose if a thread-safe version of libmapserver should be built (only recommended for some mapscripts)" OFF)
- option(WITH_GIF "Enable GIF support (for PIXMAP loading)" ON)
- option(WITH_PYTHON "Enable Python mapscript support" OFF)
- option(WITH_PHP "Enable Python mapscript support" OFF)
- option(WITH_PHP "Enable PHP mapscript support" OFF)
- option(WITH_PERL "Enable Perl mapscript support" OFF)
- option(WITH_RUBY "Enable Ruby mapscript support" OFF)
- option(WITH_JAVA "Enable Java mapscript support" OFF)
......
......@@ -2,12 +2,13 @@ AUTOTEST_OPTS=-strict -q
PHP_MAPSCRIPT=build/mapscript/php/php_mapscript.so
PYTHON_MAPSCRIPT_PATH=build/mapscript/python
JAVA_MAPSCRIPT_PATH=build/mapscript/java
CSHARP_MAPSCRIPT_PATH=build/mapscript/csharp
BUILDPATH=../../build
FLEX=flex
YACC=yacc
CMAKEFLAGS=-DCMAKE_C_FLAGS="--coverage" -DCMAKE_CXX_FLAGS="--coverage" \
-DCMAKE_SHARED_LINKER_FLAGS="-lgcov" -DWITH_CLIENT_WMS=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_PHP=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_CSHARP=1 -DWITH_PHP=1 \
-DWITH_PYTHON=1 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=0 -DWITH_EXEMPI=1 \
-DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 -DWITH_POINT_Z_M=1
all: cmakebuild
......@@ -37,16 +38,23 @@ query-testcase:
mspython-testcase:
test -f "$(PYTHON_MAPSCRIPT_PATH)/_mapscript.so" && (export PYTHONPATH="../../$(PYTHON_MAPSCRIPT_PATH)" && cd msautotest/mspython && python run_all_tests.py)
mspython-wheel:
cd build && cmake --build . --target pythonmapscript-wheel
php-testcase:
test -f "$(PHP_MAPSCRIPT)" && (export PHP_MAPSCRIPT_SO="../../$(PHP_MAPSCRIPT)" && cd msautotest/php && ./run_test.sh)
java-testcase:
test -d "$(JAVA_MAPSCRIPT_PATH)" && (export JAVA_MAPSCRIPT_SO="../../$(JAVA_MAPSCRIPT_PATH)" && cd mapscript/java && ./run_test.sh)
csharp-testcase:
test -d "$(CSHARP_MAPSCRIPT_PATH)" && (export CSHARP_MAPSCRIPT_SO="../../$(CSHARP_MAPSCRIPT_PATH)" && cd mapscript/csharp && ./run_test.sh)
test: cmakebuild
@$(MAKE) $(MFLAGS) wxs-testcase renderers-testcase misc-testcase gdal-testcase query-testcase mspython-testcase
@./print-test-results.sh
@$(MAKE) $(MFLAGS) php-testcase
@$(MAKE) $(MFLAGS) csharp-testcase
lexer: maplexer.c
......
# - Find PHP
# This module finds if PHP is installed and determines where the include files
# and libraries are. It also determines what the name of the library is. This
# code sets the following variables:
#
# PHP_INCLUDE_PATH = path to where php.h can be found
# PHP_EXECUTABLE = full path to the php binary
#
SET(PHP_FOUND "NO")
SET(PHP_POSSIBLE_INCLUDE_PATHS
/usr/include/php
/usr/local/include/php
/usr/include/php
/usr/local/include/php
/usr/local/apache/php
${PHP_INCLUDES}
)
find_library(PHP_LIBRARY NAMES php5ts php5 php7ts php7 PATHS /sw /opt/local)
if(WIN32)
string(SUBSTRING $ENV{VSCMD_VER} 0 2 VSCMD_VER)
SET(PHP_INCLUDE_PATH "C:/php-sdk/phpmaster/vc${VSCMD_VER}/$ENV{VSCMD_ARG_TGT_ARCH}/php-src")
SET(PHP_POSSIBLE_INCLUDE_PATHS ${PHP_INCLUDE_PATH})
if(CMAKE_CL_64)
SET(PHP_INCLUDE_PATH "${PHP_INCLUDE_PATH}/$ENV{PLATFORM}")
endif(CMAKE_CL_64)
if(WITH_THREAD_SAFETY)
SET(PHP_INCLUDE_PATH "${PHP_INCLUDE_PATH}/Release_TS")
SET(PHP_LIBRARY_NAMES php5ts php7ts)
else(WITH_THREAD_SAFETY)
SET(PHP_INCLUDE_PATH "${PHP_INCLUDE_PATH}/Release")
SET(PHP_LIBRARY_NAMES php5 php7)
endif(WITH_THREAD_SAFETY)
find_library(PHP_LIBRARY NAMES ${PHP_LIBRARY_NAMES} PATHS ${PHP_INCLUDE_PATH})
endif(WIN32)
FIND_PATH(PHP_FOUND_INCLUDE_PATH main/php.h ${PHP_POSSIBLE_INCLUDE_PATHS})
IF(PHP_FOUND_INCLUDE_PATH)
SET(php_paths "${PHP_POSSIBLE_INCLUDE_PATHS}")
FOREACH(php_path Zend main TSRM)
SET(php_paths ${php_paths} "${PHP_FOUND_INCLUDE_PATH}/${php_path}")
ENDFOREACH(php_path Zend main TSRM)
SET(PHP_INCLUDE_PATH "${php_paths}" INTERNAL "PHP include paths")
ENDIF(PHP_FOUND_INCLUDE_PATH)
FIND_PROGRAM(PHP_EXECUTABLE
NAMES php
PATHS
/usr/local/bin
)
MARK_AS_ADVANCED(
PHP_EXECUTABLE
PHP_FOUND_INCLUDE_PATH
)
IF( NOT PHP_CONFIG_EXECUTABLE )
FIND_PROGRAM(PHP_CONFIG_EXECUTABLE
NAMES php-config
)
ENDIF( NOT PHP_CONFIG_EXECUTABLE )
IF(PHP_CONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${PHP_CONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE PHP_VERSION)
STRING(REPLACE "\n" "" PHP_VERSION "${PHP_VERSION}")
EXECUTE_PROCESS(COMMAND ${PHP_CONFIG_EXECUTABLE} --extension-dir
OUTPUT_VARIABLE PHP_EXTENSION_DIR)
STRING(REPLACE "\n" "" PHP_EXTENSION_DIR "${PHP_EXTENSION_DIR}")
EXECUTE_PROCESS(COMMAND ${PHP_CONFIG_EXECUTABLE} --includes
OUTPUT_VARIABLE PHP_INCLUDES)
STRING(REPLACE "-I" "" PHP_INCLUDES "${PHP_INCLUDES}")
STRING(REPLACE " " ";" PHP_INCLUDES "${PHP_INCLUDES}")
STRING(REPLACE "\n" "" PHP_INCLUDES "${PHP_INCLUDES}")
LIST(GET PHP_INCLUDES 0 PHP_INCLUDE_DIR)
set(PHP_MAIN_INCLUDE_DIR ${PHP_INCLUDE_DIR}/main)
set(PHP_TSRM_INCLUDE_DIR ${PHP_INCLUDE_DIR}/TSRM)
set(PHP_ZEND_INCLUDE_DIR ${PHP_INCLUDE_DIR}/Zend)
set(PHP_REGEX_INCLUDE_DIR ${PHP_INCLUDE_DIR}/regex)
set(PHP_EXT_INCLUDE_DIR ${PHP_INCLUDE_DIR}/ext)
set(PHP_DATE_INCLUDE_DIR ${PHP_INCLUDE_DIR}/ext/date/lib)
set(PHP_STANDARD_INCLUDE_DIR ${PHP_INCLUDE_DIR}/ext/standard)
MESSAGE(STATUS ${PHP_MAIN_INCLUDE_DIR})
IF(NOT PHP_INCLUDE_PATH)
set(PHP_INCLUDE_PATH ${PHP_INCLUDES})
ENDIF(NOT PHP_INCLUDE_PATH)
IF(PHP_VERSION LESS 5)
MESSAGE(FATAL_ERROR "PHP version is not 5 or later")
ENDIF(PHP_VERSION LESS 5)
IF(PHP_EXECUTABLE AND PHP_INCLUDES)
set(PHP_FOUND "yes")
MESSAGE(STATUS "Found PHP-Version ${PHP_VERSION} (using ${PHP_CONFIG_EXECUTABLE})")
ENDIF(PHP_EXECUTABLE AND PHP_INCLUDES)
FIND_PROGRAM(PHPUNIT_EXECUTABLE
NAMES phpunit phpunit2
PATHS
/usr/local/bin
)
IF(PHPUNIT_EXECUTABLE)
MESSAGE(STATUS "Found phpunit: ${PHPUNIT_EXECUTABLE}")
ENDIF(PHPUNIT_EXECUTABLE)
ENDIF(PHP_CONFIG_EXECUTABLE)
# - Find PHP5
# This module finds if PHP5 is installed and determines where the include files
# and libraries are. It also determines what the name of the library is. This
# code sets the following variables:
#
# PHP5_INCLUDE_PATH = path to where php.h can be found
# PHP5_EXECUTABLE = full path to the php4 binary
#
# file is derived from FindPHP4.cmake
#
SET(PHP5_FOUND "NO")
SET(PHP5_POSSIBLE_INCLUDE_PATHS
/usr/include/php5
/usr/local/include/php5
/usr/include/php
/usr/local/include/php
/usr/local/apache/php
${PHP5_INCLUDES}
)
SET(PHP5_POSSIBLE_LIB_PATHS
/usr/lib
if(WIN32)
${PHP5_INCLUDES}/Release_TS
endif(WIN32)
)
find_library(PHP5_LIBRARY
NAMES php5ts.lib
PATHS /sw /opt/local ${PHP5_INCLUDES}/Release_TS
)
FIND_PATH(PHP5_FOUND_INCLUDE_PATH main/php.h
${PHP5_POSSIBLE_INCLUDE_PATHS})
IF(PHP5_FOUND_INCLUDE_PATH)
SET(php5_paths "${PHP5_POSSIBLE_INCLUDE_PATHS}")
FOREACH(php5_path Zend main TSRM)
SET(php5_paths ${php5_paths} "${PHP5_FOUND_INCLUDE_PATH}/${php5_path}")
ENDFOREACH(php5_path Zend main TSRM)
SET(PHP5_INCLUDE_PATH "${php5_paths}" INTERNAL "PHP5 include paths")
ENDIF(PHP5_FOUND_INCLUDE_PATH)
FIND_PROGRAM(PHP5_EXECUTABLE
NAMES php5 php
PATHS
/usr/local/bin
)
MARK_AS_ADVANCED(
PHP5_EXECUTABLE
PHP5_FOUND_INCLUDE_PATH
)
IF( NOT PHP5_CONFIG_EXECUTABLE )
FIND_PROGRAM(PHP5_CONFIG_EXECUTABLE
NAMES php5-config php-config
)
ENDIF( NOT PHP5_CONFIG_EXECUTABLE )
IF(PHP5_CONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${PHP5_CONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE PHP5_VERSION)
STRING(REPLACE "\n" "" PHP5_VERSION "${PHP5_VERSION}")
EXECUTE_PROCESS(COMMAND ${PHP5_CONFIG_EXECUTABLE} --extension-dir
OUTPUT_VARIABLE PHP5_EXTENSION_DIR)
STRING(REPLACE "\n" "" PHP5_EXTENSION_DIR "${PHP5_EXTENSION_DIR}")
EXECUTE_PROCESS(COMMAND ${PHP5_CONFIG_EXECUTABLE} --includes
OUTPUT_VARIABLE PHP5_INCLUDES)
STRING(REPLACE "-I" "" PHP5_INCLUDES "${PHP5_INCLUDES}")
STRING(REPLACE " " ";" PHP5_INCLUDES "${PHP5_INCLUDES}")
STRING(REPLACE "\n" "" PHP5_INCLUDES "${PHP5_INCLUDES}")
LIST(GET PHP5_INCLUDES 0 PHP5_INCLUDE_DIR)
set(PHP5_MAIN_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/main)
set(PHP5_TSRM_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/TSRM)
set(PHP5_ZEND_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/Zend)
set(PHP5_REGEX_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/regex)
set(PHP5_EXT_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/ext)
set(PHP5_DATE_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/ext/date/lib)
set(PHP5_STANDARD_INCLUDE_DIR ${PHP5_INCLUDE_DIR}/ext/standard)
MESSAGE(STATUS ${PHP5_MAIN_INCLUDE_DIR})
IF(NOT PHP5_INCLUDE_PATH)
set(PHP5_INCLUDE_PATH ${PHP5_INCLUDES})
ENDIF(NOT PHP5_INCLUDE_PATH)
IF(PHP5_VERSION LESS 5)
MESSAGE(FATAL_ERROR "PHP version is not 5 or later")
ENDIF(PHP5_VERSION LESS 5)
IF(PHP5_EXECUTABLE AND PHP5_INCLUDES)
set(PHP5_FOUND "yes")
MESSAGE(STATUS "Found PHP5-Version ${PHP5_VERSION} (using ${PHP5_CONFIG_EXECUTABLE})")
ENDIF(PHP5_EXECUTABLE AND PHP5_INCLUDES)
FIND_PROGRAM(PHPUNIT_EXECUTABLE
NAMES phpunit phpunit2
PATHS
/usr/local/bin
)
IF(PHPUNIT_EXECUTABLE)
MESSAGE(STATUS "Found phpunit: ${PHPUNIT_EXECUTABLE}")
ENDIF(PHPUNIT_EXECUTABLE)
ENDIF(PHP5_CONFIG_EXECUTABLE)
# Find if a Python module is installed
# Found at http://www.cmake.org/pipermail/cmake/2011-January/041666.html
# To use do: find_python_module(PyQt4 REQUIRED)
function(find_python_module module)
string(TOUPPER ${module} module_upper)
if(NOT PY_${module_upper})
if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED")
set(${module}_FIND_REQUIRED TRUE)
endif()
# A module's location is usually a directory, but for binary modules
# it's a .so file.
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
"import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
RESULT_VARIABLE _${module}_status
OUTPUT_VARIABLE _${module}_location
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _${module}_status)
set(PY_${module_upper} ${_${module}_location} CACHE STRING
"Location of Python module ${module}")
endif(NOT _${module}_status)
endif(NOT PY_${module_upper})
find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
endfunction(find_python_module)
......@@ -39,105 +39,8 @@
/**
* replace wrap characters with \n , respecting maximal line length.
*
* returns a pointer to the newly allocated text. memory is controlled
* inside this function, so the caller MUST use the pointer returned by
* the function:
* text = msWrapText(label,text);
*
* TODO/FIXME: function will produce erroneous/crashing? results
* if the wrap character is encoded with multiple bytes
*
* see http://mapserver.org/development/rfc/ms-rfc-40.html
* for a summary of how wrap/maxlength interact on the result
* of the text transformation
*/
char *msWrapText(char *text, char wrap, int maxlength)
{
if(!text) /*not an error if no text*/
return text;
if(maxlength == 0) {
if(wrap!='\0') {
/* if maxlength = 0 *and* a wrap character was specified,
* replace all wrap characters by \n
* this is the traditional meaning of the wrap character
*/
msReplaceChar(text, wrap, '\n');
}
/* if neither maxlength, nor wrap were specified,
* don't transform this text */
return text;
} else if(maxlength>0) {
if(wrap!='\0') {
/* split input text at the wrap character, only if
* the current line length is over maxlength */
/* TODO: check if the wrap character is a valid byte
* inside a multibyte utf8 glyph. if so, the msCountChars
* will return an erroneous value */
int numwrapchars = msCountChars(text,wrap);
if(numwrapchars > 0) {
int num_cur_glyph_on_line = 0; /*count for the number of glyphs
on the current line*/
char *textptr = text;
char glyph[11]; /*storage for unicode fetching function*/
int glyphlen = 0; /*size of current glyph in bytes*/
while((glyphlen = msGetNextGlyph((const char**)&textptr,glyph))>0) {
num_cur_glyph_on_line++;
if(*glyph == wrap && num_cur_glyph_on_line>=(maxlength)) {
/*FIXME (if wrap becomes something other than char):*/
*(textptr-1)='\n'; /*replace wrap char with a \n*/
num_cur_glyph_on_line=0; /*reset count*/
}
}
return text;
} else {
/*there are no characters available for wrapping*/
return text;
}
} else {
/* if no wrap character was specified, but a maxlength was,
* don't draw this label if it is longer than the specified maxlength*/
if(msGetNumGlyphs(text)>maxlength) {
free(text);
return NULL;
} else {
return text;
}
}
} else {
/* negative maxlength: we split lines unconditionally, i.e. without
loooking for a wrap character*/
int numglyphs,numlines;
maxlength = -maxlength; /* use a positive value*/
numglyphs = msGetNumGlyphs(text);
numlines = (numglyphs-1) / maxlength + 1; /*count total number of lines needed
after splitting*/
if(numlines>1) {
char *newtext = msSmallMalloc(strlen(text)+numlines+1);
char *newtextptr = newtext;
char *textptr = text;
int glyphlen = 0, num_cur_glyph = 0;
while((glyphlen = msGetNextGlyph((const char**)&textptr,newtextptr))>0) {
num_cur_glyph++;
newtextptr += glyphlen;
if(num_cur_glyph%maxlength == 0 && num_cur_glyph != numglyphs) {
/*we're at a split location, insert a newline*/
*newtextptr = '\n';
newtextptr++;
}
}
free(text);
return newtext;
} else {
/*no splitting needed, return the original*/
return text;
}
}
}
void initTextPath(textPathObj *ts) {
memset(ts,0,sizeof(*ts));
......
......@@ -290,7 +290,10 @@ int mvtWriteShape( layerObj *layer, shapeObj *shape, VectorTile__Tile__Layer *mv
if( item->type && EQUAL(item->type,"Integer")) {
mvt_value->int_value = atoi(value->value);
mvt_value->has_int_value = 1;
} else if( item->type && EQUAL(item->type,"Real") ) {
} else if( item->type && EQUAL(item->type,"Long")) { /* signed */
mvt_value->sint_value = atol(value->value);
mvt_value->has_sint_value = 1;
} else if( item->type && EQUAL(item->type,"Real")) {
mvt_value->float_value = atof(value->value);
mvt_value->has_float_value = 1;
} else if( item->type && EQUAL(item->type,"Boolean") ) {
......
This diff is collapsed.
......@@ -81,8 +81,6 @@ MS_DLL_EXPORT int FLTIsLineFilter(FilterEncodingNode *psFilterNode);
MS_DLL_EXPORT int FLTIsPolygonFilter(FilterEncodingNode *psFilterNode);
MS_DLL_EXPORT int FLTValidForPropertyIsLikeFilter(FilterEncodingNode *psFilterNode);
MS_DLL_EXPORT char *FLTGetMapserverIsPropertyExpression(FilterEncodingNode *psFilterNode,
layerObj *lp);
MS_DLL_EXPORT int FLTIsOnlyPropertyIsLike(FilterEncodingNode *psFilterNode);
MS_DLL_EXPORT void FLTInsertElementInNode(FilterEncodingNode *psFilterNode,
......@@ -95,18 +93,12 @@ MS_DLL_EXPORT int FLTIsSpatialFilterType(const char *pszValue);
MS_DLL_EXPORT int FLTIsTemporalFilterType(const char *pszValue);
MS_DLL_EXPORT int FLTIsSupportedFilterType(CPLXMLNode *psXMLNode);
MS_DLL_EXPORT char *FLTGetMapserverExpression(FilterEncodingNode *psFilterNode, layerObj *lp);
MS_DLL_EXPORT char *FLTGetNodeExpression(FilterEncodingNode *psFilterNode, layerObj *lp);
MS_DLL_EXPORT const char *FLTGetBBOX(FilterEncodingNode *psFilterNode, rectObj *psRect);
const char* FLTGetDuring(FilterEncodingNode *psFilterNode, const char** ppszTimeField);
MS_DLL_EXPORT shapeObj *FLTGetShape(FilterEncodingNode *psFilterNode, double *pdfDistance,
int *pnUnit);
MS_DLL_EXPORT char *FLTGetLogicalComparisonExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp);
MS_DLL_EXPORT char *FLTGetBinaryComparisonExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp);
MS_DLL_EXPORT char *FLTGetIsBetweenComparisonExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp);
MS_DLL_EXPORT char *FLTGetIsLikeComparisonExpression(FilterEncodingNode *psFilterNode);
MS_DLL_EXPORT int FLTHasSpatialFilter(FilterEncodingNode *psFilterNode);
......
......@@ -4421,9 +4421,9 @@ static int msOGRLayerInitItemInfo(layerObj *layer)
}
if(itemindexes[i] == -1) {
msSetError(MS_OGRERR,
"Invalid Field name: %s",
"Invalid Field name: %s in layer `%s'",
"msOGRLayerInitItemInfo()",
layer->items[i]);
layer->items[i], layer->name ? layer->name : "(null)");
return(MS_FAILURE);
}
}
......
......@@ -37,6 +37,9 @@
extern "C" {
#endif
/* workaround to allow compiling against Proj 6.x (#5766) */
#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
#ifdef USE_PROJ
# include <proj_api.h>
#if PJ_VERSION >= 470 && PJ_VERSION < 480
......
MapServer MapScript Modules
===========================
Much of MapServer's functionality is accessible from Java, Perl, PHP, Python,
Ruby, C#, and Tcl. MapScript is not a language like JavaScript or Python. It
is a loadable module that brings MapServer capabilities to your favorite high
level programming language.
PHP and SWIG Branches of MapScript
----------------------------------
The MapScript family tree looks like this:
::
MapServer
/\
/ \
/ \
PHPMapScript \ SWIGMapScript
PHP5/7 +----+-----+----+----+--+----+------------+
| | | | | | | |
Perl Python Ruby Java C# Tcl PHP7 (PHPNG) ...
The SWIGMapScript modules are generated by `SWIG <http://www.swig.org>`_.
The PHPMapScript module is developed using the PHP C API without using SWIG.
PHP users therefore have a choice of using the SWIG generated module or the
custom written PHP module.
PHPMapScript
------------
Source code, detailed installation instructions are located in the ``mapscript/php``
folder. Documentation can be found in the `PHP MapScript Documentation <https://www.mapserver.org/mapscript/php/index.html>`_
section.
SWIG MapScript
--------------
Installation instructions are located in the individual languages
directories such as ``mapscript/perl``, ``mapscript/python``.
The main MapScript SWIG interface file is ``mapscript/mapscript.i``. This
file includes specific class interface files from ``mapscript/swiginc`` and
language specific code from the language directories.
Note the **v8** folder contains files for `V8 MapScript Support <https://mapserver.org/installation/v8.html>`_.
This is not a JavaScript version of MapScript, but provides support for the use of JavaScript
in `STYLEITEM <https://mapserver.org/mapfile/styleitem.html#styleitemjs>`_ and
`GEOTRANSFORM <https://mapserver.org/mapfile/geomtransform.html#geomtransformjs>`_.
API Documentation can be found at the `Shared SWIG MapScript Documentation <https://mapserver.org/mapscript/index.html>`_
page.
.. $Id$
MapServer Mapscript Modules
===========================
Much of MapServer's functionality is accessible from Java, Perl, PHP, Python,
Ruby, and Tcl. Mapscript is not a language like Javascript or Postscript. It
is a loadable module that brings MapServer capabilities to your favorite high
level programming language.
PHP and SWIG Branches of Mapscript
----------------------------------
The mapscript family tree looks like this:
::
MapServer
/\
/ \
/ \
PHPMapScript \ SWIGMapScript
PHP4 +----+-----+----+----+----+
| | | | | |
Perl Python Ruby Java Tcl ...
The Perl, Python, Ruby flavors are like brothers and sisters and the PHP3
module is like a very close cousin to them. The Java, Perl, Python, Ruby,
and Tcl modules are generated using SWIG (http://www.swig.org) while the
PHP3/PHP4 module is developed using the PHP C API without using SWIG.
PHP3/PHP4
---------
Source code, detailed installation instructions, and module API are located
under mapscript/php3.
SWIG Mapscript
--------------
Installation instructions are located in the individual languages
directories such as mapscript/perl, mapscript/python. The shared API
is documented in the file mapscript/doc/mapscript.txt.
The main mapscript SWIG interface file is mapscript/mapscript.i. This
file includes specific class interface files from mapscript/swiginc and
language specific code from the language directories.
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
FIND_PROGRAM (CSHARP_COMPILER NAMES csc gmcs gmcs2)
FIND_PROGRAM (CSHARP_COMPILER NAMES csc mcs gmcs gmcs2)
IF (CSHARP_COMPILER)
MESSAGE(STATUS "Found CSharp compiler: ${CSHARP_COMPILER}")
......@@ -25,6 +25,8 @@ if (WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(PLATFORM_TARGET ${PLATFORM_TARGET} /debug:full)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
else()
set (KEYFILE_SPEC -keyfile:${PROJECT_SOURCE_DIR}/mapscript/csharp/mapscript.snk)
endif(WIN32)
MARK_AS_ADVANCED(CSHARP_COMPILER)
......@@ -33,33 +35,65 @@ include_directories(${PROJECT_SOURCE_DIR}/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/mapscript/csharp)
SET (CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}")
SET( CMAKE_SWIG_FLAGS -namespace OSGeo.MapServer ${MAPSERVER_COMPILE_DEFINITIONS} -DWIN32)
SWIG_ADD_MODULE(mapscript csharp ../mapscript.i)
SET( CMAKE_SWIG_FLAGS -namespace OSGeo.MapServer ${MAPSERVER_COMPILE_DEFINITIONS})