Comparison of GML, SVG, VML

zhaozj2021-02-08  228

Both GML, SVG and VML are XML-based tag language that describes vector graphics, all XML word layouts, their syntax is not difficult to understand, but they have their own different uses and characteristics, which are briefly introduced.

GML (Geography Markup Language)

It is based on XML-based spatial information coding standard, which is proposed by OpenGIS Consortium (OGC), and has been supported by many companies such as Oracle, Galdos, MapInfo, Cubewerx, etc. The geographic data and graphical interpretation of the encapsulation is clearly separated by GML.

GML is based on XML text to express geographic information

Since GML can be seen as a specific word meter of XML, familiar with XML is more likely to understand GML. And as XML is widely used, GML will benefit. In addition, the text is relatively simple, intuitive, easy to understand and edit.

GML encapsulates geographic information and its properties

GML is based on geographic information abstract model, namely space entity features and attribute packages. Geographic features include a series of attributes and corresponding geometries, which generally consists of names, types, and values, and geometric information consists of basic elements such as points, lines, faces, curves, polygons. At present, GML is primarily limited to two-dimensional applications, which is extended to two-dimensional and three-dimensional space and topological relationships between characteristics. GML allows quite complicated features, such as nested rooms. For example, the airport is composed of taxi roads, aircraft runways, etc.

GML encapsulated spatial geographic reference system

The spatial geographic reference system is the basis for the data processing of geographic information system. GML encapsulates the spatial geographic reference system, the main projection relationship, etc., ensures distributed processing scalability and flexibility.

GML can realize distributed storage of geodatabase

GML is a very convenient technical means for the distribution of geographic data, but its role is more than limited, and it can also become an important means of geographic data distributed storage. The main technical tools are XLINK and XPOINTER.

The introduction from the top can see some advantages of the GML as a meta-language that describes spatial information. It can only describe the vector information and attributes of the space entity, and there are two different ways when specifically displayed:

l GML DRAWà Display

L GML Transform à SVG, VML Draw àdisplay

The first pathway requires direct operation of GML data to analyze and display.

The second pathway is to convert GML data into data in the corresponding graphics format, such as SVG, VML, and X3D. Then it is displayed by software that already exists in these graphics formats. Let's introduce SVG and VML.

VML (Vector Markup Language)

It is an XML word schedule initially developed by Microsoft, and now only IE5.0 or higher version is supported by VML. With VML, you can draw vector graphics in IE, so some people think that VML is the functionality of the brush in IE. Let's introduce the advantages of VML:

XML standard

XML is a recognized next-generation network markup language with infinite vitality, and VML has innate advantages. Its representation is simple, easy to expand, and more.

Support high quality vector graphic display

VML supports a wide range of vector graphics features, which are based on a straight line and curve description path. Two basic elements are used in VML: Shape and Group. These two elements define all the structures of the VML; Shape describes a vector graphical element, and groups are used to combine these graphics so they can be processed as a whole.

The VML specification includes a large number of elements that support multiple different vector graphic features. Below is a predefined graphical element of VML:

l shape

l path

l line

l polyline

l curve

l Rect

l RoundRect

l oval

l arc

l group

The image consisting of text and can be integrated into HTML Since the VML uses a simple text to represent an image, it can be used to indicate a relatively complex image. VML is compatible with HTML, by declaring VML namespaces in HTML and declares the processing function, you can use VML elements as other HTML elements, and display images on the client browser. Inside the VML tag, most of DHTML can define most of the properties and events, such as ID, Name, Title, ONMOUSEOVER, and more.

Support interaction and animation

However, the VML function is not just a drawing, and he can also embed text in the graph, and you can implement a chain, and you can implement a certain animation function through the scripting language. VML appreciation

SVG (Scalable Vector Graphics)

SVG is an open vector graphical description language based on XML. The SVG image is a document compatible with XML1.0, and the SVG element indicates some instructions that draw images. Readers explains these instructions and display the SVG image on the specified device. Use SVG to display a wide variety of high-quality vector graphics on the web, supporting a lot of features you imagined: geometric graphics, animation, gradient, filter effect, etc. The most critical is that it is also described using ordinary text! That is, this is a text-based image format specifically designed for the network.

SVG is a combination of PGML and VML, so the advantage of VML has become the advantage of SVG, for example:

XML standard

High quality vector image

Image made of text

We can use any image processing tool, just use notepads to generate an SVG image. This may be incredible for the operators of image processing. In fact, think about it can also be understood that the vector image is generally described in algorithm instructions, and all description statements in the SVG image based on text, so it is also very easy to make two modifications and updates. " The upgrade is characterized here to get the appropriate reflection.

In addition, there are some advantages over the SVG compared to VML:

Flexible file format

SVG upgraded features are not only in terms of secondary modifications, but also in addition to many places, including the flexible file format described here. In the previous image, the text is saved in the image as a bitmap. After the image formation cannot be modified separately; this is improved in the PNG format, and the text can be used as a separate layer; SVG is more flexible Extended the file format of the image, which consists of three parts: vector graphics, bitmaps, and text. Such SVG can not only apply vector images and text objects, but also in the bitmap, it can make the effect of any other format image. Since the file format is text form, it can be easily modified at any time. And during the operation of the page, you can also make instant modifications for many parts, where the graphic description can also be reused.

Support interaction and animation

SVG supports SMIL (SYNCHRONIZED MULTIMEDIA Integration Language), allowing users to complete some interaction actions with elements in SVG, thereby completing the established targets, this is currently alone, alone, is complete, needed from the script from the web page The statement is implemented.

Support Character Find

Find characters in "Picture", becomes possible in SVG. This is impossible in this picture file in other formats.

Support XLINK and XPOINTER

This allows you to make a hyperlink between SVG documents.

SVG as W

3C

Organize officially recommended image formats have a number of supporting organizations. As Adobe has declared all the features that will integrate SVG in the launched Adobe image processing kit such as Illustrator, Photoshop, Golive, and Cyber ​​Studio, Netscape Navigator and IE plug-in to allow them to directly support the svg file browsing. Netscape and Microsoft have also begun to enter the SVG field, which marks the future web browser will have a support function for the SVG file. to sum up

GML, SVG, VML are closely related to the vector graphics: GML adds other attribute information of the entity while indicating the spatial information of the entity, is the coding standard of the spatial information and attributes of the entity, but it does not support direct display Graphic. The VML and SVG are displayed on the vector information indicating the graphics (ie what kind of style display vector graphics), which is a better format showing the vector graphics. In contrast, SVG is launched after a comprehensive advantage of VML, which is an international standard, which has more advantages over VML and has a broader future. However, because VML has IE support, and SVG wants to install the plugin in the browser, at this point, VML is better than SVG.

转载请注明原文地址:https://www.9cbs.com/read-2840.html

New Post(0)