logo separator

[mkgmap-dev] building=house without addr:housenumber

From Gerd Petermann gpetermann_muenchen at hotmail.com on Mon Jun 10 16:03:12 BST 2024

Hi all,

OK, here is the 2nd version of the patch. The previous version didn't work with (entrance) nodes (node is part of the building way and has addr:housenumber.
Example: https://www.osm.org/way/134811675

ciao
Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Montag, 10. Juni 2024 15:40
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] building=house without addr:housenumber

Hi all,

the patch doesn't work yet. I found a few problems in the patch, but maybe also our QuadTree implementation is bogus.
Work in progress...

ciao,
Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Montag, 10. Juni 2024 11:38
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] building=house without addr:housenumber

Hi all,

attached is a possible patch to implement a new option --x-add-hnr-missing. I have no idea if this is useful for others, but it it is rather simple and thus should do no harm.
With the patch applied mkgmap checks if the option is set and - optionally - if it specifies a comma separated list of values for the building=* tag.
If the option is given without an argument, the default list is "apartments,bungalow,detached,farm,house,residential,semidetached_house,terrace"

I guess there are a few more building=* values which should have a addr:houseumber but you get the idea.

The patch adds code to the POIGeneratorHook, the new code is executed before any style rules are used.
What does it do?
1) If set, poisToAreas is also set.
2) mkgmap checks nodes and closed ways, if the element has a building=* tag with one of the given values and no addr:housenumber=* tag it is a candidate.
3) If a node is a candidate mkgmap will add the special tag mkgmap:hnr-missing=true.
2) If a closed way is a candidate mkgmap tries to find a node with addr:housenumber=* inside or on the outline of the way.
If none is found the special tag mkgmap:hnr-missing=true is added to the way.
This happens before the POI for the way is generated, so the generated POI will also have the special tag.

I use it with the following rule in points:
mkgmap:hnr-missing=* { echotags hnr;name 'Hnr ?' } [0x6402 resolution 24 continue]

I use the generated map when I cycle to collect OSM data. I have a few more rules to render other objects like
traffic_sign=city_limit {name '${name}'} [0x2c04 resolution 24]

so that whenever I pass such a sign I can easily verify if is already mapped.

So, if anybody is interested in this functionality or maybe has ideas to improve it, please let me know.

ciao,
Gerd






________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen at hotmail.com>
Gesendet: Montag, 3. Juni 2024 10:58
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] building=house without addr:housenumber

Hi Joris,

no, the is_in function doesn't help. I want to check if a polygon contains no node, that doesn't work with is_in.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Joris Bo <jorisbo at hotmail.com>
Gesendet: Montag, 3. Juni 2024 10:50
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] building=house without addr:housenumber

Hi Gerd

I don't know if this is exact the same, but I think I do use the is_in fuction in de points-file to not display a poi. So then it should also be possible to do show a poi

tourism = viewpoint & man_made != tower & is_in(man_made,tower, in) = false  {name '${name} - ${description}' | '${name}'} [0x2803 resolution 24]

Kind regards,
Joris

-----Oorspronkelijk bericht-----
Van: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> Namens Gerd Petermann
Verzonden: zondag 2 juni 2024 07:17
Aan: mkgmap-dev at lists.mkgmap.org.uk
Onderwerp: [mkgmap-dev] building=house without addr:housenumber

Hi all,

for OSM mapping purposes I like to have the possibility to add a poi for each residential (house,apartments,farm,...) building polygon that
- doesn't have a addr:housenumber=* tag AND
- doesn't contain a node with addr:housenumber=* AND
- doesn't have a node on the outline (part of the way) with addr:housenumber=*

I want to render a POI with a text like "Hnr ?" so that, when I cycle near such a building, I can decide whether I try to find out the house number.

I think there is currently no way to do this with mkgmap since we don't have something like a "contains" style function.
I can't remember if we even thought about this when the is_in function was added?

My current work around is to use JOSM as a preprocessor but that works only for small maps.

Gerd





_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-hnr-missing-v2.patch
Type: application/octet-stream
Size: 6952 bytes
Desc: add-hnr-missing-v2.patch
URL: <https://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20240610/6a258712/attachment-0001.obj>


More information about the mkgmap-dev mailing list