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

Labels placement for polygons are different for PostGIS and Shapefile datasources #2062

Closed
Andrey-VI opened this issue Nov 2, 2013 · 6 comments
Milestone

Comments

@Andrey-VI
Copy link

Same style

<TextSymbolizer size="10.0" fill="#5495ff" face-name="Open Sans Italic" halo-radius="1.0" halo-fill="#faf9f554" character-spacing="1.0" wrap-width="32">[FULLNAME]</TextSymbolizer>

same data (polygons). But in the first case data in Shapefile format, in second case — from PostGIS database.
And… very different label placements for most of polygons.
Shapefiles:
labels-shp

PostGIS:
labels-pgsql

If I add placement="interior" option in style with PostGIS datasouce I get this:
labels-pgsql-interior

Note that label with оз. Марья-Шелека text is still missing.

P. S.: I'm using Mapnik layer-opacity branch

@springmeyer
Copy link
Member

Please post test data.

@Andrey-VI
Copy link
Author

Hi Dane!
http://91.208.39.38/~andrey/tiles/temp/tc_labels.zip
Testcase with real data and style for zoom level 10 only.
Command for PostgreSQL:
createdb rumap_tc && pg_restore -d rumap_tc -Fc -O -x /path/to/folder/tc_labels/rumap_tc.dump

P. S.: I'm using mod_tile/renderd for rendering maps.

@springmeyer
Copy link
Member

Thanks, I will take a look on Monday. Can you also share which labels you think are correct and which you think are wrong? And also a nik2img.py command to replicate (with extent).

@Andrey-VI
Copy link
Author

Only labels generated from shapefiles looks correct for me.

About nik2img.py. I have no success with it (see mapnik/mapnik-support#4). Sorry.
Extent of the map: 3286000,9494000,3577000,9631000

@springmeyer
Copy link
Member

@Andrey-VI - thanks for the testcase: it was easy to replicate with. I quick see one workaround but to decide on the proper I need to share the testcase with @artemp so I reduced it down and created a new issue to directly clarify the bug at #2078.

In the process I also wrote up a guide to creating testcases: https://github.com/mapnik/mapnik/wiki/A-perfect-testcase. Yours was great, but could have been even better, so I wanted to get you thinking about this.

closing in favor or #2078.

@Andrey-VI
Copy link
Author

@springmeyer, thanks for the guide!

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