GithubHelp home page GithubHelp logo

mapnik-gyp's People

Contributors

artemp avatar lightmare avatar wilhelmberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapnik-gyp's Issues

Put ICU_DATA, PROJ_LIB, and GDAL_DATA in mapnik_settings.py

To allow the python bindings to be easy to set up we need to generate a mapnik_settings.py and have these environment variables set in it, using relative paths.

The mapnik v2.2.0 SDK used something like:

from os import path 
mapnik_data_dir = path.normpath(path.join(__file__,'../../../../../share/')) 
env = { 
    'GDAL_DATA': path.join(mapnik_data_dir, 'gdal'), 
    'PROJ_LIB': path.join(mapnik_data_dir, 'proj') 
} 
__all__ = [env] 

Enable cairo python bindings?

How to enable cairo python bindings in the mapnik build?

HAVE_CAIRO is defined and mapnik builds with cairo support. But mapnik.have_pycairo() returns false.

update the list of "heavy" files

those currently are:

        src/renderer_common/render_group_symbolizer.os \
        src/renderer_common/render_markers_symbolizer.os \
        src/renderer_common/render_thunk_extractor.os \
        src/json/libmapnik-json.a \
        src/wkt/libmapnik-wkt.a \
        src/css_color_grammar.os \
        src/expression_grammar.os \
        src/transform_expression_grammar.os \
        src/image_filter_grammar.os \

... and from my measurements also:

src/json/mapnik_topojson_grammar.cpp  // also caused appveyor run oom
utils/mapnik-index/process_geojson_file.cpp

Mapnik build success....?

I managed to get mapnik to build, but I'm unsure of where the final build is and whether everything I need is there?! Specifically I'm looking for the python bindings and what I now need to put on my PYTHONPATH?

I ran with the defaults (simply following the build_xxx.bat scripts given in https://github.com/BergWerkGIS/mapnik-dependencies)

I end up with a couple of likley folders: mapnik-sdk and build, none of which match the structure im used to from downloading the mapnik...
mapnik-sdk is missing the python folder - is this not build by default? I have python installed and have boost-python.

In build I have a Release folder. There is a bindings/python folder full of object files. There is a lib/python2.7/mapnik folder, but this only has __init__ and printing.py

Am I missing something?

If I am to rebuild, do I need to delete all and start over?

Building with libxml2

Have added HAVE_LIBXML2 to the gyp file.
Error I'm getting is:

HAVE_LIBXML2 defined but compiling rapidxml_loader.cpp!

Extra configuration step needed?

"heavy" files still built in parallel

https://ci.appveyor.com/project/Mapbox/mapnik/build/1.0.582#L122
It was apparently compiling 3 files at once:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe ... /MP ...

... fatal error C1060: compiler is out of heap space (compiling source file ..\..\src\expression_grammar.cpp)
... fatal error C1060: compiler is out of heap space (compiling source file ..\..\src\transform_expression_grammar.cpp)
... fatal error C1060: compiler is out of heap space (compiling source file ..\..\src\css_color_grammar.cpp)

    0 Warning(s)
    3 Error(s)

The problem is likely that msbuild /m:1 option limits only the number of processes msbuild spawns, but the compiler then forks itself: /MP

Also while you'll be looking into it, would it be possible to make the /p:SelectedFiles= more easily editable? I honestly have no idea whether it can be multiline, or whether you can use backticks to read the list from another file.

DLL load failed when building mapnik

I've managed to install all dependencies but get the following error:

Traceback (most recent call last):
  File "..\tests\visual_tests\test.py", line 5, in <module>
    import mapnik
  File "C:\dev\projects\mapnik-dependencies\packages\mapnik-master\bindings\python\mapnik\__init__.py", line 73, in <module
    from _mapnik import *
ImportError: DLL load failed: The specified module could not be found.
DONE building Mapnik
----------ERROR MAPNIK --------------
!!!!!ERROR: ABORTED!!!!!!
Started at  2:12:17.49, finished at  2:39:02.49
-- DONE ---
Started at  2:12:17.49, finished at  2:39:02.49

Might this be because I'm using VS 15 CTP instead of VS 14?

map style rule based on OSM_ID it does not work

Hi all,
I am using Mapnik in order to render OSM from Postgre/PostGIS DB.

My code is like this

mapnik::feature_type_style road_blocked_style;
rule road_blocked_rule;

road_blocked_rule.set_filter(parse_expression("[osm_id] = '61924590'"));

stroke road_blocked_rule_stk(color(255,0,0), 3.0);
road_blocked_rule.append(line_symbolizer(road_blocked_rule_stk));
road_blocked_style.add_rule(road_blocked_rule);
map.insert_style("road_blocked_style", road_blocked_style);

ISSUE: With the filter parse_expression("[osm_id] = '61924590'"), there is no result! ( like no street with this ID would be found in the DB). But I am sure that the ID is valid.

I have read that there has been issues with the convertion to BIG INT type.
I am using mapnik-v2.2.0.

How could I solve this issue? Do you have any ideas?

Thank you in advance!

Linker warnings give missplaced output

When running the mapnik build, I'm getting a warning for each visual studio solution that was created by gyp, along the lines of:

MSB8012 TargetPath does not match the Linkers OutputFile property

The result is that there seems to be files missing from the output...
It seems this issue is caused by upgrading a solution from one version of VS to another (I presume gyp is handling this or something as the sln files are autogenerated). I don't know enough about gyp to fix it in the gyp file, so I tried manually editing the .sln files in VS2014, but could not get it going.

It would be helpful if the instructions gave some indication of the expected output and folder structure to help with determining what went wrong and where.

Smart targets

Currently the build.bat makes an attempt to copy a few things around in order to be able to run various tests. This should be refactored into cleanly separated targets:

built.bat # builds everything
build.bat test # bootstraps tests
build.bat install /path/to/install # installs all of mapnik + runtime deps
build.bat package path/to/package{.7z|tar|zip} # installs sdk to given location and archives it for distribution

Mapnik install failed

After running "npm install mapnik", I see this error. npm debug log
npm-debug.log.txt
is attached. Can you please help?

Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\bmehta
\programs\node_modules\mapnik\lib\binding\node-v46-win32-x64\mapnik.node --modul
e_name=mapnik --module_path=E:\bmehta\programs\node_modules\mapnik\lib\binding\n
ode-v46-win32-x64' (1)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "mapnik"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fall
back-to-build'.
npm ERR! This is most likely a problem with the mapnik package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls mapnik
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! E:\bmehta\programs\npm-debug.logrror:

Autogenerate mapnik-config.bat

We need to have the gyp system auto-create mapnik-config.bat. Steps to get to this are:

Questions:

  • How should variables be passed from the mapnik.gyp file to the gyp action? As a bunch of command line args (quoting will be tricky) or maybe just serialize them to an intermediate json file. Then a python script could read that and combine with the template for the final result.

Better setup docs

7z is needed to run package.bat for example but we don't mention this in the readme.

Start running visual tests again

We temporarily lost the ability to run the visual tests on windows when the python bindings moved out: 4ccf161.

But Mapnik core now has C++ visual tests. Next actions are:

  • Start building the C++ visual tests by adding them to mapnik.gyp
  • Start checking out git submodule update --init the test data and visual test data
  • Start calling the visual tests to be run along with the unit tests. Hope they don't have the same crashy problems as the unit tests: refs mapnik/mapnik#2838

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.