Merge branch 'master' into spirit-x3
This commit is contained in:
commit
4b22e1075e
17 changed files with 130 additions and 96 deletions
|
@ -1,82 +0,0 @@
|
|||
/*****************************************************************************
|
||||
*
|
||||
* This file is part of Mapnik (c++ mapping toolkit)
|
||||
*
|
||||
* Copyright (C) 2015 Artem Pavlenko
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef MAPNIK_GEOMETRY_UNIQUE_HPP
|
||||
#define MAPNIK_GEOMETRY_UNIQUE_HPP
|
||||
|
||||
#include <mapnik/geometry.hpp>
|
||||
#include <mapnik/geometry_adapters.hpp>
|
||||
#include <boost/geometry/algorithms/unique.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace mapnik { namespace geometry {
|
||||
|
||||
namespace detail {
|
||||
|
||||
struct geometry_unique
|
||||
{
|
||||
using result_type = void;
|
||||
|
||||
result_type operator() (geometry & geom) const
|
||||
{
|
||||
mapnik::util::apply_visitor(*this, geom);
|
||||
}
|
||||
|
||||
result_type operator() (geometry_collection & collection) const
|
||||
{
|
||||
for (auto & geom : collection)
|
||||
{
|
||||
(*this)(geom);
|
||||
}
|
||||
}
|
||||
|
||||
result_type operator() (line_string & line) const
|
||||
{
|
||||
boost::geometry::unique(line);
|
||||
}
|
||||
|
||||
result_type operator() (polygon & poly) const
|
||||
{
|
||||
boost::geometry::unique(poly);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
result_type operator() (T & geom) const
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <typename GeomType>
|
||||
inline void unique(GeomType & geom)
|
||||
{
|
||||
static_assert(!std::is_const<GeomType>::value,"mapnik::geometry::unique on const& is invalid");
|
||||
detail::geometry_unique()(geom);
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif // MAPNIK_GEOMETRY_UNIQUE_HPP
|
|
@ -23,16 +23,17 @@
|
|||
#ifndef MAPNIK_IMAGE_FILITER_GRAMMAR_HPP
|
||||
#define MAPNIK_IMAGE_FILITER_GRAMMAR_HPP
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/config.hpp>
|
||||
#include <mapnik/css_color_grammar.hpp>
|
||||
#include <mapnik/color.hpp>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#include <mapnik/warning_ignore.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/fusion/include/adapt_struct.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/css_color_grammar.hpp>
|
||||
#include <mapnik/color.hpp>
|
||||
|
||||
// stl
|
||||
#include <cmath>
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
// mapnik
|
||||
#include <mapnik/config.hpp>
|
||||
#include <mapnik/image.hpp>
|
||||
#include <mapnik/pixel_types.hpp>
|
||||
|
||||
//stl
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
#define MAPNIK_IMAGE_SCALING_TRAITS_HPP
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/span_image_filter.h>
|
||||
#include <mapnik/image.hpp>
|
||||
#include <mapnik/image_scaling.hpp>
|
||||
#include <mapnik/span_image_filter.hpp>
|
||||
|
||||
// agg
|
||||
#include "agg_image_accessors.h"
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#ifndef MAPNIK_IMAGE_UTIL_JPEG_HPP
|
||||
#define MAPNIK_IMAGE_UTIL_JPEG_HPP
|
||||
|
||||
#include <mapnik/config.hpp>
|
||||
|
||||
// stl
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#ifndef MAPNIK_IMAGE_UTIL_PNG_HPP
|
||||
#define MAPNIK_IMAGE_UTIL_PNG_HPP
|
||||
|
||||
#include <mapnik/palette.hpp>
|
||||
|
||||
// stl
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#ifndef MAPNIK_IMAGE_VIEW_NULL_HPP
|
||||
#define MAPNIK_IMAGE_VIEW_NULL_HPP
|
||||
|
||||
#include <mapnik/image.hpp>
|
||||
#include <mapnik/image_view.hpp>
|
||||
|
||||
//stl
|
||||
#include <stdexcept>
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include <mapnik/util/singleton.hpp>
|
||||
#include <mapnik/util/noncopyable.hpp>
|
||||
|
||||
// boost
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "agg_span_image_filter_gray.h"
|
||||
#include "agg_span_image_filter_rgba.h"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace mapnik
|
|
@ -24,7 +24,12 @@
|
|||
#define MAPNIK_SYMBOLIZER_DEFAULT_VALUES_HPP
|
||||
|
||||
#include <mapnik/symbolizer_keys.hpp>
|
||||
#include <mapnik/symbolizer_enumerations.hpp>
|
||||
#include <mapnik/image_compositing.hpp>
|
||||
#include <mapnik/image_scaling.hpp>
|
||||
#include <mapnik/simplify.hpp>
|
||||
#include <mapnik/color.hpp>
|
||||
#include <mapnik/value_types.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
|
|
57
scripts/appveyor-system-info.ps1
Normal file
57
scripts/appveyor-system-info.ps1
Normal file
|
@ -0,0 +1,57 @@
|
|||
$PSVersionTable
|
||||
$PSVersionTable.PSVersion
|
||||
|
||||
$SystemManaged = Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile}
|
||||
$total_physicalmem = gwmi Win32_ComputerSystem | % {[Math]::round($_.TotalPhysicalMemory/1MB,0)}
|
||||
$physical_mem = get-ciminstance -class 'cim_physicalmemory' | % { $_.Capacity/1024/1024}
|
||||
|
||||
$PF =gwmi Win32_PageFileUsage
|
||||
$PageFileLocation = $PF.Name;
|
||||
$PageFileSize = $PF.AllocatedBaseSize
|
||||
|
||||
Write-Host "physical memory : "$physical_mem
|
||||
Write-Host "total physical memory : "$total_physicalmem
|
||||
Write-Host "page file system managed : "$SystemManaged
|
||||
Write-Host "page file location : "$PageFileLocation
|
||||
Write-Host "page file size : "$PageFileSize
|
||||
Write-Host "InitialSize : "${CurrentPageFile}.InitialSize
|
||||
Write-Host "MaximumSize : "$CurrentPageFile.MaximumSize
|
||||
|
||||
if($env:APPVEYOR -eq "true"){
|
||||
Write-Host !!!!!!! on AppVeyor: changing page file settings !!!!!!!!!!
|
||||
#disable automatically managed page file settings
|
||||
$c = Get-WmiObject Win32_computersystem -EnableAllPrivileges
|
||||
if($c.AutomaticManagedPagefile){
|
||||
Write-Host disabling managed page file settings
|
||||
$c.AutomaticManagedPagefile = $false
|
||||
$c.Put() | Out-Null
|
||||
}
|
||||
|
||||
$new_page_size=18000
|
||||
$CurrentPageFile = Get-WmiObject -Class Win32_PageFileSetting
|
||||
if($CurrentPageFile.InitialSize -ne $new_page_size){
|
||||
Write-Host "setting new page file size to $new_page_size"
|
||||
$CurrentPageFile.InitialSize=$new_page_size
|
||||
$CurrentPageFile.MaximumSize=$new_page_size
|
||||
$CurrentPageFile.Put() | Out-Null
|
||||
}
|
||||
|
||||
Write-Host "new ------------ "
|
||||
Write-Host "system managed:" (Get-WmiObject -Class Win32_ComputerSystem | % {$_.AutomaticManagedPagefile})
|
||||
Write-Host "page file size:" (gwmi Win32_PageFileUsage).AllocatedBaseSize
|
||||
Write-Host "InitialSize: "${CurrentPageFile}.InitialSize
|
||||
Write-Host "MaximumSize: "$CurrentPageFile.MaximumSize
|
||||
} else {
|
||||
Write-Host not on AppVeyor, leaving page file as is
|
||||
}
|
||||
|
||||
#list drives
|
||||
Get-WmiObject -Class Win32_LogicalDisk |
|
||||
Where-Object {$_.DriveType -ne 5} |
|
||||
Sort-Object -Property Name |
|
||||
Select-Object Name, VolumeName, FileSystem, Description, VolumeDirty, `
|
||||
@{"Label"="DiskSize(GB)";"Expression"={"{0:N}" -f ($_.Size/1GB) -as [float]}}, `
|
||||
@{"Label"="FreeSpace(GB)";"Expression"={"{0:N}" -f ($_.FreeSpace/1GB) -as [float]}}, `
|
||||
@{"Label"="%Free";"Expression"={"{0:N}" -f ($_.FreeSpace/$_.Size*100) -as [float]}} |
|
||||
Format-Table -AutoSize
|
||||
|
|
@ -5,8 +5,9 @@ SET EL=0
|
|||
ECHO =========== %~f0 ===========
|
||||
|
||||
ECHO NUMBER_OF_PROCESSORS^: %NUMBER_OF_PROCESSORS%
|
||||
ECHO RAM [MB]^:
|
||||
powershell "get-ciminstance -class 'cim_physicalmemory' | %% { $_.Capacity/1024/1024}"
|
||||
powershell Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
powershell .\scripts\appveyor-system-info.ps1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
::only build on AppVeyor, if explicitly stated
|
||||
|
|
|
@ -8,14 +8,39 @@ SET APPVEYOR_REPO_COMMIT_MESSAGE=this is a [build appveyor] test
|
|||
SET APPVEYOR=true
|
||||
::comment this to get complete AppVeyor behaviour
|
||||
SET LOCAL_BUILD_DONT_SKIP_TESTS=true
|
||||
|
||||
SET MAPNIK_GIT=3.0.5
|
||||
SET BOOST_VERSION=59
|
||||
SET FASTBUILD=1
|
||||
|
||||
FOR /F "tokens=1 usebackq" %%i in (`powershell .\scripts\parse-appveyor-yml.ps1`) DO SET BOOST_VERSION=%%i
|
||||
ECHO BOOST_VERSION found in appveyor.yml^: %BOOST_VERSION%
|
||||
IF "%BOOST_VERSION%"=="0" ECHO BOOST_VERSION not valid && SET ERRORLEVEL=1 && GOTO ERROR
|
||||
|
||||
|
||||
:: OVERRIDE PARAMETERS >>>>>>>>
|
||||
:NEXT-ARG
|
||||
|
||||
IF '%1'=='' GOTO ARGS-DONE
|
||||
ECHO setting %1
|
||||
SET %1
|
||||
SHIFT
|
||||
GOTO NEXT-ARG
|
||||
|
||||
:ARGS-DONE
|
||||
::<<<<< OVERRIDE PARAMETERS
|
||||
|
||||
|
||||
SET configuration=Release
|
||||
SET msvs_toolset=14
|
||||
SET platform=x64
|
||||
SET APPVEYOR_BUILD_FOLDER=%CD%
|
||||
|
||||
|
||||
|
||||
ECHO pulling test data
|
||||
CALL git submodule update --init
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
ECHO pulling test data, DONE
|
||||
|
||||
SET TIME_START_LOCAL_BUILD=%TIME%
|
||||
CALL scripts\build-appveyor.bat
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
|
||||
|
||||
|
@ -28,5 +53,7 @@ SET EL=%ERRORLEVEL%
|
|||
|
||||
:DONE
|
||||
ECHO =========== DONE %~f0 ===========
|
||||
ECHO build started^: %TIME_START_LOCAL_BUILD%
|
||||
ECHO build finished^: %TIME%
|
||||
|
||||
EXIT /b %EL%
|
||||
|
|
7
scripts/parse-appveyor-yml.ps1
Normal file
7
scripts/parse-appveyor-yml.ps1
Normal file
|
@ -0,0 +1,7 @@
|
|||
$ErrorActionPreference = 'Stop'
|
||||
$boost_version='0'
|
||||
Get-Content .\appveyor.yml |
|
||||
foreach {
|
||||
if ($_ -match "BOOST_VERSION: "){ $boost_version = $_.split()[-1] }
|
||||
}
|
||||
Write-Host $boost_version
|
9
scripts/time-header
Executable file
9
scripts/time-header
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
CXXFLAGS="$(./utils/mapnik-config/mapnik-config --cflags)"
|
||||
CXX="$(./utils/mapnik-config/mapnik-config --cxx)"
|
||||
echo "Time taken to compile '$(basename $1)':"
|
||||
time ${CXX} $1 -I./test -I./deps/agg/include -Ideps -I./include $CXXFLAGS -o /tmp/header.out
|
|
@ -1 +1 @@
|
|||
Subproject commit 116c65b3f6c12feb7709031ccc92b0f604d44f53
|
||||
Subproject commit 5be80ebbd596e42e45fc6dfd4cfca0cc6b814c73
|
|
@ -32,7 +32,7 @@ int main (int argc,char** argv)
|
|||
|
||||
try
|
||||
{
|
||||
po::options_description desc("nik2img utility");
|
||||
po::options_description desc("mapnik-render utility");
|
||||
desc.add_options()
|
||||
("help,h", "produce usage message")
|
||||
("version,V","print version string")
|
||||
|
|
Loading…
Reference in a new issue