Closed kocio-pl closed 6 years ago
I've just got kosmtik running, so I could do some testing renderings now!
I'm looking for a good SVG image file for the @ symbol, but the ones I've found are not sized the same as our 14 pixel SVGs. Is there a good application I can use for resizing and editing SVGs?
Great! I was about to ask you how is it going. :smile:
I, and probably many other people, do SVG editing using multi platform application Inkscape (distributed under open source license).
I haven't been able to find a download an Inkscape package for MacOSX 10.13.16 (High Sierra). It looks like there is a "Homebrew" option but I'm not sure about trying that yet.
@Tomasz-W, could you make an @ "at" symbol icon for this issue?
(I'm also having trouble finding internet cafes! I thought there were 4 in the Azores, but they are located at the same place as several amenity=bank, so didn't render. I'm trying Lebanon now. Is there a good tool for downloading just a small area of a city, rather than a whole country?)
Isn't this package proper for you?
https://inkscape.org/release/0.92.2/mac-os-x/
Finding and exporting small area is rather easy:
This will let you download map.osm
file which you can import the same as PBF files.
I also try to zoom in/out an object on the map, so the proper zoom+position appears in the URL. Then I copy it from URL (something like 18/52.25436/21.03768
) and paste it in the Kosmtik URL (like http://127.0.0.1:6789/openstreetmap-carto/#18/52.25436/21.03768
), so I don't loose the time to find it and render a lot of tiles along the way.
Did it help you?
Thanks for the link to inkscape! The one I found was broken. It's a big file so it may take me a couple of days; hopefully @Tomasz-W will make one sooner.
I previously tried to import a data.osm file with "docker-compose up import" but I got this error:
"Osm2pgsql failed due to ERROR: Open failed for 'data.osm.pbf': No such file or directory"
So I thought I had to have a file in the format data.osm.pbf to use the command "docker-compose up import".
Do I need to edit the file docker-startup.sh to look for data.osm or map.osm instead of data.osm.pbf?
Or is there a different command to import a databalse from data.osm instead of .pbf?
I think I can download osmosis and use that to change .osm files to .pbf, so I might try that instead?
On 10/18/18, kocio-pl notifications@github.com wrote:
Isn't this package proper for you?
https://inkscape.org/release/0.92.2/mac-os-x/
Finding and exporting small area is rather easy:
- Go to https://taginfo.openstreetmap.org/tags/amenity=internet_cafe
- Click Overpass turbo
- Set the area you want to try
- Click "Run/Execute" (or whatever English version might be...) - if there are no objects just check another area
- Click on the object you want to render
- When seeing data on the standard OSM.org page click Export on top and then click Export button (or "Overpass API" link if there are any problems)
This will let you download
map.osm
file which you can import the same as PBF files.I also try to zoom in/out an object on the map, so the proper zoom+position appears in the URL. Then I copy it from URL (something like
18/52.25436/21.03768
) and paste it in the Kosmtik URL (likehttp://127.0.0.1:6789/openstreetmap-carto/#18/52.25436/21.03768
), so I don't loose the time to find it and render a lot of tiles along the way.Did it help you?
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/gravitystorm/openstreetmap-carto/issues/3451#issuecomment-430867401
inkscape is on macports as well:
# port search inkscape
inkscape @0.92.3 (graphics, gnome)
This is the current stable release version of Inkscape.
inkscape-app @0.92_1 (aqua, graphics)
Inkscape.app application bundle
@jeisenbe, why not just go to Geofabrics website and download a .pbf file? A lot of them are really small and its alot easier then trying to convert something into one. Then you just put in the osm directory, rename it data.osm.pbf, and do the docker up import thing.
@Adamant36, I’ve been doing this; I’ve got Lebanon, Liechtenstein, Andorra, the Azores and the Faroes so far, but some new features are still hard to find, eg Internet cafe. So I’m trying Osmosis now On Thu, Oct 18, 2018 at 8:13 PM Adamant36 notifications@github.com wrote:
@jeisenbe https://github.com/jeisenbe, why not just go to Geofabrics website and download a .pbf file? A lot of them are really small and its alot easier then trying to convert something into one. Then you just put in the osm directory, rename it data.osm.pbf, and do the docker up import thing.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/gravitystorm/openstreetmap-carto/issues/3451#issuecomment-430969613, or mute the thread https://github.com/notifications/unsubscribe-auth/AoxshOLIv_sCBPwaYyb-ykhN6OsrhVbdks5umGJpgaJpZM4XdgYE .
Thats good. Did you try OverPass Turbo? It should tell you where they are.
@jeisenbe Here you go: https://gist.github.com/Tomasz-W/1acbd56a526463b3d38fcc82c8028551. Good luck with test renderings and (I believe) PR :)
@Tomasz-W, you should try coding sometime. It can be kind of fun ;)
@Tomasz-W, I tried the icon.
It looks nice when I open the svg in a browser, but I can’t get it to render.
If I copy and rename an existing icon it works fine.
I also tried using this symbol to replace the clinic/doctors icon in the file, and it disappeared too. On Thu, Oct 18, 2018 at 9:41 PM Adamant36 notifications@github.com wrote:
@Tomasz-W https://github.com/Tomasz-W, you should try coding sometime. It can be kind of fun ;)
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/gravitystorm/openstreetmap-carto/issues/3451#issuecomment-430993270, or mute the thread https://github.com/notifications/unsubscribe-auth/AoxshPlw8Jg-303lSeJIuPHbC_vTM0W9ks5umHcIgaJpZM4XdgYE .
@jeisenbe For more technical help ask @kocio-pl or @Adamant36
@jeisenbe From what you've described, you probably just added a styling code into amenity-points.mss
file (just remember to add both icon styling and label styling - they are in separate sections), but did not add the proper code into project.mml
in few sections (called data layers), where the data is selected from the database for styling. This is a technical requirement to have sane performance with that many objects we render, reading all the data at once would kill the servers, so it creates burden for coders, but is important.
I suggest to look another similar amenity there and do it the same (4 layers if I remember correctly - line object, node object, line text and node text). This way you don't have to learn SQL. For example you might look at some earlier PR code, like #3434.
I hope this is more clear now, if you need further assistance, you're welcome to write about it.
Thank you. I did make that mistake at first, but I had already made the changes to project.mss and I was able to get an icon and label to render by copying an existing svg, but I couldn’t get the new svg file to render.
But now my computer has crashed and won’t restart; it may be a hardware problem. Maybe it’s just easier for someone else, who knows what they are doing, to take this over.
Joseph On Fri, Oct 19, 2018 at 7:09 AM kocio-pl notifications@github.com wrote:
@jeisenbe https://github.com/jeisenbe From what you've described, you probably just added a styling code into amenity-points.mss file (just remember to add both icon styling and label styling - they are in separate sections), but did not add the proper code into project.mml in few sections (called data layers), where the data is selected from the database for styling. This is a technical requirement to have sane performance with that many objects we render, reading all the data at once would kill the servers, so it creates burden for coders, but is important.
I suggest to look another similar amenity there and do it the same (4 layers if I remember correctly - line object, node object, line text and node text). This way you don't have to learn SQL. For example you might look at some earlier PR code, like #3434 https://github.com/gravitystorm/openstreetmap-carto/pull/3434.
I hope this is more clear now, if you need further assistance, you're welcome to write about it.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/gravitystorm/openstreetmap-carto/issues/3451#issuecomment-431181010, or mute the thread https://github.com/notifications/unsubscribe-auth/AoxshI-nyYii-n5Du2RjjtSx6WI6COYyks5umPv-gaJpZM4XdgYE .
Sorry to hear that. In case you will be able to run it again, you might just push your code changes to your OSM Carto fork, so I can just see it.
I’ll try that. These are the changes I was going to make, shown on my fork: https://github.com/jeisenbe/openstreetmap-carto/pull/2/files
I tried again on a different computer, and I tried cloning my repository again and using that. The text name label is still rendering, but not the icon. Here are a couple examples from the Azores, all with the same name but different locations. I guess it is a chain of internet cafes?
Espaçio TIC z18
Espaçio TIC z19
Espaçio TIC z21
But if I change the icon file it works! I copied cafe.svg and renamed it internet_cafe.svg, and now I get a brown coffee cup:
Espaçio TIC z18
Espaçio TIC z19
Espaçio TIC z21
Can someone else try the code on my branch?
Or would @Tomasz-W be willing to make a different version of the "at" symbol icon? Maybe the problem is that it is based on a font character rather than an abstract shape?
@jeisenbe, I can give it a try tomorrow. There might be a chance its something to do with the icon though. There's been a couple of them that didn't display correctly for whatever reason.
@jeisenbe, it's seem that your svg file is broken. Try to download it from the "Download zip" button in the link provided by @Tomasz-W
@jeisenbe, you might want to move the code for the text rendering down one column to line 739. Its a more appropriate place for it. I wouldn't put an internet cafe in the same category as a courthouse or prison. Plus, then the code would only be one line, instead of two.
@jeisenbe I've updated (cleaned) icon file: https://gist.github.com/Tomasz-W/1acbd56a526463b3d38fcc82c8028551. Please try it now.
1) @Adamant36, thank you for the suggestion. I was having trouble understanding the current categorization. The lists of amenities in the project.mml file also appear to be almost randomly ordered.
2) I found out how to render from .osm files. This code can be used change the expected database file when you import the database with Docker, as suggested in the Docker.md file. So now I can download .osm files from the main openstreetmap.org page, or export files from the JOSM editor; very useful!
OSM2PGSQL_DATAFILE=file_name.osm \
docker-compose up import
3) @Tomasz-W, thank you! Here's what it looks like now:
Icon only; label is blocked by shop to the south, at z17
Internet Cafe icon and label, at z18
Second location, at z19
Third location, at z21
Should I do a PR, or do we need more test renderings first?
For me it's simple enough case that does not need more testing. Just make sure to show one example of node + label and second one of way + label - such two examples cover most of the problems the code of typical shop/amenity could have.
I also think that file_name.osm
might be simply renamed into .pbf
and it would be imported anyway, because osm2pgsql
does not check if the extension matches file format. :smile:
I didn't find many mapped as closed ways, but here is one in an underground mall in Stuttgart, Germany: https://www.openstreetmap.org/way/436919789
Rendering at z19:
Since this is quite popular amenity (it has 5090 uses now), which is not "cafe" (there is special key for real cafe and other objects, for which it's not a primary property -
internet_access
), I would add the icon like brown@
symbol, which is typical Internet-related sign.https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dinternet_cafe