Skip to content

Conversation

@Strubbl
Copy link

@Strubbl Strubbl commented Mar 26, 2024

i used this Dockerfile in order to checkout if running a bot for Germany makes sense. It does not. :D

@watmildon
Copy link
Owner

Ha. I'm somewhat unsurprised. Germany does have a lot of great coverage. You could probably use the same idea (X features implies there should be Y feature we don't see) to uncover other things to do. My favorite of this type is "show all bus stops that aren't near mapped footways/sidewalks". Here's an overpass query I like to use for that:

[timeout:120];
(
  nwr[highway=bus_stop]({{bbox}});
)->.busStop;

way[highway~"^(footway|path)$"](around.busStop:50)->.paths;
nwr.busStop(around.paths:50)->.busStopNearPaths;

way[highway=cycleway]["foot"~"^(designated|yes)$"](around.busStop:50)->.cycleways;
nwr.busStop(around.cycleways:50)->.busStopNearCycleways;

way[sidewalk~"^(left|right|both)$"](around.busStop:50)->.sidewalkTagged;
nwr.busStop(around.sidewalkTagged:50)->.busStopSidewalkTagged;

(((.busStop; - .busStopNearPaths;); - .busStopNearCycleways;); - .busStopSidewalkTagged;);

out body;
>;
out skel qt;

@Strubbl
Copy link
Author

Strubbl commented Mar 26, 2024

There is a limitation. The image generation does not work with the Docker image. I get the following error:

Begin image generation
System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
   at System.Drawing.Image.FromStream(Stream stream)
   at SmallCityMastodonBot.Program.GenerateImageFromOSMTiles(HttpClient httpClient, Int32 zoom, Double lat, Double lon, String outputFilePath) in /app/SmallCityMastodonBot/Program.cs:line 263
   at SmallCityMastodonBot.Program.GeneratePost(String apiToken, StreamWriter logger, Botinfo bot, HttpClient httpClient) in /app/SmallCityMastodonBot/Program.cs:line 194
   at SmallCityMastodonBot.Program.Main(String[] args) in /app/SmallCityMastodonBot/Program.cs:line 67

@watmildon
Copy link
Owner

Yeah that library only runs against Windows. https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants