Opened 16 years ago

Last modified 16 years ago

#2718 new enhancement

SVG output file size reduction

Reported by: PCJ Owned by: assefa
Priority: normal Milestone:
Component: Output-SVG Version: unspecified
Severity: normal Keywords:
Cc:

Description

The SVG output format support uses absolute positioning which creates significantly larger output files. In the interest of reducing bandwidth the polyine and polygon support should be changed to use relative positioning through the path SVG object (ie. use M as the poly anchor and subsequently l for relative move line-to operations). I've attached a modified file that does this.

Further improvements could be made, but I haven't look into it in detail, by using def embedded CSS styles into the SVG output so that common object attributes could be replaced with a single style reference. In that way much of the repeated content (ie. replace 'fill="none" stroke="#9326ff" stroke-width="1"' with 'style=blah') can be removed, once again reducing the SVG file size.

Paavo.

Attachments (1)

mapsvg.c (67.2 KB ) - added by PCJ 16 years ago.

Download all attachments as: .zip

Change History (2)

by PCJ, 16 years ago

Attachment: mapsvg.c added

comment:1 by sdlime, 16 years ago

Component: MapServer C LibraryOutput-SVG
Owner: changed from sdlime to assefa
Note: See TracTickets for help on using tickets.