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

Fix Antarctica landcover #342

Merged
merged 3 commits into from
Jan 5, 2025
Merged

Fix Antarctica landcover #342

merged 3 commits into from
Jan 5, 2025

Conversation

wipfli
Copy link
Collaborator

@wipfli wipfli commented Jan 4, 2025

@nvkelso
Copy link
Collaborator

nvkelso commented Jan 4, 2025

Bonus points if you also fix up northern Greenland, north of around 82.8° N, the other common area people complain about:

image

@@ -29,6 +30,19 @@ public void processNe(SourceFeature sf, FeatureCollector features) {
} else if (sourceLayer.equals("ne_10m_land")) {
features.polygon(this.name()).setZoomRange(5, 5).setBufferPixels(8).setAttr("kind", "earth");
}
if (sourceLayer.equals("ne_10m_glaciated_areas")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section deserves a comment explaining the problem and why this particular solution works

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one, thanks for the tip!

if (sourceLayer.equals("ne_10m_glaciated_areas")) {
try {
Point centroid = (Point) sf.centroid();
if (centroid.getY() > 0.7) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but it's confusing this isn't a negative number, and 70 would normally not result in the northern tip of Chilean Antarctica (many international bases there) showing up correctly as ice.

Please add a comment explaining that you're targeting ice features in Antarctica south of -60°.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Web Mercator Y in Planetiler goes from 0 to 1 from 85 deg N to 85 deg S. The equator is at Web Mercator Y = 0.5

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the comment

Copy link
Collaborator

@nvkelso nvkelso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits about comments and request to also fix northern Greenland.

@wipfli
Copy link
Collaborator Author

wipfli commented Jan 4, 2025

I tried Greenland with something like y > 0.7 || y < 0.3 but it did not have a big effect. Most of these areas close to the water that are green are not covered by glacieated NE areas.

Copy link

sonarqubecloud bot commented Jan 4, 2025

@nvkelso
Copy link
Collaborator

nvkelso commented Jan 5, 2025

Comments look good!

For Greenland, make a fake rectangle of glacier in just that area? That would look better than the grey. But a nit, can merge this as-is.

@bdon bdon merged commit 1e4a4d7 into protomaps:main Jan 5, 2025
5 checks passed
@wipfli wipfli deleted the fix-antarctica branch January 5, 2025 16:42
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.

Antarctica Landcover does not extend to bottom of earth
3 participants