Convert OSM to PNG
Turn OSM files into PNG. A picture of the map as PNG, 1024 pixels wide unless it would be taller than 4096, on white: polygons lightly filled and outlined, lines drawn and points as dots, each layer in its own color.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop OSM files on the dialor turn it to pick what to do
A picture of your map data on white.Shapes are drawn in their own colors, one color per layer, as a PNG.
What you get
One PNG that is 1024 pixels wide, unless that would make it taller than 4096. The background is white. Polygons are lightly filled and outlined, lines are drawn, and points are dots. Each layer has its own color.
Longitude and latitude are drawn in Web Mercator, as web maps show them. Other coordinates are drawn as they are. Shapes are simplified to half a pixel.
What is drawn
Tagged nodes become points. Ways become lines, or polygons when they are closed and tagged as areas. Route and multipolygon relations become multilines and multipolygons.
Common tags such as name, highway and building become columns. The other tags are kept as JSON in other_tags.
What is left out
The picture shows shapes only. Attributes, labels, the file's own styles and a base map are not drawn.
Untagged nodes, other relations, versions and authors are dropped.
If you need to change the picture afterward, you can resize PNG or compress PNG.
OSM and PNG.What each format is.
The formats
OpenStreetMap Data
OpenStreetMap nodes, ways and relations with their tags, as .osm XML or the smaller .osm.pbf.
- Extensions
- .osm .osm.pbf
- MIME type
- application
/vnd .openstreetmap .data +xml - Kind
- Text and data
PNG
Lossless raster images with an alpha channel. Screenshots, icons and graphics with sharp edges.
- Extensions
- .png
- MIME type
- image
/png - Kind
- Images
In your code.The same OSM to PNG conversion through the API, for your app or your agent.
$ cv convert report.osm report.png$ cv convert report.osm report.pngQuestions.What people ask about OSM to PNG.
No. The shapes are drawn on white, with no base map under them.
No. Labels and attributes are not drawn, only the shapes.
It is 1024 pixels wide, unless that would make it taller than 4096.
Yes. OSM covers both .osm XML and the smaller .osm.pbf.