Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Please support circularstring and other SQL-MM Part 3 datatypes #538

Closed
artemp opened this Issue Oct 11, 2011 · 3 comments

Comments

Projects
None yet
2 participants
Owner

artemp commented Oct 11, 2011

Items geometry types such as circularstring, curvepolygon, and compoundcurves have support in Postgres but I can not render them in mapnik.

If possible please support these geometry types. For more information:

http://postgis.refractions.net/documentation/manual-1.4/ch04.html#id2758657

I have attached a sample table/sql.

Owner

artemp commented Oct 11, 2011

[mar_rud] If #332 would be implemented with proposed universal bezier curves support (or at least bezier support alone), rendering arcs could be easily expressed as sequence of SEG_CURVETO as described in http://www.whizkidtech.redprince.net/bezier/circle/ .

Such approximation is very good for arcs less then PI/2, so for bigger ones, mapnik would need to divide to small enough. For worst case of PI/2 arc, maximum error is about 0.05% of arc radius (1m for 2km radius), using just PI/4 reduces error further more over 60x to 0.0008%. Calculating control points for given arc based on mentioned article should be quite simple.

Just an idea of easy implementation paths with circular arcs that could be passed to both agg and cairo renderer. In such way, this would be a matter of parsing new data types, and changing each CIRCULARSTRING segment to 4 CURVE_TO points of cubic bezier curve or dividing to smaller sub-arcs first.

Owner

artemp commented Oct 11, 2011

[Ldp] Workaround for now: ST_CurveToLine in your datasource.

http://postgis.refractions.net/documentation/manual-1.5/ST_CurveToLine.html

Owner

springmeyer commented Sep 6, 2014

patches would be accepted.

@springmeyer springmeyer closed this Sep 6, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment