Opened 3 years ago

Closed 16 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:

Description

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 3.1.23.1.3

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 https://www.web3d.org/x3d/content/examples/Basic/NURBS/, In particular for 2D the geometries would be expressed as Contour2D and Contour2DPolyine https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/nurbs.html#X3DParametricGeometryNode It's too bad we don't support 3D curves since Nurbs in X3d could handle those.

comment:8 by robe, 17 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, 16 months ago

Owner: changed from stefanpetrea to robe

comment:10 by robe, 16 months ago

Work in progress here - https://git.osgeo.org/gitea/robe/postgis/src/branch/svg-curve-support

at moment only supports CIRCULARSTRING

comment:11 by robe, 16 months ago

Now also supports COMPOUNDCURVE and MULTICURVE.

comment:12 by robe, 16 months ago

Milestone: PostGIS 3.5.0PostGIS 3.4.0

comment:13 by Regina Obe <lr@…>, 16 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
Closes https://git.osgeo.org/gitea/postgis/postgis/pulls/130

Note: See TracTickets for help on using tickets.