0

I am using QGIS Version 3.16.4-Hannover and Windows 10 but I also tested on Linux Mint 20.

I have a problem with several imported shapefiles from different sources. I do not know if I do something wrong or if it is simply not possible.

I wanted to add vector data from other sources to an existing QGIS-project that bases on a OpenStreetMap-XYZ-Layer (https://tile.openstreetmap.org/{z}/{x}/{y}.png). My project CRS is EPSG:3857 (WGS 84 / Pseudo-Mercator).

You can reproduce the problem by copying this sample of vector files from Euratlas: https://www.euratlas.net/tele/1700_vector_data_sample.zip

The file includes shape-files covering Switzerland/Savoy.

  1. I added, for example, seas.shp (from the above mentioned ZIP) to my project. The file's CRS is strangely recognized as "ESRI:54004 - World_Mercator". After importing, the layer is misaligned, its offset is about 4 kilometres to north-east. See screenshot, blue layer.

  2. I tried to correct this by manually switching the layers CRS to EPSG:3857. In result, the misalignment grew! Now, the layer's offset is about 20 kilometres to south-east. See screenshot, orange layer.

Here's the original seas.prj:

PROJCS["World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",0],UNIT["Meter",1]]

What am I doing wrong?

Is there any way to get the vector layer aligned to my project in EPSG:3857, thus to the OpenStreetMap-Layer?

Or do I misunderstand something important?

Is it simply not possible?

If so, could you explain why?

Screenshot showing misalignment: ESRI:54004 in blue, EPSG:3857 in orange

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Alrik
  • 121
  • 5
  • Have you loaded the layer in a new project and added the basemap later? If so, what happens? – Erik Mar 18 '21 at 07:56
  • Thanks for you quick reply!

    I openened a new project, added seas.shp to the empty project. QGIS recognized "ESRI:54004 - World_Mercator". Then I added the OSM-basemap.

    The effect is identical to the blue layer in my screenshot above.

    Actually, the offset mentioned above (3 km to the north) fits to the Lake Zurich area. In other parts of the map, the offset is differing. I fear this is complicating the problem...

    – Alrik Mar 18 '21 at 08:32
  • QGIS should automatically allign the layer if the correct CRS is recognized - what seems to be the case. Check if there are any metadata explaining which CRS was used to create the data. Maybe the problem simply is that the data itself is not as exactly located? You could also try downloading other data, e.g. from https://www.naturalearthdata.com/ or OpenStreetMap – Babel Mar 18 '21 at 08:33
  • I loaded the data and had the same problem. But in itself, the data is consistent: lakes, rivers and mountains layer allign correctly, but all together have this offset to the basemap. Could it be that the data was originally created by a graphic software and only later converted to a GIS vector format? By the way, the lakes in northern Italy allign quite well. – Babel Mar 18 '21 at 08:38
  • 4
    The Metadata pdf says: "The spatial reference system for all layers is the world Mercator projection of World Geodetic System (WGS84). This reference system corresponds to ESRI WKID 54004. It is also mathematically equivalent to SRID 3395 defined by the European Petroleum Survey Group (EPSG)." Changig to CRS 3395 does not solve the problem. So I strongly assume that the data itself is unprecise. The shape of the lakes are also heavily generalized and the data set is intended for a use on a continental (european) level. Precise enough for the intended use, but not for you, unfortunately :-( – Babel Mar 18 '21 at 08:43
  • The webmap of the project uses another dataset for the lakes that is better alligned: https://hpolities.euratlas.net - that another dataset was used can be recognized from the shape that is different from the one you can load from the site. – Babel Mar 18 '21 at 08:47
  • Again, thanks for the quick response. I misunderstood the statement in the Metadata PDF. I assumed that "This reference system corresponds to ESRI WKID 54004" means that it could in principle be aligned to the XYZ-tiles. But I'm not a geographer... – Alrik Mar 18 '21 at 08:50
  • Thanks, Babel. Actually, I had a look at the Euratlas webmap before I downloaded the sampla data. I simply assumed, the quality of the downloadable shapefiles would correspond to the webmap. And then, I wondered it did not work in QGIS. – Alrik Mar 18 '21 at 08:55
  • Worldwide CRS tend to be inaccurate. With the shift changing across the map canvas, this seems to be an issue of incompatible CRS. – Erik Mar 18 '21 at 09:33
  • @Alrik: Euratlas offers commercial downloads of their data, so I guess to get more accurate data, you should buy them. But at least for lakes, rivers etc. there are free alternatives (as mentioned in an earlier comment). By the way: since March 1st Swisstopo offers most of it's data as Open Government Data, thus free to use: https://www.swisstopo.admin.ch/en/swisstopo/free-geodata.html – Babel Mar 18 '21 at 14:51
  • @Babel: For sure, I am interested in Euratlas's historical borders - not in their lakes. To test their data, the layer with the lakes seemed to be a good choice (easier than discussing the problems of political borders in the early modern era). I already emailed Euratlas if their (very expensive) commercial data is more accurate resp. better aligned. – Alrik Mar 19 '21 at 09:47
  • Great, would be interesting to hear the answer. – Babel Mar 19 '21 at 09:50
  • By the way: see https://github.com/interactivethings/historical-world-atlas – Babel Mar 19 '21 at 21:07
  • Thanks, I didn't know Weidmann's site!

    Any chance you know a database for detailed Holy Roman Empire and German Confederation borders, mid-15th to mid-19th century?

    – Alrik Mar 19 '21 at 21:56
  • @Babel: On your link to the archived GIS-data 2000 BC to AD 1994: Did you manage to align the shapefiles to OSM (EPSG:3857)? If so, which settings do you use? – Alrik Mar 21 '21 at 11:41
  • I downloaded a sample shapefile and it seems that the CRS is not correctly recognized. Manually set the CRS of the layer (right click / layer CRS / set layer CRS) to EPSG:4326, see screenshot: https://i.stack.imgur.com/cIAaR.png (the project CRS is in 3857 to fit the OpenStreetMap basemap in the background) - this is one of the relatively rare cases where setting ("changing") the layer CRS makes sense, see here for details: https://gis.stackexchange.com/a/383437/88814 – Babel Mar 21 '21 at 11:53
  • 1
    For your other question about alternative data sources see https://opendata.stackexchange.com/questions/13428/administrative-boundaries-for-historical-political-entities - it would be great to add new sources there if you find some – Babel Mar 21 '21 at 12:00
  • Another - cumbersome - approach is getting historical maps, georeference them and digitize the shapes yourself (and share it as open data) - and finally: a professional source, but for the 19th century only, is this site: https://mapire.eu/ – Babel Mar 21 '21 at 12:03
  • On your example (cntry1530.shp): It roughly works. However, there is a misalignment at the German North Sea coastline of about 10 kilometres to South East, and in Sicily of about 20 kilometres to East. But this seems to be inherent to the data (compare the Euratlas data). – Alrik Mar 21 '21 at 12:13
  • Evaluating the available sources, it seems I'll have to georeference and vectorize maps from historical atlases myself. I hoped to avoid this diligent work. If I'll really do it, I will share it as open data. – Alrik Mar 21 '21 at 12:18
  • Indeed, high-quality geodata on historical topics for professional use is still extremely rare: for standard GIS-users, history is a niche topic and for historians, GIS is a niche topic as well: so the number of people interested in that is relatively low (compared to users of datasets covering current phenomens). But continue to look around, maybe somewhere there is some data you could use. I would look around who published papers on such GIS-related topics for your period of interest and maybe contact there people directly, they might know more – Babel Mar 21 '21 at 12:21
  • 1
    To add to your (IMHO correct) assessments: It's very hard to get funding for such projects, which are basically fundamental research in historiography/geography. They take forever or need extensive manpower - and, in the end, the detailed results are only useful for very few people. And you can't even argue that such a project is very innovative... Therefore, the most important funders of academic research back off. – Alrik Mar 21 '21 at 14:02

0 Answers0