Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugs have been fixed in mapnik, fixup docs accordingly

  • Loading branch information...
commit 83e7e27b53c533fb03a331987fc8153e97fe4125 1 parent dcc700e
@springmeyer authored
Showing with 15 additions and 11 deletions.
  1. +1 −8 README.md
  2. +14 −0 load_geogs.sql
  3. +0 −3  postgis.xml
View
9 README.md
@@ -74,15 +74,8 @@ Then render the map out:
point geometry - draws point no matter the value of placement
## Caveats
-
-* The mapnik postgis plugin accepts an option called `multiple_geometries`, which if true
- (default is false) triggers flattening of multigeometries into single paths during
- wkb parsing. This is needed for various renderers in mapnik to cope better with multi-geometries.
- For example, without it MarkersSymbolizer will only draw the first polygon and mapnik's centroid
- algorithm will produce bogus results for multipolygon labels.
-* TextSymbolizer - labeling centroids of multipolygons does not work properly
-* MarkersSymbolizer on multipolygons only draws first point unless geometries are flattened
+* TextSymbolizer - only the first placeable label for a geometry part will currently show up (https://github.com/mapnik/mapnik/issues/162)
Bugs around multigeometry support are tracked via:
View
14 load_geogs.sql
@@ -0,0 +1,14 @@
+/*
+http://en.wikipedia.org/wiki/Well-known_text
+*/
+
+create table test(gid serial PRIMARY KEY, geom geometry, geog geography);
+
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;POINT(0 0)'),ST_GeographyFromText('SRID=4326;POINT(0 0)'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;POINT(-2 2)'),ST_GeographyFromText('SRID=4326;POINT(-2 2)'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;MULTIPOINT(2 1,1 2)'),ST_GeographyFromText('SRID=4326;MULTIPOINT(2 1,1 2)'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;LINESTRING(0 0,1 1,1 2)'),ST_GeographyFromText('SRID=4326;LINESTRING(0 0,1 1,1 2)'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;MULTILINESTRING((1 0,0 1,3 2),(3 2,5 4))'),ST_GeographyFromText('SRID=4326;MULTILINESTRING((1 0,0 1,3 2),(3 2,5 4))'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1))'),ST_GeographyFromText('SRID=4326;POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1))'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;MULTIPOLYGON(((1 1,3 1,3 3,1 3,1 1),(1 1,2 1,2 2,1 2,1 1)), ((-1 -1,-1 -2,-2 -2,-2 -1,-1 -1)))'),ST_GeographyFromText('SRID=4326;MULTIPOLYGON(((1 1,3 1,3 3,1 3,1 1),(1 1,2 1,2 2,1 2,1 1)), ((-1 -1,-1 -2,-2 -2,-2 -1,-1 -1)))'));
+INSERT INTO test(geom,geog) values (GeomFromEWKT('SRID=4326;GEOMETRYCOLLECTION(POLYGON((1 1, 2 1, 2 2, 1 2,1 1)),POINT(2 3),LINESTRING(2 3,3 4))'),ST_GeographyFromText('SRID=4326;GEOMETRYCOLLECTION(POLYGON((1 1, 2 1, 2 2, 1 2,1 1)),POINT(2 3),LINESTRING(2 3,3 4))'));
View
3  postgis.xml
@@ -103,9 +103,6 @@
<StyleName>multilinestring</StyleName>
<StyleName>polygon</StyleName>
-<!-- these are buggy in mapnik unless multiple_geometries=true
-see: https://github.com/mapnik/mapnik/issues?sort=created&labels=multigeom+robustness&direction=desc&state=open
--->
<StyleName>point-multipolygon</StyleName>
<StyleName>multipoint</StyleName>
Please sign in to comment.
Something went wrong with that request. Please try again.