mapsme / omim

🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android
Apache License 2.0
4.57k stars 1.15k forks source link

amenity-recycling handling #2835

Open hybridOL opened 8 years ago

hybridOL commented 8 years ago

The recycling POI has two very different kinds. One is recycling_type=centre meaning a larger area where certain kinds of recycling goods are dumped. Can be combined with some buildings and personnel at the centre, or just some place to dump e.g. green waste. The other one is a small container (recycling_type=container), where e.g. glass bottles or clothes are dumped. This is often not larger than 1x1x1m, so nothing compared to the centres.

Right now, the app does not distinguish between the two, which makes it rather disturbing to find hundreds of recycling centres across the city (as this is the current name shown in most if not all translations). Moreover, it does not help at all to find a recycling station of the proper type.

I guess it is not possible to print different names for the same amenity type. So we have to change the name of this amenity back from 'recycling centre' to 'recycling' and add details (recycling_type and materials, at least the most common ones, and at least for containers).

hybridOL commented 8 years ago

Another option would be to use the replaced_tags mechanism here as well. Not sure whether this works with editing the POIs then anymore, though. Especially for recycling containers, it would be really benefitial to have the opportunity to edit material types! Anyway, with renaming it could work this way: Remove amenity-recycling support and rename recycling_type=centre to mapsme-recycling_centre and same for _container. Then these would become to distinguishable objects.

biodranik commented 8 years ago

CC @Zverik

shaforostoff commented 5 years ago

a related issue is https://github.com/mapsme/omim/issues/8889

biodranik commented 5 years ago

@burivuh Who in the team handles OSM-related issues now?

shaforostoff commented 5 years ago

it would be good to see the type of recycling amenity: usually it is either glass, paper or plastic.

it is very handy if you travel and want to find a container to properly dispose your packaging

Zverik commented 5 years ago

It looks like there are two issues here:

  1. We need to introduce amenity-recycling-centre with the translations currently used for the amenity-recycling.
  2. Translations for the recycling should have "Recycling Container", "контейнер для переработки отходов" and so on. It would catch recycling_type=container and all other values, which are basically synonyms for that.
shaforostoff commented 5 years ago
  1. also catch

and add it to the text, for example "контейнер для переработки отходов (стекло)" or, in case there are several types: "контейнер для переработки отходов (стеклотара, пластик)"

also, you might prefer "контейнер для вторсырья" cause it is shorter

examples: https://www.openstreetmap.org/node/969075452 https://www.openstreetmap.org/node/2429457600

full list of types: https://wiki.openstreetmap.org/wiki/Tag:amenity=recycling

Zverik commented 5 years ago

3 — not for the mvp, because it's not a simple 1-line solution: one would need to add corresponding metadata fields, set up their editing, alter place cards for ios and android, add translations for "glass", "plastic" etc. That can be a full week job.

biodranik commented 5 years ago

@Zverik maybe you can create a short howto and mention all places in the code which should be updated for changes like that, so everyone in the world can try to do it?

shaforostoff commented 5 years ago

do I need to change any android code to implement that, or is it just a map generation code change?

i cloned omim master, but when I run configure.sh i get an error:

$ ./configure.sh ./configure.sh: 24: ./configure.sh: ./bootstrap.sh: not found

I run Debian testing.

P.S. I am a C++/Qt developer, and I would appreciate any help with implementing this feature, in English or Russian ;)

my skype id: shaforostoff fb: https://www.facebook.com/shaforostoff

shaforostoff commented 4 years ago

I have started adding recycling container types to maps generator: https://github.com/shaforostoff/omim/commit/17400539ac513796faf3c5f6c5b44317c32e0508

But now in the map that I generate, my 'reference' glass_bottles container has disappeared completely. Did I miss something? Could you help me, please?

tatiana-yan commented 4 years ago

@shaforostoff you should add data/styles and run tools/unix/generate_styles.sh. Styles tells the app how to display object. Generator drops objects without styles.

The easiest way to add styles is to copy it from some object.

tatiana-yan commented 4 years ago

You can see for example: https://github.com/mapsme/omim/pull/11338

There are 3 commits:

  1. mapcss + editor (if you want to support adding this type with editor) + styles copied from natural=spring + strings + ugc (it does not work without ugc server).
  2. generated styles (tools/unix/generate_styles.sh)
  3. generated strings (tools.unix/generate_strings.sh)
shaforostoff commented 4 years ago

thanks. will try that. in the meantime, please review https://github.com/mapsme/omim/pull/13057 it will speed up compilation on linux and mac (do not forget to sudo apt-get install ccache on linux and brew install ccache on macOS to get the benefit of caching)

shaforostoff commented 4 years ago

I am curious to get your feedback: https://github.com/shaforostoff/omim/commit/2904cc34b27c5a8ab22d953948038fde220c85fa I tested it only with desktop MAPS.ME application: in my city I could see the objects of desired type

BTW, since one of the steps was generating binary files (drules_proto*.bin), did you consider making it a build/generation step?

glass_bottles

tatiana-yan commented 4 years ago

Looks good now. Maybe it's better to separate autogenerated commits. We do not have resources mechanism for desktop app (it's "debug app" for developers, we are ok with that) so use see raw type in desktop, it's ok.

We do not want to convert autogeneration into build step because: 1) the main reason is: we need to review autogenerated files.

shaforostoff commented 4 years ago

i have separated the changes into 3 commits: https://github.com/shaforostoff/omim/commits/recycling_types

https://github.com/mapsme/omim/pull/13113

shaforostoff commented 4 years ago

Here is another pull request: https://github.com/mapsme/omim/pull/13124/

It will assist implementing an approach similar to cuisines, with recycling types being a separate category.

This approach will require much more changes to the code, so I hope you will pick it up ;)

tatiana-yan commented 4 years ago

https://github.com/mapsme/omim/pull/13143