W3C home > Mailing lists > Public > www-svg@w3.org > October 2009

coordinatePrecison attribute proposal

From: Klaus Förster <klaus.foerster@uibk.ac.at>
Date: Fri, 09 Oct 2009 12:01:47 +0200
Message-ID: <4ACF0A0B.8050806@uibk.ac.at>
To: www-svg WG <www-svg@w3.org>
Doug Sheppers asked me to send a proposal that I've made at the SVGOpen 
conference on this subject to the list - so here it is:

SVG code generated by Software often contains attributes, namespaces and 
the like that increase file-size, make code unreadable for human eyes 
and are in fact not needed when displayed on the web. Thus libraries 
like Scour [1] have started to clean up bloated code and even try to 
reduce precision of coordinates during this process. Due to the nature 
of SVG, precision requirements may change within a single file. A 
mapping user interface in pixel space gets along with integers just 
fine, whereas the included map in real-world lat/lon coordinates needs 
at least 3 to 7 decimal places to preserve geometry. Currently it is not 
possible to semantically distinguish between the two, so I propose a new 
attribute named "coordinatePrecision", "precision" or any other name, 
that allows to specify the desired number of decimal places for content 
of the following elements:

   - elements that establish viewPorts [2] - i.e. svg, symbol, image, 
   - marker, pattern and view elements [3]

If it is not possible or desirable to add such an attribute, I encourage 
the working group to consider other ways of giving hints to libraries on 
how to cope with this situation. Maybe using HTML5s custom data- 
attribute or any other way.

Klaus Förster

[1] http://www.codedread.com/scour/
[2] http://www.w3.org/TR/SVG/coords.html#ElementsThatEstablishViewports
[3] http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute
Received on Friday, 9 October 2009 10:00:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:19 UTC