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

carto views for labelling multipart features #111

Open
smnorris opened this issue Jul 7, 2022 · 1 comment
Open

carto views for labelling multipart features #111

smnorris opened this issue Jul 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@smnorris
Copy link
Owner

smnorris commented Jul 7, 2022

Unless I'm missing something in the QGIS labelling interface, it doesn't have the greatest polygon label de-duplicator, labelling island and lake groups can be awkward.
Views holding the island/lake group name and the centroid of the geoms for features could help this.

@smnorris smnorris added the enhancement New feature or request label Jul 7, 2022
@smnorris
Copy link
Owner Author

smnorris commented Jul 7, 2022

Something vaguely like this, but as a view and ensuring that it is easy to distinguish and separate the primary/secondary names.

select 
  row_number() over() as id,
  n_islands,
  gnis_name_1,
  geom::geometry(multipolygon, 3005)
from 
( 
  select 
     count(*) as n_islands, 
    gnis_name_1, 
    gnis_id_1, 
    st_multi(st_union(geom)) as geom
from whse_basemapping.fwa_islands_poly
group by gnis_name_1, gnis_id_1) as f;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant