Crazy XML extensions: GML, SVG, and VML

Source: Internet
Author: User

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 supports 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 geographic data distributed storage. The main technical tools are XLink and Xpointer.
From the introduction above, we can see 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.

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 described by algorithm instructions. All the description statements in SVG images built on text can be directly observed, therefore, it is very easy to perform secondary modification and update. The "updatable" features 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.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/cocpower/archive/2004/10/14/135927.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.