Comparison of GML, SVG, and VML
GML, SVG, and VML are both Markup languages based on XML that can be used to describe vector graphics. They are both XML word lists and their syntax is not hard to understand, but they all have their own purposes and features, the following is a brief introduction.
GML (Geography Markup Language)
It is an XML-based spatial information encoding standard proposed by OpenGIS Consortium (OGC) and has received strong support from many companies, such as Oracle, galdos, Mapinfo, and cubewerx. Using GML, the encapsulated geographic data and graphic interpretation are clearly separated.
GML uses text to represent Geographical Information Based on XML
As GML can be seen as a specific word table of XML, it is easier to understand GML when you are familiar with XML. In addition, as XML is widely used, GML will also benefit. In addition, the text is simple, intuitive, and easy to understand and edit.
GML encapsulates geographical information and Its Attributes
Based on the Geographic Information Abstraction model, GML encapsulates spatial entity features and attributes. Geographical features include a series of attributes and corresponding geometric information. Generally, attributes consist of names, types, and values. geometric information consists of basic elements such as points, lines, surfaces, curves, and polygon. At present, GML is mainly confined to two-dimensional applications and is being expanded to two-dimensional semi-and three-dimensional spaces as well as the topological relationship between features. GML allows quite complex features, such as nesting between features. For example, an airport consists of taxi routes and aircraft runways.
GML encapsulates the spatial geographic reference system
Spatial geographic reference system is the basis for processing geographic information system data. GML encapsulates spatial geographic reference systems and main projection relationships to ensure the scalability and flexibility of distributed processing.
GML can achieve distributed storage of geographic data
GML is a very convenient technical means for geographic data distribution, but its role is not limited to this, it can also become an important means of distributed storage of geographic data. The main technical tools are xlink and xpointer.
the introduction above shows some advantages of GML as a metalanguage that describes spatial information. It can only describe the Vector Information and attributes of spatial entities. Two different ways can be used for specific display:
l gml draw à display
l gml transform à SVG, VML drawà display
the first method requires you to directly operate on the GML data for analysis and display.
the second approach is to convert the GML data into corresponding graph format data, such as SVG, VML, and X3D. It is then displayed by an existing software that supports these graphic formats. The following describes SVG and VML.
VML (Vector Markup Language)
Is an XML Vocabulary originally developed by Microsoft. Currently, only ie5.0 and later versions support VML. You can use VML to draw vector images in IE. Therefore, some people think that VML implements the paint brush function in IE. The following describes the advantages of VML:
Based on XML standards
XML is recognized as a next-generation network markup language with infinite vitality. VML has inherent advantages in simple representation and is easy to expand.
Supports high-quality vector graphics display
VML supports a wide range of vector graphics features, which are based on the path described by connected straight lines and curves. Use two basic elements in VML: Shape and group. These two elements define the full structure of VML. Shape describes a vector graphic element, and group is used to combine these images so that they can be processed as a whole.
The VML Specification includes a large number of elements that support different vector graphics features. The following are the predefined graphic elements of VML:
L shape
L path
L line
L polyline
L Curve
L rect
L roundrect
L oval
L arc
L group
An image composed of text and can be integrated into HTML
Because VML uses simple text to represent an image, very few bytes can be used to represent a complex image. VML is compatible with HTML. By declaring the VML namespace and processing functions in HTML, you can use VML elements like other HTML elements to display images in the browser on the client. Most DHTML attributes and events can be defined in VML tags, such as ID, name, title, and onmouseover.
Supports interaction and animation
However, the VML function is not only a drawing, but also can embed text in the drawing, implement hyperlinks, and implement certain animation functions through the script language. VML Appreciation
SVG (Scalable Vector Graphics)
SVG is an open vector graphics Description Language Based on XML. SVG images are compatible with xml1.0. SVG elements are instructions for drawing images. The viewer interprets these instructions to display SVG images on specified devices. SVG allows you to display a variety of high-quality vector images on the web page. It supports many functions you can imagine: ry, animation, gradient, filter effect, and so on. The most important thing is that it is completely described in plain text! That is to say, this is a text-based image format specially designed for the network.
SVG is a combination of pgml and VML, so the advantages of VML become the advantages of SVG, such:
Based on XML standards
High-quality vector Images
Text-based images
We can use NotePad to generate an SVG image without any image processing tools. This may be incredible for image processing workers. In fact, if you think about it, you can understand that vector images are generally Algorithm Command to describe, all the description statements in the SVG Image Based on the text can be directly observed, so it is very easy to perform secondary modification and update, the features of "upgradable" can be properly reflected here.
In addition, SVG has some advantages over VML:
Flexible file formats
The scalable feature of SVG is not only manifested in secondary modification, but also in many other aspects, including the flexible file formats described here. In previous images, the text is saved as a bitmap. After the image is formed, the text cannot be modified separately. In PNG format, this is improved, text can be used as an independent layer. SVG extends the file format of an image more flexibly. It consists of three parts: vector graphics, bitmaps, and text. In this way, SVG can not only apply vector images and text objects, but also be incorporated into bitmaps to produce the effects that can be achieved by images in any other format. Because the file format is in text format, it can be easily modified at any time in the future. In addition, many parts can be instantly modified during page running, and the graphic description can be reused.
Supports interaction and animation
SVG supports SMIL (Synchronized Multimedia Integration Language), so that you can freely perform some interactive actions with the elements in SVG to achieve the set goal, at present, this cannot be achieved by relying solely on images. It must be implemented by script statements on the webpage.
Supports character search
Search for characters in "image" and make it possible in SVG. This is not possible in image files of other formats.
Supports xlink and xpointer
In this way, you can create a hyperlink between SVG documents.
As the image format officially recommended by W3C, SVG has many support organizations. Adobe has announced that it will integrate all SVG functions into its new Adobe Image Processing kits, such as Illustrator, Photoshop, golive, and cyber studio, as well as plug-ins for Netscape and IE, so that it can directly support the browsing of SVG files. Netscape and Microsoft have also begun to enter the SVG field, which indicates that in the future, Web browsers will have built-in support for SVG files.
Summary
GML, SVG, and VML are closely related to vector graphics: While GML represents the spatial information of an object, it adds other attributes of the object, is the encoding standard that represents the space information and attributes of an object, but it does not support direct display of graphics. VML and SVG Add the graphic display information (that is, the style used to display the vector image) when expressing the vector information of the image. They are two better formats for displaying the vector image. In contrast, SVG is developed based on the advantages of VML and is an international standard. It has more advantages than VML and has a broader prospect. However, because VML supports IE, and SVG needs to install a plug-in to display it in a browser, VML is better than SVG.