-
Notifications
You must be signed in to change notification settings - Fork 4
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
Repeating/duplicate state label points #4
Comments
Currently: state_label_points from ne_10m_admin_1_label_points; zoom 4-10, filter scalerank == 2 Fix: use ne_10m_admin_1_label_points_details instead. It contains just one point per state. |
The url for the dataset mentioned above 404s. |
Selecting for adm0_sr = 1 from ne_10m_admin_1_points is the solution. Requires adding adm0_sr to tegola.toml sql as this field isn't currently used. |
See more on the above issue at |
clhenrick's solution in above mentioned thread works beautifully in tegola: Using the following in the config.toml [[providers.layers]] |
And, using the 10m table to add in all the states worldwide and the tegola zoom token, the optimal sql seems to be: sql = "SELECT DISTINCT ON (name) name, admin, scalerank, ST_AsBinary(ST_PointOnSurface(wkb_geometry)) AS geometry, ogc_fid, name, admin, scalerank, min_label, max_label FROM ne_10m_admin_1_states_provinces WHERE (min_label - 1) <= !ZOOM! AND wkb_geometry && !BBOX!" |
In summary, we're deleting the old state labels, which had a lot of duplicates showing up at the same time and were based on the table containing admin 1 labels and instead using a custom sql query on a new table that we'll add to the database containing admin 1 polys converted via sql to distinct points. We're keeping the same final name for the output layer ("state_label_points") so that the styles that use that layer won't break, though they may need to be tweaked once the change goes through since they are based on scalerank=2, which will probably no longer be a needed constraint. |
No description provided.
The text was updated successfully, but these errors were encountered: