Commit 4661a0d7 authored by Bas Couwenberg's avatar Bas Couwenberg

Imported Upstream version 7.0.1

parent 26441092
language: php
php:
- 5.5
- 5.6
env:
global:
# Encrypted private key of the deploy key of the github.com/mapserver/coverage.git repository
- secure: "B1Tt18Q4F82+cXlj4fBoZDiyWbXLuzpJD6jt828qiS/i9ws8IEqYF7x3V4fo\nAnO1pZ84hdIOEfcSj2tFnysCPZ+zpOPzN2ma7iVEgmFTPNXf8pSx8CTXtiI/\nohUEcnARRCyuCK7cjEP5m4iWGazI+Pc563X4g67ToRPkLhIdrEg="
- secure: "OvxCriM3Dwa0wkZ+nQL8e6nuMrG2hrfET+QEPRps/fPSGSR+yRWo04hBqRn2\niBTJGpi0JvaTN0pxjCx2I/+4jbzkNt+J6IqSz2KTUzseiWA3tyAN8uel6fIo\nkS90UJ7OeKUuYkvzfVwYn6pxM6b+CN6+DTs0dlWgxyMg/AtVdz8="
- secure: "Vcf+jOzNtXapBf8qfM8N0ZTarQ9B7qqvG8X8fLJP5M2uDO2BrruMIZPpxwcL\nGMBkkZZGuofeqOs+BNxwnO1l4YOC+JUzQGQnExbEi02QDVzdR4+3sUvruXtL\nU/ppXvjghchgqvVp8QMjiVkUG1Ja1qwwCDM0GSN/PTfBy+Pjav0="
- secure: "FcCFPhMjgeAcSMFiTaZC6cp3IrAP9PvpAiuiKchG2smlQe85nvwdUbap7aFu\nJ8ujnuqzQJ1pc2+GAtCn0OZZ1Bh9mW31FEESiU74TphaKOFY8qAKrR7TamWx\n5XLqHvNu16LlOy/Cy8G82dMCGzPJCadM/ZwdI/RsWwRqjHgIHv0="
- secure: "Zs2+0yF2P6WWVT4o1kmgkSRmHUL1dkAYk+tHU0Piie+czblouMmqdJwsBNP6\nQF454VinL3Pu2tgbDAF10V+HknW/0ZevvmcrNa9k+Hjry8VtMNdM7jMqv4it\nYU5IGR55wfRg5q6c1jRxIPwc3Ssh2VOlz7HByppPG6i37prYO8I="
- secure: "rnFScHTmX9VDMUquOlP1FPGCr/GpCu64xw4m5AC5nIP/BCSdFSak02cc/JgC\nJPvuoud5xftyBspPRDB2eBP4YXOcPuSEdysibpGGBagKj7faCNQmCZSDd3zR\nWvLJwlfuQ39PoTIHU6O/TCX4U+v/gm4WJMwm1Tip1ID+wqqyoNU="
- secure: "h57JVvts9A0XF9ckGGokZwuD1hTBDOS0o1Yq3lD0Xd2BeJrgAXwgnKsBnBNP\nEMTBfRLGVyTgR8hiamySlWUUyVVQXMuLvKu1JnlrnZltMC8YGH4QEQwc7Twj\ni2GmsouUUHGOHU10U1F+YllSWZJjfLa6kgjkMNHg617c+PZfPLg="
- secure: "gB/9lGc5o6xeJSLler3s5ZmP0Kn+x1knSw5BIUQkke7rzWlMIaeZHqEf1iQm\n49Q2Aepo0I+RdAaGNlPHR3KrUc3P3/ZokWZ1zv449Mh0OKLNrLSE+CruuVYj\n2XcOrLC2vjSsMfaM9520spdjbvVpcTUKJho9kGRTPKLs8YbGLv8="
- secure: "px+guXOAtfmiBRub6sgvzlidKEmCNVthyAcaRHRzdtl6j7XoXHPGL2QHb8YH\nxV/wtDnLFIZi1eoShpLwABGvqQ1KQ20X+nz8FWZDnmDK3PXVBTqaUMyarmEB\nT7UohY94d8S2NqWJqeiOqVfMBOsIve9N1g3mcSUAlYMngEYoVt0="
- secure: "jPxrLpA61LxMH2a8k9P22l3/7Yx+Lhzmrne61xkFGo1F9oqwHap88AKm0gP3\nEApgDmCVRvHgetfEFIxapF+6yPZinE0EsqJonKS1NCeKjs91LMsM7Dr3UiU3\nNaco2w3B0v6dDOdG1JhAV6N/CqdWXz85hooSWsLrWpYMtPbOfJQ="
- secure: "dFvmnenj189QmbFdTW2ckHPbYojouowtz8cURDrR/2BiU0a3GUUDHP0h9O+c\nLDfJ1g03hsMr8m/45QdpL/x2lROimczFNu/U+uS8Vtja1z4SYaOMDjW4p3pq\nqPzQc/WmlpBY8wmfCH1WqmRRPvrfKceEDtVhWXruxpSZUx/OvoY="
- secure: "TmOZmx8kyEOCUOMmWKuPpK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cccWhW3AjDfHKO9OlV2VR90NkWKz4="
- secure: "OJqQvNnWc0MWNOxsyhtfnn6XLj3Ssmcl+nRAp2KBwI691HvXMDsqmIXBEjq1\nql+iuNn7sxn9v+ooGXmrFS9CHndncmtKEvNzdi1HKlJhEAG0+MCYnwYwaQHr\n+6HhCnLoZ2wiE+OANFjodkQRNQ4VyATOEn5WFnp56CEtiFQiNzM="
compiler:
- gcc
- clang
before_install:
- mkdir tmp
- cd tmp
- wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.38.tar.bz2
- tar xjf harfbuzz-0.9.38.tar.bz2
- cd harfbuzz-0.9.38
- ./configure --without-cairo --without-glib --without-icu
- make -j3
- sudo make install && sudo ldconfig
- cd ../..
- sudo mv /etc/apt/sources.list.d/pgdg-source.list* /tmp
- sudo apt-get remove postgis libpq5 libpq-dev postgresql-9.1-postgis postgresql-9.2-postgis postgresql-9.3-postgis postgresql-9.1 postgresql-9.2 postgresql-9.3 libgdal1
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update
- sudo apt-get install bison flex python-lxml libfribidi-dev swig cmake librsvg2-dev colordiff postgis postgresql-9.1 postgresql-9.1-postgis-2.1 postgresql-9.1-postgis-2.1-scripts libpq-dev libpng12-dev libjpeg-dev libgif-dev libgeos-dev libgd2-xpm-dev libfreetype6-dev libfcgi-dev libcurl4-gnutls-dev libcairo2-dev libgdal1-dev libproj-dev libxml2-dev python-dev php5-dev libexempi-dev lcov lftp
- sudo pip install git+git://github.com/tbonfort/cpp-coveralls.git@extensions
- ./install-msautotest.sh
- cd msautotest
- ./create_postgis_test_data.sh
- python -m SimpleHTTPServer &> /dev/null &
- cd ..
- touch maplexer.l
- touch mapparser.y
script:
- ./run-test-suite.sh
after_success:
# Only run coverage when it is safe to do so (not on pull requests), and only on master branch
- echo "$TRAVIS_SECURE_ENV_VARS"
- echo "$TRAVIS_BRANCH"
- sh -c 'if test "$TRAVIS_SECURE_ENV_VARS" = "true" -a "$TRAVIS_BRANCH" = "master"; then echo "run coverage"; ./run_code_coverage_upload.sh; fi'
- coveralls --exclude renderers --exclude mapscript --exclude apache --exclude build/mapscript/mapscriptJAVA_wrap.c --exclude build/mapscript/mapscriptPYTHON_wrap.c --exclude shp2img.c --exclude legend.c --exclude scalebar.c --exclude msencrypt.c --exclude sortshp.c --exclude shptreevis.c --exclude shptree.c --exclude testexpr.c --exclude sym2img.c --exclude testcopy.c --exclude shptreetst.c --exclude tile4ms.c --extension .c --extension .cpp
notifications:
email:
recipients:
- thomas.bonfort@gmail.com
irc:
channels:
- "irc.freenode.org#mapserver"
use_notice: true
This diff is collapsed.
============ ===================== =================================== ================================
Login(s) Name Email / Contact Area(s)
============ ===================== =================================== ================================
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 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 howard at hobu.co docs
pramsey Paul Ramsey pramsey at cleverelephant.ca mappostgis.c, maptile.c
jerryp Jerry Pisk jerry.pisk at gmail.com
ned Ned Harding nharding at extendthereach.com
attila Attila Csipa plists at prometheus.org.yu imagemap, mygis
fsimon Fernando Simon fsimon at univali.br maporacle
novak John Novak hetzerrrat gmail.com mapgraticule
jani Jani Averbach javerbach extendthereach com External Plugin Layers
tamas Tamas Szekeres szekerest at gmail.com MapScript C#
umberto Umberto Nicoletti umberto.nicoletti at gmail.com MapScript Java
tomkralidis Tom Kralidis tomkralidis at gmail.com OGC, Perl Mapscript
tbonfort Thomas Bonfort tbonfort at terriscope.fr AGG, Charting, Core Maintenance
jmckenna Jeff McKenna jmckenna at gatewaygeomatics.com Documentation
aboudreault Alan Boudreault aboudreault at mapgears.com OGR, general bug fixes
toby Toby Rahilly toby.rahilly at gmail.com OpenGL
jbourke Jonathan Bourke jonathan.bourke at mapds.com.au OpenGL
jimk James Klassen klassen.js at gmail.com maporacle
rouault Even Rouault even.rouault at mines-paris.org OGC WFS
schpidi Stephan Meissl stephan.meissl at eox.at OGC WCS
============ ===================== =================================== ================================
......@@ -20,22 +20,19 @@ warning:
$(error "This Makefile is used to run the \"test\" target")
wxs-testcase:
cd msautotest/wxs && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
cd msautotest/wxs && chmod 777 tmp && rm -f result/* && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
renderers-testcase:
cd msautotest/renderers && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
cd msautotest/renderers && rm -f result/* && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
misc-testcase:
cd msautotest/misc && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
cd msautotest/misc && rm -f result/* && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
gdal-testcase:
cd msautotest/gdal && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
cd msautotest/gdal && rm -f result/* && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
query-testcase:
cd msautotest/query && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
autotest-install:
test -d "msautotest/wxs" || ( git submodule init && git submodule update )
cd msautotest/query && rm -f result/* && export PATH=$(BUILDPATH):$(PATH) && ./run_test.py $(AUTOTEST_OPTS)
mspython-testcase:
test -f "$(PYTHON_MAPSCRIPT_PATH)/_mapscript.so" && (export PYTHONPATH="../../$(PYTHON_MAPSCRIPT_PATH)" && cd msautotest/mspython && python run_all_tests.py)
......@@ -46,7 +43,7 @@ php-testcase:
java-testcase:
test -d "$(JAVA_MAPSCRIPT_PATH)" && (export JAVA_MAPSCRIPT_SO="../../$(JAVA_MAPSCRIPT_PATH)" && cd mapscript/java && ./run_test.sh)
test: autotest-install cmakebuild
test: cmakebuild
@$(MAKE) $(MFLAGS) wxs-testcase renderers-testcase misc-testcase gdal-testcase query-testcase mspython-testcase
@./print-test-results.sh
@$(MAKE) $(MFLAGS) php-testcase
......
#!/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 {} \;
--- genhtml_ori 2013-07-10 19:23:55.041055126 +0200
+++ genhtml 2013-07-10 19:31:39.041172541 +0200
@@ -2351,7 +2351,8 @@
($year, $month, $day) = (localtime())[5, 4, 3];
- return sprintf("%d-%02d-%02d", $year+1900, $month+1, $day);
+ #return sprintf("%d-%02d-%02d", $year+1900, $month+1, $day);
+ return "XXXX-XX-XX";
}
@@ -3807,9 +3808,10 @@
} else {
$class = "branchCov";
$text = " + ";
- $title = "Branch $br_num was taken $taken ".
- "time";
- $title .= "s" if ($taken > 1);
+ #$title = "Branch $br_num was taken $taken ".
+ # "time";
+ #$title .= "s" if ($taken > 1);
+ $title = "Branch $br_num was taken X times";
}
$current .= "[" if ($open);
$current .= "<span class=\"$class\" title=\"$title\">";
@@ -3892,6 +3894,8 @@
$count_format = format_count($count, $count_field_width);
}
else {
+ # force to 1 to avoid huge diffs between runs
+ $count = 1;
$result = $count;
$source_format = '<span class="lineCov">';
$count_format = format_count($count, $count_field_width);
@@ -5127,6 +5131,7 @@
$countstyle = "coverFnLo";
} else {
$countstyle = "coverFnHi";
+ $count = "X";
}
write_html(*HTML_HANDLE, <<END_OF_HTML)
#!/usr/bin/env python
import datetime
import getpass
import json
import re
import time
import requests
AUTOCLOSE_MESSAGE = """\
### This is an automated comment
This issue has been closed due to lack of activity. This doesn't mean the \
issue is invalid, it simply got no attention within the last year. Please \
reopen if still valid.
"""
AUTOCLOSE_LABEL = "No Recent Activity"
def fetch_issues(github_auth):
issues = []
url = ("https://api.github.com/repos/mapserver/mapserver-import/issues?"
"per_page=100")
while url:
print "Fetching %s" % url
r = requests.get(url, auth=github_auth)
r.raise_for_status()
time.sleep(1)
issues.extend(r.json())
match = re.match(r'<(.*?)>; rel="next"', r.headers['Link'] or '')
url = match.group(1) if match else None
return issues
def close_issue(issue, github_auth):
"""Attempt to close an issue and return whether it succeeded."""
r = requests.post("https://api.github.com/repos/mapserver/mapserver-import/"
"issues/%s" % issue['number'],
data=json.dumps({'state': 'closed'}), auth=github_auth)
try:
r.raise_for_status()
time.sleep(1)
return True
except requests.HTTPError:
return False
def post_issue_comment(issue, comment_text, github_auth):
"""Attempt to post an issue comment and return whether it succeeded."""
r = requests.post("https://api.github.com/repos/mapserver/mapserver-import/"
"issues/%s/comments" % issue['number'],
data=json.dumps({'body': comment_text}), auth=github_auth)
try:
r.raise_for_status()
time.sleep(1)
return True
except requests.HTTPError:
return False
def add_issue_label(issue, label, github_auth):
"""Attempt to add a label to the issue and return whether it succeeded."""
r = requests.post("https://api.github.com/repos/mapserver/mapserver-import/"
"issues/%s/labels" % issue['number'],
data=json.dumps([label]), auth=github_auth)
try:
r.raise_for_status()
time.sleep(1)
return True
except requests.HTTPError:
return False
def close_old_issues(close_before, github_auth):
all_issues = fetch_issues(github_auth)
for issue in all_issues:
issue_last_activity = datetime.datetime.strptime(
issue['updated_at'], "%Y-%m-%dT%H:%M:%SZ")
print "Processing issue %s with last activity at %s" % (issue['number'], issue_last_activity)
if issue_last_activity < close_before:
if post_issue_comment(issue, AUTOCLOSE_MESSAGE, github_auth):
print " Added comment to old issue %s" % issue['number']
else:
print " Error adding comment to old issue %s" % issue['number']
continue
if add_issue_label(issue, AUTOCLOSE_LABEL, github_auth):
print " Added label to old issue %s" % issue['number']
else:
print " Error adding label to old issue %s" % issue['number']
if close_issue(issue, github_auth):
print " Closed old issue %s" % issue['number']
else:
print " Error closing old issue %s" % issue['number']
if __name__ == '__main__':
close_before = datetime.datetime.today() - datetime.timedelta(days=366)
print
print "This script will close all issues with no activity for a year."
print
default_user = "mapserver-bot"
github_user = (raw_input("GitHub username [%s]: " % default_user)
or default_user)
github_pass = getpass.getpass()
print
github_auth = (github_user, github_pass)
close_old_issues(close_before, github_auth)
#!/bin/bash
msa_commit=`git log -n1 | grep "msautotest=" | sed 's/msautotest=//'`
branch=branch-7-0
repo=git://github.com/mapserver/msautotest.git
if [ -n "$msa_commit" ]; then
repo=`echo "$msa_commit" | grep -o '^[^@]*'`
branch=`echo "$msa_commit" | grep -o '[^@]*$'`
fi
echo "git clone $repo msautotest"
git clone $repo msautotest
cd msautotest
echo "git checkout $branch"
git checkout $branch
......@@ -822,6 +822,8 @@ imageObj *agg2CreateImage(int width, int height, outputFormatObj *format, colorO
if( (AGG_INT64U)bufSize != bufSize64 ) {
msSetError(MS_MEMERR, "%s: %d: Out of memory allocating " AGG_INT64U_FRMT " bytes.\n", "agg2CreateImage()",
__FILE__, __LINE__, bufSize64);
free(image);
delete r;
return NULL;
}
......@@ -830,6 +832,7 @@ imageObj *agg2CreateImage(int width, int height, outputFormatObj *format, colorO
msSetError(MS_MEMERR, "%s: %d: Out of memory allocating " AGG_INT64U_FRMT " bytes.\n", "agg2CreateImage()",
__FILE__, __LINE__, bufSize64);
free(image);
delete r;
return NULL;
}
r->m_rendering_buffer.attach(r->buffer, width, height, width * 4);
......
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
INFILE="./mapaxisorder.csv"
OUTFILE="./mapaxisorder.h"
# define an array 8x4096 filled with 0
unset ARRAY
declare -a ARRAY
for i in {0..4095}
do
ARRAY[$i]="00000000"
done
# fill array from $INFILE
while read -r LINE
do
# numeric values only
if [ "$LINE" -eq "$LINE" ] 2>/dev/null
then
let row=$(( $LINE / 8 ))
let index=$(( $LINE % 8 ))
unset tmp
if [ $index -gt 0 ]
then
tmp=${ARRAY[$row]:0:$(( $index ))}
fi
ARRAY[$row]=${tmp}1${ARRAY[$row]:$(( $index+1 ))}
fi
done < $INFILE
print_header ()
{
echo '/******************************************************************************'
echo ' * $Id: $'
echo ' *'
echo ' * Project: MapServer'
echo ' * Purpose: Axis lookup table'
echo ' *'
echo ' ******************************************************************************'
echo ' * Copyright (c) 1996-2005 Regents of the University of Minnesota.'
echo ' *'
echo ' * Permission is hereby granted, free of charge, to any person obtaining a'
echo ' * copy of this software and associated documentation files (the "Software"),'
echo ' * to deal in the Software without restriction, including without limitation'
echo ' * the rights to use, copy, modify, merge, publish, distribute, sublicense,'
echo ' * and/or sell copies of the Software, and to permit persons to whom the'
echo ' * Software is furnished to do so, subject to the following conditions:'
echo ' *'
echo ' * The above copyright notice and this permission notice shall be included in '
echo ' * all copies of this Software or works derived from this Software.'
echo ' *'
echo ' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS'
echo ' * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,'
echo ' * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL'
echo ' * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER'
echo ' * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING'
echo ' * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER'
echo ' * DEALINGS IN THE SOFTWARE.'
echo ' ****************************************************************************/'
}
print_comment ()
{
echo ' '
echo '/*'
echo ' * Generated file'
echo ' *'
echo ' * This file was generated from by means of a script. Do not edit manually.'
echo ' */'
echo ' '
}
print_body ()
{
echo '#ifdef __cplusplus'
echo 'extern "C" '{
echo '#endif'
echo ' '
echo 'static unsigned char axisOrientationEpsgCodes[] = {'
# traverse array and print out elements
for i in {0..4095}
do
echo -n " ${ARRAY[$i]:7:1} << 7 | ${ARRAY[$i]:6:1} << 6 | ${ARRAY[$i]:5:1} << 5 | ${ARRAY[$i]:4:1} << 4 | ${ARRAY[$i]:3:1} << 3 | ${ARRAY[$i]:2:1} << 2 | ${ARRAY[$i]:1:1} << 1 | ${ARRAY[$i]:0:1} << 0"
if [ $i -le 4094 ]
then
echo ,
else
echo
fi
done
echo '};'
echo ' '
echo '#ifdef __cplusplus'
echo '}'
echo '#endif'
}
print_header > ./$OUTFILE
print_comment >> ./$OUTFILE
print_body >> ./$OUTFILE
exit 0
......@@ -39,6 +39,7 @@
#include "gdal_alg.h"
#include "mapthread.h"
#include "mapraster.h"
#include "cpl_string.h"
#define GEO_TRANS(tr,x,y) ((tr)[0]+(tr)[1]*(x)+(tr)[2]*(y))
......@@ -344,11 +345,11 @@ static int msContourLayerReadRaster(layerObj *layer, rectObj rect)
ury = floor(ury / virtual_grid_step_y) * virtual_grid_step_y - (virtual_grid_step_x*5);
lly = ceil(lly / virtual_grid_step_y) * virtual_grid_step_y + (virtual_grid_step_x*5);
src_xoff = MAX(0,(int) floor(llx+0.5));
src_yoff = MAX(0,(int) floor(ury+0.5));
src_xsize = MIN(MAX(0,(int) (urx - llx + 0.5)),
src_xoff = MS_MAX(0,(int) floor(llx+0.5));
src_yoff = MS_MAX(0,(int) floor(ury+0.5));
src_xsize = MS_MIN(MS_MAX(0,(int) (urx - llx + 0.5)),
GDALGetRasterXSize(clinfo->hOrigDS) - src_xoff);
src_ysize = MIN(MAX(0,(int) (lly - ury + 0.5)),
src_ysize = MS_MIN(MS_MAX(0,(int) (lly - ury + 0.5)),
GDALGetRasterYSize(clinfo->hOrigDS) - src_yoff);
/* Update the geographic extent (buffer added) */
......@@ -385,8 +386,8 @@ static int msContourLayerReadRaster(layerObj *layer, rectObj rect)
} else {
src_xoff = 0;
src_yoff = 0;
dst_xsize = src_xsize = MIN(map->width,src_xsize);
dst_ysize = src_ysize = MIN(map->height,src_ysize);
dst_xsize = src_xsize = MS_MIN(map->width,src_xsize);
dst_ysize = src_ysize = MS_MIN(map->height,src_ysize);
copyRect.minx = copyRect.miny = 0;
copyRect.maxx = map->width;
copyRect.maxy = map->height;
......@@ -435,7 +436,7 @@ static int msContourLayerReadRaster(layerObj *layer, rectObj rect)
adfGeoTransform[4] = 0;
adfGeoTransform[5] = -dst_cellsize_y;
clinfo->cellsize = MAX(dst_cellsize_x, dst_cellsize_y);
clinfo->cellsize = MS_MAX(dst_cellsize_x, dst_cellsize_y);
{
char buf[64];
sprintf(buf, "%lf", clinfo->cellsize);
......@@ -621,7 +622,7 @@ static int msContourLayerGenerateContour(layerObj *layer)
int msContourLayerOpen(layerObj *layer)
{
char *decrypted_path;
char szPath[MS_MAXPATHLEN];
char szPath[MS_MAXPATHLEN];
contourLayerInfo *clinfo;
if (layer->debug)
......@@ -632,12 +633,71 @@ int msContourLayerOpen(layerObj *layer)
msContourLayerInfoInitialize(layer);
clinfo = (contourLayerInfo *) layer->layerinfo;
if (layer->data == NULL && layer->tileindex == NULL ) {
msSetError(MS_MISCERR,
"Layer %s has neither DATA nor TILEINDEX defined.",
"msContourLayerOpen()",
layer->name);
return MS_FAILURE;
}
if( layer->tileindex != NULL )
{
char szTilename[MS_MAXPATHLEN];
int status;
int tilelayerindex, tileitemindex, tilesrsindex;
rectObj searchrect;
layerObj* tlp;
shapeObj tshp;
char tilesrsname[1];
msInitShape(&tshp);
searchrect = layer->map->extent;
status = msDrawRasterSetupTileLayer(layer->map, layer,
&searchrect, MS_FALSE,
&tilelayerindex,
&tileitemindex,
&tilesrsindex,
&tlp);
if( status == MS_FAILURE )
{
return MS_FAILURE;
}
status = msDrawRasterIterateTileIndex(layer, tlp, &tshp,
tileitemindex, -1,
szTilename, sizeof(szTilename),
tilesrsname, sizeof(tilesrsname));
if( status == MS_FAILURE || status == MS_DONE ) {
if( status == MS_DONE )
{
if (layer->debug)
msDebug("No raster matching filter.\n");
}
msDrawRasterCleanupTileLayer(tlp, tilelayerindex);
return MS_FAILURE;
}
msDrawRasterCleanupTileLayer(tlp, tilelayerindex);
msDrawRasterBuildRasterPath(layer->map, layer, szTilename, szPath);
decrypted_path = msStrdup(szPath);
/* Cancel the time filter that might have been set on ours in case of */
/* a inline tileindex */
msFreeExpression(&layer->filter);
msInitExpression(&layer->filter);
}
else
{
msTryBuildPath3(szPath, layer->map->mappath, layer->map->shapepath, layer->data);
decrypted_path = msDecryptStringTokens(layer->map, szPath);
}
GDALAllRegister();
/* Open the original Dataset */
msTryBuildPath3(szPath, layer->map->mappath, layer->map->shapepath, layer->data);
decrypted_path = msDecryptStringTokens(layer->map, szPath);
msAcquireLock(TLOCK_GDAL);
if (decrypted_path) {
......@@ -846,23 +906,60 @@ int msContourLayerGetExtent(layerObj *layer, rectObj *extent)
return MS_SUCCESS;
}
/************************************************************************/
/* msContourLayerSetTimeFilter() */
/* */
/* This function is actually just used in the context of */
/* setting a filter on the tileindex for time based queries. */
/* For instance via WMS requests. */
/* */
/* If a local shapefile tileindex is in use, we will set a */
/* backtics filter (shapefile compatible). If another layer is */
/* being used as the tileindex then we will forward the */
/* SetTimeFilter call to it. If there is no tileindex in */
/* place, we do nothing. */
/************************************************************************/
int msContourLayerSetTimeFilter(layerObj *layer, const char *timestring,
const char *timefield)
const char *timefield)
{
contourLayerInfo *clinfo = (contourLayerInfo *) layer->layerinfo;
int tilelayerindex;
if (layer->debug)
msDebug("Entering msContourLayerSetTimeFilter().\n");
msDebug("msContourLayerSetTimeFilter(%s,%s).\n", timestring, timefield);
if (clinfo == NULL) {
msSetError(MS_MISCERR, "Assertion failed: Contour layer not opened!!!",
"msContourLayerSetTimeFilter()");
return MS_FAILURE;
/* -------------------------------------------------------------------- */
/* If we don't have a tileindex the time filter has no effect. */
/* -------------------------------------------------------------------- */
if( layer->tileindex == NULL )
{
if (layer->debug)
msDebug("msContourLayerSetTimeFilter(): time filter without effect on layers without tileindex.\n");
return MS_SUCCESS;
}
return msLayerSetTimeFilter(&clinfo->ogrLayer, timestring, timefield);
}
/* -------------------------------------------------------------------- */
/* Find the tileindex layer. */
/* -------------------------------------------------------------------- */
tilelayerindex = msGetLayerIndex(layer->map, layer->tileindex);
/* -------------------------------------------------------------------- */
/* If we are using a local shapefile as our tileindex (that is */
/* to say, the tileindex name is not of another layer), then we */
/* just install a backtics style filter on the current layer. */
/* -------------------------------------------------------------------- */
if( tilelayerindex == -1 )
return msLayerMakeBackticsTimeFilter( layer, timestring, timefield );
/* -------------------------------------------------------------------- */
/* Otherwise we invoke the tileindex layers SetTimeFilter */
/* method. */
/* -------------------------------------------------------------------- */
if ( msCheckParentPointer(layer->map,"map")==MS_FAILURE )
return MS_FAILURE;
return msLayerSetTimeFilter( layer->GET_LAYER(map,tilelayerindex),
timestring, timefield );
}
/************************************************************************/
/* msRASTERLayerInitializeVirtualTable() */
......
......@@ -669,6 +669,12 @@ int msDrawLayer(mapObj *map, layerObj *layer, imageObj *image)
layer->project true to recheck projection needs (Bug #673) */
layer->project = MS_TRUE;
/* make sure labelcache setting is set correctly if postlabelcache is set. This is done by the parser but
may have been altered by a mapscript. see #5142 */
if(layer->postlabelcache) {
layer->labelcache = MS_FALSE;
}
if(layer->mask) {
int maskLayerIdx;
/* render the mask layer in its own imageObj */
......@@ -916,13 +922,17 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
if(status != MS_SUCCESS) return MS_FAILURE;
/* build item list. STYLEITEM javascript needs the shape attributes */
if (layer->styleitem &&
(strncasecmp(layer->styleitem, "javascript://", 13) == 0)) {
if (layer->styleitem && (strncasecmp(layer->styleitem, "javascript://", 13) == 0)) {
status = msLayerWhichItems(layer, MS_TRUE, NULL);
} else {
status = msLayerWhichItems(layer, MS_FALSE, NULL);
}
if(status != MS_SUCCESS) {
msLayerClose(layer);
return MS_FAILURE;
}
/* identify target shapes */
if(layer->transform == MS_TRUE) {
searchrect = map->extent;
......@@ -973,6 +983,7 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
}
if(maxfeatures >=0 && featuresdrawn >= maxfeatures) {
msFreeShape(&shape);
status = MS_DONE;
break;