Talk:Shaded relief maps using mapnik

From OpenStreetMap Wiki
(Redirected from Talk:HikingBikingMaps)
Jump to navigation Jump to search

Discuss HikingBikingMaps page here:


output for Garmin

Please have a look here, I continued substantially on the cyclemap. http://wiki.openstreetmap.org/index.php/OSM_Map_On_Garmin/mtb_map --Extremecarver 23:55, 19 September 2008 (UTC)

Edit: Sorry, I think your lightyears ahead of my work, and probabely not working with output for Garmin units in mind. Do you know how I could incorporate your path_rendering into a "simple" mtb map? Is the output an osm file, or osm tiles? If yes then I will try to repeat your process and just afterwards try to process the map with mkgmap. --Extremecarver 00:09, 20 September 2008 (UTC)

Rendering Engine?

Does someone know if we can do the same with the Osmarender engine instead of Mapnik? --Zapfen 08:25, 23 September 2008 (UTC)

Gamma correction for hillshade.cpp

I've found the color of the hillshading tool (from demtools) to be too dark for my taste, so I implemented some gamma correction:

Index: hillshade.cpp
===================================================================
--- hillshade.cpp	(Revision 196)
+++ hillshade.cpp	(Arbeitskopie)
@@ -45,6 +45,7 @@
     int         containsNull;
     const char *pszFormat = "GTiff";
     float       z = 1.0;
+    float       gamma = 1.0;
     float       scale = 1.0;
     float       az = 315.0;
     float       alt = 45.0;
@@ -57,7 +58,7 @@
         printf( " \n Generates a shaded relief map from any GDAL-supported elevation raster\n"
                 " Usage: \n"
                 "   hillshade input_dem output_hillshade \n"
-                "                 [-z ZFactor (default=1)] [-s scale* (default=1)] \n"
+                "                 [-z ZFactor (default=1)] [-g Gamma (default=1)] [-s scale* (default=1)] \n"
                 "                 [-az Azimuth (default=315)] [-alt Altitude (default=45)]\n\n"
                 " Notes : \n"
                 "   Scale for Feet:Latlong use scale=370400, for Meters:LatLong use scale=111120 \n\n");
@@ -71,6 +72,8 @@
     {
         if( EQUAL(papszArgv[iArg],"-z") )
             z = atof(papszArgv[iArg+1]);
+        if( EQUAL(papszArgv[iArg],"-g") )
+            gamma = atof(papszArgv[iArg+1]);
         if( EQUAL(papszArgv[iArg],"-s") ||
                 EQUAL(papszArgv[iArg],"-scale"))
             scale = atof(papszArgv[iArg+1]);
@@ -190,10 +193,13 @@
                        cos(alt*degreesToRadians) * cos(slope*degreesToRadians) *
                        cos((az-90.0)*degreesToRadians - aspect);
 
-                if (cang <= 0.0) 
+                if (cang <= 0.0) {
                     cang = 1.0;
-                else
+		}
+                else {
+		    cang = pow(cang, 1.0/gamma);
                     cang = 1.0 + (254.0 * cang);
+		}
 
                 shadeBuf[j] = cang;
 

--Colin Marquardt 14:19, 18 January 2009 (UTC)

Merge with Hiking Map Move to 'Mapnik hiking and biking maps'

I know this page title mentions 'biking' and therefore isn't the same thing (before anyone states this obvious point) ...but

The number of wiki pages on topics to do with mapping footpaths in the countryside is getting out of hand. We need to consolidate, not necessarily by reducing the number of wiki pages, but at least be defining what information goes on what page and cross linking better. So let's either merge this into Hiking Map, or rename it and describe it and shuffle info around such that difference is clearer

-- Harry Wood 12:55, 27 January 2009 (UTC)

I strongly oppose this suggestion. This page is not about mapping footpaths in the countryside at all!!! Did you read through it before suggesting a merger? It offers an excellent technical description on how to set up your own relief map rendering. I was able to base my own map on this description. Hiking map on the other hand is a rather rough collection of ideas with no particular consistency or connected implementation effort. Therefore I believe it is a very bad idea to merge two completely different pages.
  1. A technical tutorial and a feature brainstorming page and not the same thing
  2. This page offers an excellent and working technical description and should not be damaged by needless changes or by mixing it with unrelated stuff.
Renaming it to something like "creating relief maps for hiking and biking" would be feasible. --Nop 13:41, 27 January 2009 (UTC)
To be honest I didn't read it much no. Just trying to draw some attention to the wiki-mess surrounding this group of pages in general. The page name "HikingBikingMaps" is a problem. It's proximity the name Hiking Map implies that there is some unnecessary duplication, but as you say, if this page is a good self contained technical tutorial, then it just needs a better name.
"Creating relief maps for hiking and biking" would be better. Or maybe "Mapnik hiking and biking maps". What d'you think?
-- Harry Wood 14:05, 27 January 2009 (UTC)
It does not require you to use Mapnik either. It is just about creating the contour and hill shading data. I made my suggestion.
I agree that we have too many pages with slightly different content. We also have German pages with yet more different content. Because of all the confusion, I have posted the definite tagging that my renderer will evaluate on my map page. But consolidating all those pages that do match is a good thing, especially the tagging should be documented only in one place. --Nop 14:17, 27 January 2009 (UTC)