Scalable Vector Graphics (SVG) is a language for representing two-dimensional graphics. Diffenent from other vector format such as Flash, SVG was developed by the World Wide Web Consortium (W3C) to be the open standard format. Based on XML, SVG seamlessly integrates with XHTML, which is the future web language. It is supposed to be a major graphics format on the web application in the future. Nowadays, people rely increasingly on search engine for information searching, including picture and figure query. The paper publishes a research on SVG resources query technology. We hope the research could be a useful contribution for promoting the application of SVG.For vector graphics such as SVG, there are two types of query processing: one is text-based processing; the other is graphics-based processing. The former is implemented by creating index for the label text of image, and then the users can input keywords to search. The latter is implemented by comparing the inputted sample image to each image in database, and then returns the most similar results. The former could be easily implemented on the base of traditional query processing, but the latter needs similarity measures and algorithms for shapes, which are the focuses of this paper.On similarity calculation of SVG or other vector graphics, there have been several good basic approaches, which decompose a SVG image into a set of basic graphics, and then calculate separately the shape similarity, color similarity, spatial similarity and position similarity for these basic graphics, and finally produce a total similarity. Unfortunately, on the calculation of shape similarity for the six basic SVG shapes (circle, ellipse, rect, line, poly-line and polygon) with the complex coordinate transformation, there are no specific algorithm, which is the key point of the graphics similarity calculation. We consider fully the geometric features of the six basic SVG shapes with coordinate transformation, and design a group of shape similarity calculation formulas, and then we use Hausdorff distance for comparing the edge contours between different types of shapes. Besides, we use vector outer product to calculate the spatial similarity. These are our main contribution to the SVG similarity calculation.Based on the algorithms above, we implemented a prototype system, including text-based query interface and graphics-based query interface, and introduced a progressive transmission scheme for showing the query results. Finally, we show a group of experiments to verify the proposed query processing methods, and compare the performance of the two types of processing approaches as well as their respective advantages. |