Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong coordinate transformation ? German lakes #168

Closed
filchristou opened this issue Apr 28, 2023 · 6 comments
Closed

wrong coordinate transformation ? German lakes #168

filchristou opened this issue Apr 28, 2023 · 6 comments

Comments

@filchristou
Copy link

Hi, the following figure is supposed to produce the map of germany with the lakes.

let
	geoger = GeoJSON.read(read(Downloads.download("https://raw.githubusercontent.com/isellsoap/deutschlandGeoJSON/main/2_bundeslaender/4_niedrig.geo.json"), String))
	lakes = GeoJSON.read(read(Downloads.download("https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_lakes_europe.geojson"), String))

	fig = Figure()
	ga = GeoAxis(fig[1, 1]; dest = "+proj=merc", lonlims=(11, 13), latlims = (30, 44))

	poly!(ga, geoger; strokewidth = 1, color=:gold, rasterize = 5)
	poly!(ga, lakes; strokewidth = 1, color=:blue, rasterize = 5,  xautolimits=false, yautolimits=false)
	datalims!(ga)

	fig
end

image

However lakes are not like that in Germany: https://www.stepmap.de/landkarte/seen-in-deutschland-kItU9UMxoG-i
image

Did I make a mistake somewhere, or is there a bug ?

@asinghvi17
Copy link
Member

There is a bug in the current implementation. That bug is, as I understand, that the aspect ratio of the scene is determined by the limits before the transformation (in lat/long space) and not after it. The big refactor for GeoMakie should fix all this...will see if there can be some kind of quick fix for this!

@asinghvi17
Copy link
Member

download-5
Latest version should fix this!

@filchristou
Copy link
Author

How is this fixed ? In the documentation it's also wrong. https://geo.makie.org/v0.7.2/examples/german_lakes

@asinghvi17
Copy link
Member

Ah, just to confirm - is the error in the actual lake positions or the aspect ratio? The lake positions are probably fixable by using a better dataset but the aspect ratio was the main bug IMO.

@filchristou
Copy link
Author

My main complain was the lake positioning. The dataset looks alright when github shows it
https://github.com/nvkelso/natural-earth-vector/blob/master/geojson/ne_10m_lakes_europe.geojson

So I figured it was an issue on the GeoMakie side.

@asinghvi17
Copy link
Member

Ah, the dataset you linked to is not the dataset used in the example (which is really weird on reflection, I should change that to NaturalEarth). Looking at the one from the example I have no idea what it's actually showing 😅.

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

No branches or pull requests

2 participants