gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.55k stars 822 forks source link

Code needed to render prepared icons [meta ticket] #3105

Closed kocio-pl closed 6 years ago

kocio-pl commented 6 years ago

We have lot more icons for requested features lately, mainly due to a great designing work of @Tomasz-W (thanks!). The problem is that they will be not shown until somebody do the coding. Some of them require just "copycat" skills and running a testing environment (in Docker probably). Some are more complex, but one still doesn't have to be a programmer to make it (especially after reading some background intro, tutorials or a real life example) and I'm willing to help.

Just please remember that after PR (pull request) is ready, you still need to interact with people as it's very common that people have different wishes, requests or questions, even when the case seems like very obvious (see this example).

Here is the (open!) list of things which I feel are ready to prepare a PR and test rendering a bit:

Easy ones (one feature per ticket, no subtags):

Complex ones (multiple objects with subtags):

Tomasz-W commented 6 years ago

A few days ago I thought about a tag like "pr needed", which could be added to mark issues where we all agree that icon/ icons are ok, and just wait for someone to write the code. I think this would be easier to manage than a next one issue with task list. Anyway - thank you for sorting things out here :)

kocio-pl commented 6 years ago

I hope more personal touch and a few words of explanation might work better than just a tag.

@althio @RobJN Would you like to pick anything from that list?

Tomasz-W commented 6 years ago

single icons:

-> task list moved to https://github.com/gravitystorm/openstreetmap-carto/issues/3298

pnorman commented 6 years ago

If we're adding this many icons, what are we going too be removing?

kocio-pl commented 6 years ago
  1. The things we don't want to render.
  2. Code duplication.
  3. Parts of documentation that are no longer true.

I don't share the assumption that adding some things means removing some others.

Tomasz-W commented 6 years ago

@kocio-pl Can you copy features from https://github.com/gravitystorm/openstreetmap-carto/issues/3105#issuecomment-371597884 and paste them to the task list in first comment?

kocio-pl commented 6 years ago

I wanted to show the list of things that are more or less ready, but not all the discussions are resolved in my opinion and I prefer to do the easier ones first.

Tomasz-W commented 6 years ago

Ok, we can treat it as 'phase 2' to focus on :)

kocio-pl commented 6 years ago

Sure, I can even add them one by one when I think the solution is established enough. It's just my idea for a "social helper tool" to help start with coding, but one can go on with any issue ticket or even without the ticket if she feels like.

BTW: have you thought about preparing PRs too?

james2432 commented 6 years ago

If Tomasz-W wants to keep belting out icons, I don't mind making the pull requests. I can't stand inkscape with it's ever changing image canvas size

Tomasz-W commented 6 years ago

BTW: have you thought about preparing PRs too?

I thought, but it got out of me fast ;) I'm more technical than an average person, but not as much as writing the code requires,. It's just not interesting me. I'm self-made graphic designer (you can see my projects here: https://tomoziomo.deviantart.com/gallery/), so making icons fits my other hobbies very well.

If Tomasz-W wants to keep belting out icons, I don't mind making the pull requests.

Great! Like factory line.

kocio-pl commented 6 years ago

That's great for me to see a teamwork spirit in this project.

I like to know different aspects, so I couldn't make big code changes, but I can do one man show (icon designing, simple coding, review and testing, managing the release and community, communication with upstreams etc.). However that's what I like to achieve my goals and if we have enough people in the active team it doesn't really matter what part anyone is interested in. It's just good if there's more than one person able to deal with something.

kocio-pl commented 6 years ago

Any other people willing to try some coding? We need you, even if you're not a coder and want to learn basics, since there are many of the tickets open and only few people active.

Karthoo commented 6 years ago

I would help, but I don't have that much coding knowledge. So it would be good if there was a tutorial or if someone would give me instructions.

kocio-pl commented 6 years ago

Great! I'm not a coder, but most of the time experience, testing and looking at the code for similar objects is enough.

I would start with installing testing environment:

https://github.com/gravitystorm/openstreetmap-carto/blob/master/DOCKER.md

Let me know how far did you go with it. Also please read a bit about this style in general:

https://wiki.openstreetmap.org/wiki/Standard_tile_layer

Karthoo commented 6 years ago

I have some problems with installing the virtual environment. I now have a virtual Ubuntu running with Docker installed. But when I try to import the osm-carto repository I get the following error: docker error I also managed to start kosmtik somehow. Is that correct? kosmtik

james2432 commented 6 years ago

you need to start the docker service: sudo systemctl start docker

or

sudo systemctl enable docker (to not have to start it every reboot) sudo systemctl start docker

Karthoo commented 6 years ago

Doesn't help, unfortunately

james2432 commented 6 years ago

docker is retarded as it binds to a port and has to run as root.

Are you part of the docker group?

sudo gpasswd -a $USER docker

kocio-pl commented 6 years ago

If you don't have the access to a Docker daemon, it most probably means that only root has these rights by default and you should add current user to a docker group:

https://docs.docker.com/install/linux/linux-postinstall/

There are no really secure solutions when talking about Docker, but if it's your personal machine, you can do it instead of running sudo all the time.

As of Kosmtik, it doesn't look good, please give us more informations what do you do.

james2432 commented 6 years ago

you also would need to run :

newgrp docker

or log out and log back in

james2432 commented 6 years ago

or less secure easier way prepend sudo to all docker-compose commands:

sudo docker-compose .....

Karthoo commented 6 years ago

@james2432 Thank you, the error disappeared after I added my account to the docker group!

Karthoo commented 6 years ago

But another problem occurred: In the guide it says that PostgreSQL would start up after typing 'docker-compose up import'. That didn't happen. Instead kosmtik started again with this being the last lines: docker error

kocio-pl commented 6 years ago

Which steps did you do before from Quick start section? Do you have some data file (like PBF) downloaded in the proper directory?

Karthoo commented 6 years ago

I did everything in the quick start section

kocio-pl commented 6 years ago

Wht is the output of this command in the osm-carto directory:

ls *.pbf
Karthoo commented 6 years ago

data.osm.pbf

kocio-pl commented 6 years ago
  1. What file did you downloaded - could you check if the md5sum is the same as on the site?:
ls -la data.osm.pbf
md5sum data.osm.pbf
  1. Is it real file or just a symbolic link maybe? Docker has no power outside the mounted volume.
Karthoo commented 6 years ago

Yes, the md5sum is the same (I downloaded 'Italy - Sud' from Geofabrik. (Didn't find a way to download smaller areas))

And yes, it's a real file of 200+ MB.

EDIT: Seems to work now ;-)

Karthoo commented 6 years ago

Ok, I'm running the kosmtik application now, but it doesn't render anything ... It's not that easy as I thought

kocio-pl commented 6 years ago

EDIT: Seems to work now ;-)

Do you know what was the problem?

Ok, I'm running the kosmtik application now, but it doesn't render anything

Do you look in a proper place? Could you post a screenshot to show what do you exactly mean by "nothing"?

Karthoo commented 6 years ago

Do you know what was the problem? Well, sometimes a simple restart can be the solution ...

And I think this was also the solution for kosmtik not rendering anything. When I started my virtual machine this morning it rendered without any issue.

So is there any guide about how to test new things and how to add them to the code?

kocio-pl commented 6 years ago

There is a detailed example, which I think might be very useful:

https://www.openstreetmap.org/user/SomeoneElse/diary/43041

I started just by looking on the code for similar objects, for example lately merged shop and amenity (very popular types):

Let me know how does it go or if you need something more.

Karthoo commented 6 years ago

Thank you, I did my first tests now with leisure=beach_resort.

Tomasz-W commented 6 years ago

@kocio-pl As I'm continuously updating my https://github.com/gravitystorm/openstreetmap-carto/issues/3105#issuecomment-371597884 and try to coordinate work of coders, can I open new ticket for this issue, where my list will be the first post? I think it would be better so see actual progres bar of the task list and not to scrolling the page for certain post.

kocio-pl commented 6 years ago

OK. When you will open your ticket, I will close this one.

Tomasz-W commented 6 years ago

The new ticket with reguraly updated task list in the first post is https://github.com/gravitystorm/openstreetmap-carto/issues/3298.

Since opening this one, we have added 20 new icons. Thanks for all the contributors! :)

kocio-pl commented 6 years ago

Also thank you all. Let's move to the new ticket now.