Create an SVG file of a Mercator projection of Europe knowing exact longitute and latitudevalues at the boundary extremes of the image

James Froggatt
James Froggatt used Ask the Experts™
on
I am wanting to create an SVG map of Europe - with country boundaries showing - this map must be made with a Mercator projection.

Importantly I need to know the  exact longtude on the far left side, and right side of the image, and the latitude at the bottom of the map.

I have been playing around with openstreetmap.org but just can't seem to get any sensible export running that will export the area of the map that I select in the bounding box.

The whole 'mapping' thing seems to go very deep, and I've ended up looking at python scripts and all sorts.

Is there a simple and preferably free workflow to do this. I am simply wanting to end up with something  akin to the attached image (credit to openstreetmap)
ee1: approximate area I'm interested in (Europe)but where I know the exact longtitudes and latitudes as described above.

The level of detail I need in my final SVG file is as shown below:
ee2: detail level of map
I am aware I could use a screen capture to grab the area in the bounding box on openstreetmap, but that image would not be exact to the longitude and latitide measurements that I need.

A link from openstreetmap leads me to https://planet.openstreetmap.org/ - where it appears I can download an XML file or PBP file (presumably of the whole world) but I honestly have no idea what software to use to 'crop out' Europe by exact latitude and longitute coordinates.

Please help,
Thank you
James
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
The only way to do this as far as I know is to use mapping software.

https://www.esri.com/en-us/arcgis/products/arcgis-pro/overview  (I think the personal use is about $100 per year).  MapInfo is what I used to use https://www.pitneybowes.com/us/location-intelligence/geographic-information-systems/mapinfo-pro.html.

Those prices do not include data. You should be able to find open source shape files.  

At least from what I remember from mapinfo, you can draw a rectangle (or any shape) as a layer similar to a layer in photoshop where you give the exact lat/lon for each point or draw by hand and and extract the points.  From there you can crop your map to the exact specs you want.

There are going to be some open source gis mapping tools. I have not used them but a quick search found https://qgis.org/en/site/about/index.html and that looks promising.

Author

Commented:
Scott,

I'm not sure (yet) whether that is the solution.

I'll check out that last link you said (as that does look good, and free). When you mention a 'shape' file - is that a  PBF as available for download on https://planet.openstreetmap.org/, or is it the XML file? ... or is the 'shape' file something completely different?

Thank you James
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
You should be able to creat an svg file. I know I could with mapinfo.

Shape files are polygons with gis data. They are typically countries, states, counties, postal codes etc. Roads like those from open street map are line files.

When you creat a map, it is actually multiple layers of shape files, lines and places. Map software allows you to querry spatially and find all shapes, lines places within a boundary you select.

The files used from one software package to another can't be interchanged easily other than exporting as.... then importing.

Arcview is the standard that most municipalities use.

Some shape files can get exported and imported as xml. Think of a rectangle as simply 4 points. After an import, the map software will create a shape from those points that can be used for spatial calculation.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Author

Commented:
Thanks Scott. I'm just downloading this software and other files to see what I can get working. They're big files, so I'll leave this thread 'open' for the moment to see what I can do... I'll be back shortly. Thank you

Author

Commented:
... still working on this, please hold...
I've simply had to give up on this. I've been through adventures with OSMConvert, OSMFilter with the OpenStreetMap dataset and simply can't get it down to country boundaries. For my purposes I've used an SVG Worldmap that I've managed to superimpose over a Mercator Image of the world. Using Inkscape I've then cropped out the SVG Worldmap to the Mercator image. I hope it's OK if I close this question now.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial