[nik4] 09/10: Add patch to drop language extension from nik4.py in documentation.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun May 29 17:35:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository nik4.

commit 45cdafc0b74237f889f9a2b0afecc51f21ae90a5
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun May 29 19:12:42 2016 +0200

    Add patch to drop language extension from nik4.py in documentation.
---
 debian/patches/nik4.patch | 96 +++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 2 files changed, 97 insertions(+)

diff --git a/debian/patches/nik4.patch b/debian/patches/nik4.patch
new file mode 100644
index 0000000..01e1754
--- /dev/null
+++ b/debian/patches/nik4.patch
@@ -0,0 +1,96 @@
+Description: Drop language extension from nik4.py.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: not-needed
+
+--- a/README.md
++++ b/README.md
+@@ -22,7 +22,7 @@ are intuitive and plenty, and you will b
+ 
+ ## How to use it
+ 
+-Again, run `nik4.py -h` to see the list of all available options. Here are some examples.
++Again, run `nik4 -h` to see the list of all available options. Here are some examples.
+ 
+ ### Watch a mapping party area
+ 
+@@ -31,18 +31,18 @@ to populate the database with a planet e
+ [here](http://switch2osm.org/loading-osm-data/) or [here](http://wiki.openstreetmap.org/wiki/User:Zverik/Tile_Server_on_Fedora_20).
+ Get bounds by visiting [osm.org](http://openstreetmap.org): click "Export" and "Choose another region". Then:
+ 
+-    nik4.py -b -0.009 51.47 0.013 51.484 -z 17 openstreetmap-carto/osm.xml party-before.png
++    nik4 -b -0.009 51.47 0.013 51.484 -z 17 openstreetmap-carto/osm.xml party-before.png
+ 
+ Here `osm.xml` is the compiled Mapnik style.
+ Then you can [update](http://wiki.openstreetmap.org/wiki/Minutely_Mapnik) you database and generate
+ snapshots of an area as it is being mapped. Alternatively, you can specify an area with its center
+ and desired image size in pixels:
+ 
+-    nik4.py -c 0 51.477 --size-px 800 600 -z 17 openstreetmap-carto/osm.xml party-before.png
++    nik4 -c 0 51.477 --size-px 800 600 -z 17 openstreetmap-carto/osm.xml party-before.png
+ 
+ Even simpler, instead of `--center` and `--zoom` options, just grab an URL of a place:
+ 
+-    nik4.py --url http://www.openstreetmap.org/#map=16/55.9865/37.2160 osm.xml screenshot.png
++    nik4 --url http://www.openstreetmap.org/#map=16/55.9865/37.2160 osm.xml screenshot.png
+ 
+ ### Make a georeferenced raster image
+ 
+@@ -55,7 +55,7 @@ Since you are not bound to any tile prov
+ for customizing your map style: for example, remove forest on low zooms, add contrast to
+ road lines, render more villages, highlight useful POI and cycling routes.
+ 
+-    nik4.py -b 25 61.6 30.6 63.3 -z 13 custom.xml kuopio.png --ozi kuopio.map
++    nik4 -b 25 61.6 30.6 63.3 -z 13 custom.xml kuopio.png --ozi kuopio.map
+ 
+ This will render 16311×10709 image with a georeferencing file ready to open in OziExplorer.
+ For a `.wld` file, which can be used in desktop GIS applications or for creating a GeoTIFF file,
+@@ -68,7 +68,7 @@ use `--wld` option. You can convert png+
+ You would likely encounter out of memory error while trying to generate 16311×10709 image from the last
+ chapter. Despair not:
+ 
+-    nik4.py -b 25 61.6 30.6 63.3 -z 13 custom.xml kuopio.png --ozi kuopio.map --tiles 4
++    nik4 -b 25 61.6 30.6 63.3 -z 13 custom.xml kuopio.png --ozi kuopio.map --tiles 4
+ 
+ Voilà — now Mapnik has to generate 16 images of a manageable size 4078×2678. After that Nik4 will call
+ `montage` from the Imagemagick package to stitch all tiles together.
+@@ -90,7 +90,7 @@ trouble opening an image surpassing 200
+ 
+ Let's say you need a 1:5000 image of a city center for printing on a A4 sheet with margins.
+ 
+-    nik4.py -s 5000 --ppi 300 -a 4 -c 24.1094 56.9488 --margin 10 ~/osm/krym/carto/osm.xml 4print.png
++    nik4 -s 5000 --ppi 300 -a 4 -c 24.1094 56.9488 --margin 10 ~/osm/krym/carto/osm.xml 4print.png
+ 
+ What you get is a raster image, which when printed on an A4 with 300 dpi resolution, would have 10 mm margins
+ and scale of exactly 50 m in a cm. See the picture above for explanation of margins and other options.
+@@ -138,11 +138,11 @@ Note that you can add it in any place: f
+ obscure any text. Also note `status="off"`: this layer won't be drawn by default. So if you want
+ to export a clean map for the extent of your route (or any other) layer, use those options:
+ 
+-    nik4.py --fit route --size-px 400 700 osm.xml route_area.png
++    nik4 --fit route --size-px 400 700 osm.xml route_area.png
+ 
+ To enable drawing of the layer, use `--add-layers` option:
+ 
+-    nik4.py --fit route --add-layers route,stops --ppi 150 -a 6 osm.xml route.png
++    nik4 --fit route --add-layers route,stops --ppi 150 -a 6 osm.xml route.png
+ 
+ You can list many layers, separating them with commas. And you can hide some layers:
+ `--hide-layers contours,shields`. Obviously you can fit several layers at once, as well
+@@ -164,7 +164,7 @@ stroke width in the last example configu
+ 
+ Now to make an image of a route, use this command:
+ 
+-    nik4.py --fit route --ppi 150 -a 6 --vars width=8 route=~/routes/day2.gpx osm.xml route.png
++    nik4 --fit route --ppi 150 -a 6 --vars width=8 route=~/routes/day2.gpx osm.xml route.png
+ 
+ Note that path would likely to be resolved relative to the XML file location. If you omit `route` variable
+ in this example, you'll get an error message.
+@@ -173,7 +173,7 @@ in this example, you'll get an error mes
+ 
+ It's as easy as adding an `.svg` extension to the output file name.
+ 
+-    nik4.py --fit route -a -5 --factor 4 osm.xml map.svg
++    nik4 --fit route -a -5 --factor 4 osm.xml map.svg
+ 
+ Why did I use `--factor` (it's the same as using `--ppi 362.8`, which is 90.7 * 4)? Shouldn't
+ vector images be independent of the resolution? Well, the problem is in label kerning:
diff --git a/debian/patches/series b/debian/patches/series
index a2fba86..b67d390 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 python3.patch
+nik4.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/nik4.git



More information about the Pkg-grass-devel mailing list