Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for templated/generated categories - use this for ATMs, post_boxes, etc. #2883

Closed
yoasif opened this issue Jul 13, 2019 · 24 comments
Assignees
Labels
enhancement Actionable - add an enhancement to the source code

Comments

@yoasif
Copy link
Contributor

yoasif commented Jul 13, 2019

I recently ran into a free-standing Chase ATM - you can find a lot here: https://locator.chase.com/search?q=New+York%2C+NY%2C+USA&l=en&type=ATM

When I type in Chase in iD, I was presented with an entry for branch locations, but none for ATMs.

There should be a new entry specifically for free standing ATMs.

@yoasif yoasif changed the title Create new entry for freestanding ATMs Create new entry for Chase freestanding ATMs Jul 13, 2019
@bhousel
Copy link
Member

bhousel commented Jul 17, 2019

Hmm we don't currently do ATMs in this index - maybe we should!
I'm curious what people think, and also want to take a look at with other maps do (Google/Apple/Bing)

@1ec5
Copy link
Member

1ec5 commented Jul 17, 2019

Yes, we should have entries for ATMs, particularly for banks that have freestanding ATM locations (whether drive-through or in a mall or supermarket). We should also take care to tag these ATMs with network as appropriate (often but not always redundantly to brand).

@bhousel
Copy link
Member

bhousel commented Jul 17, 2019

We should also take care to tag these ATMs with network as appropriate (often but not always redundantly to brand).

Awesome - this is interesting to know..
Are you sure network is the right tag for this? Would like to hear more.

I think of network as something else, more specifically like the formats used by road and transit networks.

@1ec5
Copy link
Member

1ec5 commented Jul 17, 2019

Yep, network is typically tagged on ATMs and other amenities like bike repair stations. This practice happens to predate brand (which used to just be for saying that a particular car repair shop services Volvos, say), but it does express a slightly different kind of affiliation than brand.

For better or worse, the same network key has always been used for multiple things that English speakers call networks: “route network”, “ATM network”, etc. That’s one reason NSI will be a good complement to taginfo for public transportation networks (#2864).

It’s unclear to me whether interbank networks can also be tagged in network. The wiki suggests that that’s the difference between network and operator, but I’ve definitely seen different usage in the U.S. The most obvious NSI entries would be simple cases where brand and network are the same.

@mds08011
Copy link
Collaborator

mds08011 commented Jul 17, 2019

It’s unclear to me whether interbank networks can also be tagged in network.

What is an example of a network that isn't interbank? Wouldn't that just be a brand?

Assuming interbank networks are tagged as network, it will be common for credit union ATMs to have different brand and network tags. For example, Navy Federal Credit Union has its own branded ATMs which participate in the Plus interbank network.

Overall I agree that we should add ATMs to the index.

@1ec5
Copy link
Member

1ec5 commented Jul 17, 2019

What is an example of a network that isn't interbank? Wouldn't that just be a brand?

If network is only for interbank networks, then yes, the bank name would go in brand or operator. However, the line between these three tags is really fuzzy. Some interbank networks, like Allpoint, are heavily branded as such, regardless of the operating bank. On the other hand, there are interbank networks like Plus and Co-Op that show up as a minuscule logo on a machine that’s otherwise branded by the bank.

@bhousel
Copy link
Member

bhousel commented Jul 17, 2019

I can't promise great downstream support in iD if network tag is used for a bunch of different things.
We can always just show the value of the tag though.

@mds08011
Copy link
Collaborator

mds08011 commented Oct 1, 2019

I threw together a draft pull request (#3056) to try to work through some examples. I erred on the side of caution and added what I expect is excess, redundant information.

Some questions to consider are:

  • Do we want to include :wikidata tags with network and operator?
  • Should operator be included at all?
  • If operator is the same as brand, should it be listed twice, or should operator only be included if it differs from brand?

@1ec5
Copy link
Member

1ec5 commented Oct 1, 2019

Do we want to include :wikidata tags with network and operator?

Yes, network should be paired with network:wikidata by the same reasoning as including brand:wikidata, but moreso because network is overloaded by multiple tagging schemes.

Should operator be included at all?

The wiki’s guidance to tag ATMs with operator dates back to before brand was ever documented. In the presence of brand and network tagging, operator does seem redundant. After all, if mappers want to indicate the third party that maintains the ATM, they could manually use operator for that, without NSI’s help.

Then again, openstreetmap-carto only labels ATMs by their operators, not their names, networks, or brands: gravitystorm/openstreetmap-carto#2855.

@mds08011
Copy link
Collaborator

mds08011 commented Oct 2, 2019

After all, if mappers want to indicate the third party that maintains the ATM, they could manually use operator for that, without NSI’s help.

Excluding operator seems reasonable to me, even with the Carto labeling issue.

@andrewharvey
Copy link
Collaborator

Out of all the tags name, brand, network, operator for most ATMs around me only the brand is easily ground verifiable, especially with non-bank ATMs. So for Australian ATM's I'd just add presets for the brand and brand:wikidata tags.

The network seems something internal to the black box, not sure how' you find that out? Similar with operator, especially with non-bank ATMs the kind you might find at the pub, it's hard to know if it's operated by the pub or by the company which supplied the ATM. So for those reasons I'd just template the brand and brand:wikidata tags.

@mds08011
Copy link
Collaborator

mds08011 commented Nov 9, 2019

The network seems something internal to the black box, not sure how' you find that out?

I've been finding network by checking the bank's website, or looking for network logos on the debit cards and ATMs.

For example, US Bank's ATM locator page states:

To find additional ATMs without U.S. Bank ATM fees, select Show MoneyPass® ATM Network locations when you search.

@1ec5
Copy link
Member

1ec5 commented Nov 9, 2019

Most bank-operated ATMs in the U.S. also display network logos. Normally they aren’t as prominent as the bank logo, but I’ve seen credit union ATMs that display networks like Co-Op more prominently than the credit union logo.

@peternewman
Copy link
Collaborator

#3056 was closed as:

Going to close this for now.

Restructuring the code to allow operator or network to be the the defining tag (instead of brand) is in the back of my mind and will happen eventually.

Originally posted by @bhousel in #3056 (comment)

Can this not be merged now we don't have to have names, or is this a different issue? The transit stuff doesn't have brands either.

@peternewman
Copy link
Collaborator

peternewman commented Oct 24, 2020

Bump @bhousel , I'd say there is now a definite need for this (even ignoring iD). StreetComplete is trying to do a quest based on essentially this info but as there is no alternative source one is being created manually from the OSM data, see for example the NoteMachine or Co-op variants here:
https://github.com/westnordost/StreetComplete/blob/0a1a722fece9b8706915806ebfebd5cd901e8b5d/res/country_metadata/atmOperators.yml#L1753-L1844

I've opened streetcomplete/StreetComplete#2194 on the SC side.

@bhousel
Copy link
Member

bhousel commented Oct 24, 2020

Bump @bhousel , I'd say there is now a definite need for this (even ignoring iD). StreetComplete is trying to do a quest based on essentially this info but as there is no alternative source one is being created manually from the OSM data, see for example the NoteMachine or Co-op variants here:

Cool, yeah @westnordost and I were chatting on the OSM US Slack about this. I can figure out something to get the bank ATMs into NSI.

I feel like there are a few situations where we want to define rules or templates like:

  • "For each amenity=bank generate an ATM like this"
  • "For each route=bus generate Bus Stops and Stop Locations like this"

Rules and templating engines can involve a lot of complexity, and I want to avoid that and do the dumbest easiest thing I can think of.

@peternewman
Copy link
Collaborator

I feel like there are a few situations where we want to define rules or templates like:

* "For each `amenity=bank` generate an ATM like this"

* "For each `route=bus` generate Bus Stops and Stop Locations like this"

For each charity generate clothes recycling bins.

Do we need to deal with being able to either exclude or specifically approve stuff for some rules for example in London the stops would be owned by Transport for London I think, but certainly for coaches commercial companies would stop at them. Or the same way the UK rail network has a mix of people owning tracks, stations and routes. Although I guess inherently offering things that don't exist isn't horrendous as someone should still check on the ground first.

Rules and templating engines can involve a lot of complexity, and I want to do avoid that and do the dumbest easiest thing I can think of.

There is a word missing or misplaced here. Ah I think you meant:

Rules and templating engines can involve a lot of complexity, and I want to do avoid that and do the dumbest easiest thing I can think of.

Are you talking about a way to seed the index initially (so we could just delete the duplicates once) or an ongoing process where each newly created bank gets it's own ATM?

@bhousel
Copy link
Member

bhousel commented Oct 24, 2020

There is a word missing or misplaced here. Ah I think you meant:

Oh yeah, extra word - I removed it. You were correct.

Are you talking about a way to seed the index initially (so we could just delete the duplicates once) or an ongoing process where each newly created bank gets it's own ATM?

Ongoing process..
I'm thinking maybe the brands/amenity/atm.json file might contain something like:

{
  "brands/amenity/atm": [
    // first one is a template…
    {   
      "forEach": "brands/amenity/bank",
      "setTags": {
        "amenity": "atm",
        "operator": "{source.tags.brand}",
        "operator:wikidata": "{source.tags.brand:wikidata}",
        "operator:wikipedia": "{source.tags.brand:wikipedia}"
      }
    },

    // normal ATM items can exist here too…
  ]
}

@bhousel bhousel changed the title Create new entry for Chase freestanding ATMs Add support for templated/generated categories - use this for ATMs, post_boxes, etc. Nov 6, 2020
@bhousel bhousel self-assigned this Nov 6, 2020
@bhousel bhousel added the enhancement Actionable - add an enhancement to the source code label Nov 6, 2020
@bhousel
Copy link
Member

bhousel commented Nov 6, 2020

Working on this today.

The first thing for me do is to "unify" the build scripts - we have build_brands, build_transit, build_operators and they all do basically the same thing but know nothing of each other.

bhousel added a commit that referenced this issue Nov 11, 2020
They don't do anything yet, but they can be loaded/saved
(re: #2883)
@bhousel
Copy link
Member

bhousel commented Nov 12, 2020

The template idea worked 🎉

This is the contents of brands/amenity/atm.json

{
"brands/amenity/atm": [
{
"templateSource": "brands/amenity/bank",
"templateTags": {
"amenity": "atm",
"operator": "{source.tags.brand}",
"operator:wikidata": "{source.tags.brand:wikidata}",
"operator:wikipedia": "{source.tags.brand:wikipedia}"
}
}
]
}

This rule expands every bank from brands/amenity/bank.json into an ATM:
https://nsi.guide/index.html?t=brands&k=amenity&v=atm

Screen Shot 2020-11-12 at 10 24 13 AM

@bhousel
Copy link
Member

bhousel commented Nov 12, 2020

Few outstanding questions about these ATMs

  • Should I remove the name tags from them? I see people mapping them both with and without a name.

@bhousel
Copy link
Member

bhousel commented Nov 12, 2020

  • Should I remove the name tags from them

per 46ab8eb comments, sounds like we're ok with leave the name tags for now, but we can remove them if people really don't like them.

ATMs and Post Boxes are done, so I'm going to close this issue..
I'll add a few more automatic categories under the 'transit' tree (for things like stops and platforms etc).

@pyrog
Copy link
Contributor

pyrog commented Nov 13, 2020

Some banks don't have ATM (at least in France).

How to add a parameter somewhere to generate or not ATM templates ?
Especially if NSI move it's data to Data Items (cf. #4657)

@bhousel
Copy link
Member

bhousel commented Nov 13, 2020

Especially if NSI move it's data to Data Items

We're not moving our data to "Data Items" but we'll upload it there if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Actionable - add an enhancement to the source code
Projects
None yet
Development

No branches or pull requests

7 participants