[Taginfo-dev] Getting matching maps on Taginfo gb

Shaun McDonald shaun at shaunmcdonald.me.uk
Sun Apr 21 22:27:24 UTC 2019


Hi Imre,

Thank you, these figures have done the trick.

The coordinates are in a different order to which Taginfo uses, however swapping the middle 2 numbers produces a good map.

Shaun

> On 20 Apr 2019, at 17:04, Imre Samu <pella.samu at gmail.com> wrote:
> 
> Hi Shaun,
> 
> sorry, now I can't debug your values - but as I remember it is not easy. 
> 
> I am calculating with this ugly SQL function - for every country.
> * https://github.com/taginfo/dockerized-taginfo/blob/master/setup/setup_xtaginfo_admin.sql#L42 <https://github.com/taginfo/dockerized-taginfo/blob/master/setup/setup_xtaginfo_admin.sql#L42>
> 
> and my result for GB  - this.
> https://github.com/ImreSamu/dockerized-taginfo/blob/sotm2018/service/eu/gb/taginfo-config.json <https://github.com/ImreSamu/dockerized-taginfo/blob/sotm2018/service/eu/gb/taginfo-config.json>   - but this is smaller than yours
> ( ~ 2-3 day online: http://207.180.196.156:20142/keys/highway#map <http://207.180.196.156:20142/keys/highway#map> )
>  included : https://en.wikipedia.org/wiki/Rockall <https://en.wikipedia.org/wiki/Rockall> - so it is strange .. 
> 
> -------
> and calling with your coordinate - my result.
> ===============
> osm=# select get_xtaginfo('gb', -12.35,2.98, 49.47, 61.2) ;
> NOTICE:  OK   R# = gb, 18 , 279.000 , 216.000 ,0.170 ,0.270
>             get_xtaginfo             
> -------------------------------------
>  {279,216,-12.35,3.150,49.47,61.470}
> (1 row)
> ==============
> so the geneated image:  279 x 216  pixel     
> and the coordinates=  -12.35,3.150,49.47,61.470
> but  I can't test ..
> 
> Imre
> 
> 
> 
> 
> 
> 
> Shaun McDonald <shaun at shaunmcdonald.me.uk <mailto:shaun at shaunmcdonald.me.uk>> ezt írta (időpont: 2019. ápr. 20., Szo, 11:20):
> Hi,
> 
> 
> I’m trying to get the background map to match the Taginfo generated map for the GB Taginfo. I seem to be missing something from the instructions on the OSM wiki, as the background maps. With an earlier version I was getting too much included vertically.
> 
> https://wiki.openstreetmap.org/wiki/Taginfo/Installation#Adapting_the_map_view <https://wiki.openstreetmap.org/wiki/Taginfo/Installation#Adapting_the_map_view>
> 
> My working is in https://docs.google.com/spreadsheets/d/1rnO5jqZAirsFankimavetobulNE2f5MJi4Z0PA8h0Dc/edit?usp=sharing <https://docs.google.com/spreadsheets/d/1rnO5jqZAirsFankimavetobulNE2f5MJi4Z0PA8h0Dc/edit?usp=sharing>
> 
> I’ve followed https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ <https://switch2osm.org/manually-building-a-tile-server-18-04-lts/> to produce a map DB.
> 
> Map image script:
> cat create_taginfo_map.py
> import mapnik
> 
> m=mapnik.Map(330,345)
> mapnik.load_map(m, 'openstreetmap-carto/taginfo_outline.xml')
> 
> bbox = mapnik.Box2d(-9,49.8,2.5,60.8)
> m.zoom_to_box(bbox)
> 
> im = mapnik.Image(330,345)
> mapnik.render(m,im)
> im.save('gb_map.png', 'png256’)
> 
> The highway map is a good example showing the issue:
> https://taginfo.openstreetmap.org.uk/keys/highway#map <https://taginfo.openstreetmap.org.uk/keys/highway#map> 
> 
> head openstreetmap-carto/taginfo_outline.xml
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE Map[]>
> <Map background-color="#f2efe9" buffer-size="0" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
>  <Parameters>
>    <Parameter name="scale">1</Parameter>
>    <Parameter name="metatile">2</Parameter>
>    <Parameter name="name"><![CDATA[OpenStreetMap Carto]]></Parameter>
>    <Parameter name="description"><![CDATA[A general-purpose OpenStreetMap mapnik style, in CartoCSS]]></Parameter>
>    <Parameter name="bounds">-180,-85.05112877980659,180,85.05112877980659</Parameter>
>    <Parameter name="center">0,0,4</Parameter>
> 
> 
> Taginfo config segment:
>    // For the geodistribution map. See the wiki documentation about these settings.
>    "geodistribution": {
>        "left": -9,
>        "bottom": 49.8,
>        "right": 2.5,
>        "top": 60.8,
>        "width": 345,
>        "height": 330,
>        "scale_image": 1,
>        "scale_compare_image" : 1,
>        //"background_image": "/img/mapbg/world.png",
>        "background_image": "/img/mapbg/gb_map.png",
>        // optional attribution for base image, will show up below all maps
>        "image_attribution": ""
>    },
> 
> I can’t quite figure out what I’m doing wrong to get the maps to line up correctly while following the instructions on the wiki. I’m so close now. Would anyone be able to provide some pointers on how to fix?
> 
> Shaun
> 
> 
> _______________________________________________
> Taginfo-dev mailing list
> Taginfo-dev at openstreetmap.org <mailto:Taginfo-dev at openstreetmap.org>
> https://lists.openstreetmap.org/listinfo/taginfo-dev <https://lists.openstreetmap.org/listinfo/taginfo-dev>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/taginfo-dev/attachments/20190421/af39ecd4/attachment.html>


More information about the Taginfo-dev mailing list