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

shapefile polygon labels can be located poorly #157

Open
kg4wsv opened this issue Aug 6, 2019 · 5 comments
Open

shapefile polygon labels can be located poorly #157

kg4wsv opened this issue Aug 6, 2019 · 5 comments

Comments

@kg4wsv
Copy link

kg4wsv commented Aug 6, 2019

Shapefile labels for polygons can appear nowhere near the object in question. The existing algorithm uses the center of the bounding box for the polygon. This results in, for example, the label for "United States" being placed over France due to Alaska being on the other side of xastir's world.

This is mentioned in the code (line 4362 of map_shp.c). I'm opening an issue because it will become more of an issue as more shape files are available and so there's a git issue associated with the problem.

@tvrusso
Copy link
Member

tvrusso commented Aug 6, 2019 via email

@kg4wsv
Copy link
Author

kg4wsv commented Aug 6, 2019 via email

@tvrusso
Copy link
Member

tvrusso commented Aug 6, 2019

BTW, it would be useful to know which shapefile you're working on that exposed this issue, so that if anyone wants to start working on it they can try to reproduce your issue and then try to make it look nice.

@tvrusso tvrusso added this to To do in Release 2.2.0 Aug 6, 2019
@tvrusso
Copy link
Member

tvrusso commented Aug 6, 2019

Related to issue #152 (trying to capture bug interdependencies)

@kg4wsv
Copy link
Author

kg4wsv commented Aug 6, 2019

Examples from Natural Earth data:

50m_physical/ne_50m_geography_marine_polys.shp - North Pacific Ocean example

50m_cultural/ne_50m_admin_0_countries - United States / France examples

@tvrusso tvrusso removed this from To do in Release 2.2.0 Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants