Opened 3 years ago

Closed 11 months ago

#4913 closed enhancement (fixed)

Add curve support to ST_AsSVG

Reported by: mdavis Owned by: robe
Priority: medium Milestone: PostGIS 3.4.0
Component: postgis Version: master
Keywords: Cc:


It should be straightforward to enhance ST_AsSVG to support curved geometries (i.e. CircularString, CompoundCurve, CurvePolygon, MultiCurve, MultiSurface). This will provide a PosstGIS-native way to visualize curved geometry, which is not widely supported by other tools.

This can be done easily using SVG elliptical arcs.

Change History (13)

comment:1 by stefanpetrea, 3 years ago

Owner: changed from pramsey to stefanpetrea

comment:2 by pramsey, 3 years ago

Milestone: PostGIS

comment:3 by pramsey, 3 years ago

Milestone: 3.1.3PostGIS 3.1.3

Milestone renamed

comment:4 by robe, 3 years ago

Milestone: PostGIS 3.1.3PostGIS 3.1.4

In prep for 3.1.3 release

comment:5 by pramsey, 3 years ago

Milestone: PostGIS 3.1.4PostGIS 3.3.0
Version: 2.5.xmaster

comment:6 by pramsey, 2 years ago

Milestone: PostGIS 3.3.0PostGIS Fund Me

comment:7 by robe, 2 years ago

Speaking of which I have this as a TODO for X3D as well #1416. I think it would be implemented in X3d using nurbs, In particular for 2D the geometries would be expressed as Contour2D and Contour2DPolyine It's too bad we don't support 3D curves since Nurbs in X3d could handle those.

comment:8 by robe, 11 months ago

Milestone: PostGIS Fund MePostGIS 3.5.0

Was looking at this while I was looking at my X3D adding curves. I think adding curves to SVG should be much easier than my X3d, so I'll take a stab at this.

I'll push to 3.5.0 for now, and if I get to it before then will push back to 3.4.0

comment:9 by robe, 11 months ago

Owner: changed from stefanpetrea to robe

comment:10 by robe, 11 months ago

Work in progress here -

at moment only supports CIRCULARSTRING

comment:11 by robe, 11 months ago


comment:12 by robe, 11 months ago

Milestone: PostGIS 3.5.0PostGIS 3.4.0

comment:13 by Regina Obe <lr@…>, 11 months ago

Resolution: fixed
Status: newclosed

In 39c69beb/git:

ST_AsSVG support for curves

  • Support circularstring, compoundcurve, multicurve, curvepolygon, multisurface in svg (absolute)
  • Relative work in progress
  • Update cu_out_svg.c moving curve examples from unsupported to test mode
  • Update docs to reflect curves now supported

Closes #4913

Note: See TracTickets for help on using tickets.