Skip to content

kki-org/go-mapnik

This branch is 1 commit ahead of, 4 commits behind omniscale/go-mapnik:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b7a9f34 · Aug 5, 2023

History

43 Commits
Oct 4, 2022
Mar 30, 2015
Apr 2, 2015
Aug 19, 2020
Oct 6, 2022
Oct 10, 2019
Oct 10, 2019
Aug 5, 2023
Oct 10, 2019
Oct 10, 2019
Oct 4, 2022

Repository files navigation

go-mapnik

Description

Small wrapper for the Mapnik 3 API to render beautiful maps from Go.

Features:

  • Render to []byte, image.Image, or file.
  • Set scale denominator or scale factor.
  • Enable/disable single layers.

Installation

This package requires Mapnik (libmapnik-dev on Ubuntu/Debian, mapnik in Homebrew). Make sure mapnik-config is in your PATH.

You need to set the CGO_LDFLAGS and CGO_CXXFLAGS environment variables for successful compilation and linking with Mapnik. Refer to the Makefile how mapnik-config can be used to extract the required CGO_LDFLAGS and CGO_CXXFLAGS values. Use -ldflags to overwrite the default location of the input plugins and default fonts.

go-mapnik is independent of the Proj version. Make sure that your mapfiles and SRS strings use the correct syntax (epsg:4326 vs. +init=epsg:4326). You can set the environment PROJ_USE_PROJ4_INIT_RULES=YES for backwards compatibility. This supports +init=epsg:xxx definitions and keeps the fixed long/lat and E/N axis orientation.

Documentation

API documentation can be found here: http://godoc.org/github.com/omniscale/go-mapnik

License

MIT, see LICENSE file.

Author

Oliver Tonnhofer, Omniscale

Thanks

This package is inspired/based on mapnik-c-api by Dane Springmeyer and go-mapnik by Fabian Wickborn.

Releases

No releases published

Packages

No packages published

Languages

  • Go 62.8%
  • C++ 26.5%
  • C 9.6%
  • Makefile 1.1%