Skip to content
Commits on Source (13)
......@@ -17,7 +17,7 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 7)
set (MapServer_VERSION_MINOR 4)
set (MapServer_VERSION_REVISION 2)
set (MapServer_VERSION_REVISION 3)
set (MapServer_VERSION_SUFFIX "")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
......
......@@ -12,6 +12,11 @@ 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.3 release (2019-12-16)
--------------------------
- No major changes, see detailed changelog for bug fixes
7.4.2 release (2019-9-13)
-------------------------
......
mapserver (7.4.3-1~bpo10+1) buster-backports; urgency=medium
* Rebuild for buster-backports.
-- Bas Couwenberg <sebastic@debian.org> Sun, 22 Dec 2019 06:37:42 +0100
mapserver (7.4.3-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.4.1, no changes.
* Drop Provides: ${python3:Provides}.
* Change python3-all{,-dev} build dependency to python3{,-dev},
only the default interpreter is used.
* Drop Name field from upstream metadata.
* Drop unused overrides for file-references-package-build-path.
* Update symbols for amd64.
* Rename TODO.Debian to TODO.
-- Bas Couwenberg <sebastic@debian.org> Tue, 17 Dec 2019 05:34:32 +0100
mapserver (7.4.2-1~bpo10+1) buster-backports; urgency=medium
* Rebuild for buster-backports.
......
......@@ -36,8 +36,8 @@ Build-Depends: debhelper (>= 9.20160114),
pkg-config,
pkg-kde-tools,
protobuf-c-compiler,
python3-all,
python3-all-dev,
python3,
python3-dev,
python3-setuptools,
swig,
docbook2x,
......@@ -45,7 +45,7 @@ Build-Depends: debhelper (>= 9.20160114),
docbook-xml,
xsltproc
Build-Conflicts: libcurl3-openssl-dev
Standards-Version: 4.4.0
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/debian-gis-team/mapserver
Vcs-Git: https://salsa.debian.org/debian-gis-team/mapserver.git -b buster-backports
Homepage: http://www.mapserver.org
......@@ -211,7 +211,6 @@ Depends: ttf-bitstream-vera,
${misc:Depends}
Suggests: mapserver-bin,
mapserver-doc
Provides: ${python3:Provides}
Description: Python library for MapServer
Python MapScript provides MapServer functions for Python scripts.
.
......
# https://github.com/mapserver/mapserver/issues/5746
file-references-package-build-path *
# https://github.com/mapserver/mapserver/issues/5746
file-references-package-build-path *
# https://github.com/mapserver/mapserver/issues/5746
file-references-package-build-path *
# SymbolsHelper-Confirmed: 7.4.2 amd64
# SymbolsHelper-Confirmed: 7.4.3 amd64
libmapserver.so.2 #PACKAGE# #MINVER#
* Build-Depends-Package: libmapserver-dev
BuildExpressionTree@Base 6.2.1
CleanVSIDir@Base 6.2.1
CompareEllipseRegion@Base 6.2.1
CompareRectangleRegion@Base 6.2.1
DefineAxis@Base 6.2.1
......@@ -942,6 +941,7 @@ libmapserver.so.2 #PACKAGE# #MINVER#
msCircleDrawLineSymbol@Base 7.0.0
msCircleDrawShadeSymbol@Base 6.2.1
msClassifyRasterBuffer@Base 6.2.1
msCleanVSIDir@Base 7.4.3
msCleanup@Base 6.2.1
msCleanupKernelDensityDataset@Base 7.0.0
msClipPolygonRect@Base 6.2.1
......
# https://github.com/mapserver/mapserver/issues/5746
file-references-package-build-path *
# https://github.com/mapserver/mapserver/issues/5746
file-references-package-build-path *
......@@ -3,6 +3,5 @@ Bug-Database: https://github.com/mapserver/mapserver/issues
Bug-Submit: https://github.com/mapserver/mapserver/issues/new
Contact: The MapServer team <mapserver-dev@lists.osgeo.org>
FAQ: http://mapserver.org/faq.html
Name: MapServer
Repository: https://github.com/mapserver/mapserver.git
Repository-Browse: https://github.com/mapserver/mapserver
......@@ -1354,7 +1354,6 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
if(map->querymap.style == MS_NORMAL || status != MS_SUCCESS) return(status);
}
/* if MS_HILITE, alter the one style (always at least 1 style), and set a MINDISTANCE for the labelObj to avoid duplicates */
if(map->querymap.style == MS_HILITE) {
if (layer->numclasses > 0) {
......@@ -1377,6 +1376,11 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
colorbuffer[i] = layer->class[i]->styles[0]->outlinecolor; /* if no color, save the outlinecolor from the BOTTOM style */
layer->class[i]->styles[0]->outlinecolor = map->querymap.color;
}
} else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) { /* alter BOTTOM style for lines with outlines */
if(MS_VALID_COLOR(layer->class[i]->styles[0]->color)) {
colorbuffer[i] = layer->class[i]->styles[0]->color; /* save the color from the BOTTOM style */
layer->class[i]->styles[0]->color = map->querymap.color;
} /* else ??? */
} else if (layer->class[i]->numstyles > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color)) {
colorbuffer[i] = layer->class[i]->styles[layer->class[i]->numstyles-1]->color; /* save the color from the TOP style */
......@@ -1388,7 +1392,7 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
} else if (layer->class[i]->numlabels > 0) {
colorbuffer[i] = layer->class[i]->labels[0]->color;
layer->class[i]->labels[0]->color = map->querymap.color;
}
} /* else ??? */
mindistancebuffer[i] = -1; /* RFC77 TODO: only using the first label, is that cool? */
if(layer->class[i]->numlabels > 0) {
......@@ -1428,19 +1432,28 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
}
cache = MS_FALSE;
if(layer->type == MS_LAYER_LINE && layer->class[shape.classindex]->numstyles > 1)
if(layer->type == MS_LAYER_LINE && (layer->class[shape.classindex]->numstyles > 1 || (layer->class[shape.classindex]->numstyles == 1 && layer->class[shape.classindex]->styles[0]->outlinewidth > 0))) {
int i;
cache = MS_TRUE; /* only line layers with multiple styles need be cached (I don't think POLYLINE layers need caching - SDL) */
/* we can't handle caching with attribute binding other than for the first style (#3976) */
for(i=1; i<layer->class[shape.classindex]->numstyles; i++) {
if(layer->class[shape.classindex]->styles[i]->numbindings > 0) cache = MS_FALSE;
}
}
if(annotate && layer->class[shape.classindex]->numlabels > 0) {
drawmode |= MS_DRAWMODE_LABELS;
}
if(cache) {
drawmode |= MS_DRAWMODE_SINGLESTYLE;
status = msDrawShape(map, layer, &shape, image, 0, drawmode); /* draw only the first style */
}
else
styleObj *pStyle = layer->class[shape.classindex]->styles[0];
if (pStyle->outlinewidth > 0) msOutlineRenderingPrepareStyle(pStyle, map, layer, image);
status = msDrawShape(map, layer, &shape, image, 0, drawmode|MS_DRAWMODE_SINGLESTYLE); /* draw only the first style */
if (pStyle->outlinewidth > 0) msOutlineRenderingRestoreStyle(pStyle, map, layer, image);
} else {
status = msDrawShape(map, layer, &shape, image, -1, drawmode); /* all styles */
}
if(status != MS_SUCCESS) {
msLayerClose(layer);
msFree(colorbuffer);
......@@ -1467,19 +1480,36 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
if(shpcache) {
int s;
for(s=1; s<maxnumstyles; s++) {
for(s=0; s<maxnumstyles; s++) {
for(current=shpcache; current; current=current->next) {
if(layer->class[current->shape.classindex]->numstyles > s) {
styleObj *curStyle = layer->class[current->shape.classindex]->styles[s];
styleObj *pStyle = layer->class[current->shape.classindex]->styles[s];
if(pStyle->_geomtransform.type != MS_GEOMTRANSFORM_NONE)
continue; /* skip this as it has already been rendered */
if(map->scaledenom > 0) {
if((curStyle->maxscaledenom != -1) && (map->scaledenom >= curStyle->maxscaledenom))
if((pStyle->maxscaledenom != -1) && (map->scaledenom >= pStyle->maxscaledenom))
continue;
if((curStyle->minscaledenom != -1) && (map->scaledenom < curStyle->minscaledenom))
if((pStyle->minscaledenom != -1) && (map->scaledenom < pStyle->minscaledenom))
continue;
}
if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, &current->shape, (layer->class[current->shape.classindex]->styles[s]), layer->scalefactor)))
return MS_FAILURE;
if(s==0 && pStyle->outlinewidth>0 && MS_VALID_COLOR(pStyle->color)) {
if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, &current->shape, pStyle, layer->scalefactor))) {
return MS_FAILURE;
}
} else if(s>0) {
if (pStyle->outlinewidth > 0 && MS_VALID_COLOR(pStyle->outlinecolor)) {
msOutlineRenderingPrepareStyle(pStyle, map, layer, image);
if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, &current->shape, pStyle, layer->scalefactor))) {
return MS_FAILURE;
}
msOutlineRenderingRestoreStyle(pStyle, map, layer, image);
}
/* draw a valid line, i.e. one with a color defined or of type pixmap */
if(MS_VALID_COLOR(pStyle->color) || (pStyle->symbol<map->symbolset.numsymbols && (map->symbolset.symbol[pStyle->symbol]->type == MS_SYMBOL_PIXMAP || map->symbolset.symbol[pStyle->symbol]->type == MS_SYMBOL_SVG))) {
if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, &current->shape, pStyle, layer->scalefactor)))
return MS_FAILURE;
}
}
}
}
}
......@@ -1496,20 +1526,21 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
layer->class[i]->styles[0]->color = colorbuffer[i];
else if(MS_VALID_COLOR(layer->class[i]->styles[0]->outlinecolor))
layer->class[i]->styles[0]->outlinecolor = colorbuffer[i]; /* if no color, restore outlinecolor for the BOTTOM style */
} else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[0]->color))
layer->class[i]->styles[0]->color = colorbuffer[i];
} else if (layer->class[i]->numstyles > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color))
layer->class[i]->styles[layer->class[i]->numstyles-1]->color = colorbuffer[i];
else if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->outlinecolor))
layer->class[i]->styles[layer->class[i]->numstyles-1]->outlinecolor = colorbuffer[i]; /* if no color, restore outlinecolor for the TOP style */
}
else if (layer->class[i]->numlabels > 0) {
if(MS_VALID_COLOR(layer->class[i]->labels[0]->color))
layer->class[i]->labels[0]->color = colorbuffer[i];
} else if (layer->class[i]->numlabels > 0) {
if(MS_VALID_COLOR(layer->class[i]->labels[0]->color))
layer->class[i]->labels[0]->color = colorbuffer[i];
}
if(layer->class[i]->numlabels > 0)
layer->class[i]->labels[0]->mindistance = mindistancebuffer[i]; /* RFC77 TODO: again, only using the first label, is that cool? */
}
msFree(colorbuffer);
......
......@@ -112,13 +112,13 @@ void msGDALCleanup( void )
}
/************************************************************************/
/* CleanVSIDir() */
/* msCleanVSIDir() */
/* */
/* For the temporary /vsimem/msout directory we need to be sure */
/* things are clean before we start, and after we are done. */
/************************************************************************/
void CleanVSIDir( const char *pszDir )
void msCleanVSIDir( const char *pszDir )
{
char **papszFiles = CPLReadDir( pszDir );
......@@ -129,7 +129,7 @@ void CleanVSIDir( const char *pszDir )
|| strcasecmp(papszFiles[i],"..") == 0 )
continue;
VSIUnlink( papszFiles[i] );
VSIUnlink( CPLFormFilename(pszDir, papszFiles[i], NULL) );
}
CSLDestroy( papszFiles );
......@@ -192,7 +192,7 @@ int msSaveImageGDAL( mapObj *map, imageObj *image, const char *filenameIn )
if( bUseXmp == MS_FALSE && GDALGetMetadataItem( hOutputDriver, GDAL_DCAP_VIRTUALIO, NULL )
!= NULL ) {
CleanVSIDir( "/vsimem/msout" );
msCleanVSIDir( "/vsimem/msout" );
filenameToFree = msTmpFile(map, NULL, "/vsimem/msout/", pszExtension );
}
......@@ -503,7 +503,7 @@ int msSaveImageGDAL( mapObj *map, imageObj *image, const char *filenameIn )
VSIFCloseL( fp );
VSIUnlink( filename );
CleanVSIDir( "/vsimem/msout" );
msCleanVSIDir( "/vsimem/msout" );
msFree( filenameToFree );
}
......
......@@ -2475,7 +2475,7 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
if ( !bOffsetAlreadyAdded && psInfo->bPaging && layer->startindex > 0 ) {
char szOffset[50];
snprintf(szOffset, sizeof(szOffset), " OFFSET %d", layer->startindex);
snprintf(szOffset, sizeof(szOffset), " OFFSET %d", layer->startindex-1);
select = msStringConcatenate(select, szOffset);
}
......@@ -3469,7 +3469,7 @@ static int msOGRExtractTopSpatialFilter( msOGRFileInfo *info,
pSpatialFilterNode);
}
if( expr->m_nToken == MS_TOKEN_COMPARISON_INTERSECTS &&
if( (expr->m_nToken == MS_TOKEN_COMPARISON_INTERSECTS || expr->m_nToken == MS_TOKEN_COMPARISON_CONTAINS ) &&
expr->m_aoChildren.size() == 2 &&
expr->m_aoChildren[1]->m_nToken == MS_TOKEN_LITERAL_SHAPE )
{
......
......@@ -4025,6 +4025,8 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
msFree(snippet);
msFree(stresc);
} else if(filter->type == MS_EXPRESSION) {
int ieq_expected = MS_FALSE;
if(msPostGISParseData(layer) != MS_SUCCESS) return MS_FAILURE;
if(layer->debug >= 2) msDebug("msPostGISLayerTranslateFilter. String: %s.\n", filter->string);
......@@ -4039,7 +4041,9 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
*/
if(node->token == MS_TOKEN_BINDING_TIME) {
bindingToken = node->token;
} else if(node->token == MS_TOKEN_COMPARISON_EQ || node->token == MS_TOKEN_COMPARISON_NE ||
} else if(node->token == MS_TOKEN_COMPARISON_EQ ||
node->token == MS_TOKEN_COMPARISON_IEQ ||
node->token == MS_TOKEN_COMPARISON_NE ||
node->token == MS_TOKEN_COMPARISON_GT || node->token == MS_TOKEN_COMPARISON_GE ||
node->token == MS_TOKEN_COMPARISON_LT || node->token == MS_TOKEN_COMPARISON_LE ||
node->token == MS_TOKEN_COMPARISON_IN) {
......@@ -4090,7 +4094,10 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
msFreeCharArray(strings, nstrings);
} else {
strtmpl = "'%s'";
if(comparisonToken == MS_TOKEN_COMPARISON_IEQ)
strtmpl = "lower('%s')";
else
strtmpl = "'%s'";
stresc = msPostGISEscapeSQLParam(layer, node->tokenval.strval);
snippet = (char *) msSmallMalloc(strlen(strtmpl) + strlen(stresc));
sprintf(snippet, strtmpl, stresc);
......@@ -4138,7 +4145,11 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
case MS_TOKEN_BINDING_DOUBLE:
case MS_TOKEN_BINDING_INTEGER:
case MS_TOKEN_BINDING_STRING:
if(node->token == MS_TOKEN_BINDING_STRING || node->next->token == MS_TOKEN_COMPARISON_RE || node->next->token == MS_TOKEN_COMPARISON_IRE)
if (node->token == MS_TOKEN_BINDING_STRING && node->next->token == MS_TOKEN_COMPARISON_IEQ ) {
strtmpl = "lower(%s::text)";
ieq_expected = MS_TRUE;
}
else if(node->token == MS_TOKEN_BINDING_STRING || node->next->token == MS_TOKEN_COMPARISON_RE || node->next->token == MS_TOKEN_COMPARISON_IRE)
strtmpl = "%s::text"; /* explicit cast necessary for certain operators */
else
strtmpl = "%s";
......@@ -4184,8 +4195,19 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
native_string = msStringConcatenate(native_string, msExpressionTokenToString(node->token));
break;
/* unsupported tokens */
case MS_TOKEN_COMPARISON_IEQ:
if( ieq_expected )
{
native_string = msStringConcatenate(native_string, "=");
ieq_expected = MS_FALSE;
}
else
{
goto cleanup;
}
break;
/* unsupported tokens */
case MS_TOKEN_COMPARISON_BEYOND:
case MS_TOKEN_FUNCTION_TOSTRING:
case MS_TOKEN_FUNCTION_ROUND:
......
......@@ -30,6 +30,12 @@
============================================================================
*/
%begin %{
#ifdef _MSC_VER
#define SWIG_PYTHON_INTERPRETER_NO_DEBUG
#endif
%}
#ifndef SWIGPHPNG
%module mapscript
#else
......@@ -191,7 +197,7 @@ typedef struct {
============================================================================
*/
#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGRUBY)
#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGRUBY) || defined(SWIGPHP7)
%include "../mserror.i"
#endif
......
......@@ -146,8 +146,8 @@ static zend_always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isre
#endif /* PHP_VERSION_ID < 70000 */
#if PHP_VERSION_ID >= 70300
#define MAPSCRIPT_ADDREF(zv) zend_gc_addref(&(Z_COUNTED(zv))->gc)
#define MAPSCRIPT_ADDREF_P(p) zend_gc_addref(&(Z_COUNTED_P(p))->gc)
#define MAPSCRIPT_ADDREF(zv) if(!Z_ISUNDEF(zv)) GC_ADDREF(Z_COUNTED(zv))
#define MAPSCRIPT_ADDREF_P(p) if(!Z_ISUNDEF(*p)) GC_ADDREF(Z_COUNTED_P(p))
#else
#if PHP_VERSION_ID >= 70000
#define MAPSCRIPT_ADDREF(zv) if(!(Z_ISUNDEF(zv))) GC_REFCOUNT(Z_COUNTED(zv))++;
......@@ -163,7 +163,7 @@ static zend_always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isre
if (!(Z_ISUNDEF(zv))) \
{ \
zend_refcounted *_gc = Z_COUNTED(zv); \
zend_gc_delref(&_gc->gc); \
GC_DELREF(_gc); \
if(GC_REFCOUNT(_gc) == 0) \
rc_dtor_func(_gc); \
ZVAL_UNDEF(&zv); \
......
......@@ -3,3 +3,28 @@
php_info_print_table_row(2, \"MapServer Version\", msGetVersion());
php_info_print_table_end();
"
/* To support imageObj::getBytes */
%typemap(out) gdBuffer {
RETVAL_STRINGL((const char*)$1.data, $1.size);
if( $1.owns_data )
msFree($1.data);
}
/* Module initialization: call msSetup() and register msCleanup() */
%init %{
if (msSetup() != MS_SUCCESS)
{
msSetError(MS_MISCERR, "Failed to set up threads and font cache",
"msSetup()");
}
%}
%mshutdown {
msCleanup();
}
......@@ -2783,6 +2783,9 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
/* ==================================================================== */
MS_DLL_EXPORT int msSaveImageGDAL( mapObj *map, imageObj *image, const char *filename );
MS_DLL_EXPORT int msInitDefaultGDALOutputFormat( outputFormatObj *format );
#ifdef USE_GDAL
void msCleanVSIDir( const char *pszDir );
#endif
/* ==================================================================== */
/* prototypes for functions in mapogroutput.c */
......