(v) online map of the URL of a variety of tiles to be converted by Webgis in the column number

Source: Internet
Author: User
Tags url example

1. Preface

In this article, I mainly analyze the WMS, WMTS, and ArcGIS online map services in the OGC standard.

Before I write, I'll give you some advice on what OGC is. OGC Full name is open GIS Consortium, Chinese name is open Geospatial Information Alliance, it is a non-profit, voluntary international Organization for Standardization. In the field of spatial data interoperability, the interoperability method based on public interface access pattern is a basic operation method. Through the International Organization for Standardization (ISO/TC211) or technical alliance (such as OGC) to develop the interface specification of spatial data interoperability, GIS software developers to follow this interface specification of spatial data reading and writing functions, so that the interoperability of heterogeneous spatial database (from Baidu Encyclopedia).

The current OGC standards are: WMS (map Service), WMTS (Map tile Service), WFS (feature Service), WCS (raster service). The map request that I described below is the way that you request it in a restful way.

URL of the 2.WMS service

The WMS Service can provide several services:

Getcapabilities returns service-level metadata.

Getmap returns a map image.

Getfeatureinfo returns information about some of the special features displayed on the map, and so on.

2.1 Examples

Let's take a look at the URL of the WMS service Request Map Example: http://172.18.0.154:7001/ServiceRight/proxy/f446aabb04a59af336901290d615e16b/xzcg/WMS/ Xz500dlg_bzwgs84? layers=xz500dlg_bzwgs84&format=image/gif&service=wms&version=1.1.1&request=getmap&styles= &srs=epsg:4326

&width=256&height=256&bbox= 117.21879147492814,34.240704396544345,117.22000975886715,34.24192268048341.

Observing this URL, many parameters can be fixed in practice based on the services provided, such as format, LAYERS, REQUEST, SRS, STYLES, VERSION, WIDTH, heiht parameters. And the real need we actually go to the conversion is bbox.

2.2 Principle

A WMS request is a request that can be dynamically out of the picture, in principle it can display the original image at any scale of the map, it is not like a tile service, can only display the map under the scale set at transduction. When we use two development packages, such as the one provided by ESRI, we only need to set the number of levels we need to display, without having to set the scale for each level, because the WMS is a dynamic plot service. In two development, direct use of the provided WMS class is very simple, only need to provide the scope of the display and the number of levels needed to display, the interior of this class automatically divides each level of the scale, and the WMS is a dynamic plot, so it is fully supported this way.

2.3 Note

However, in practice, some service providers do not provide WMS services, they are likely to be in a small scale of the place to make restrictions, so that we can only a certain number of fixed scale to access the tile, the other scale can not. Previously handled for other group of colleagues when loading a map using a WMS class based on the Flexviewer framework, this is why the map is not displayed at certain levels. The solution to this problem is to re-expand the class, so that the extended Wmsex class can be set by the scale of each level to convert the corresponding bbox, here we have previously obtained the determinant of the algorithm is finally useful.

Minx=resolution*tilesize*col;

Miny=resolution*tilesize*row;

maxx=resolution*tilesize* (col+1);

maxy=resolution*tilesize* (row + 1);

bbox= "Minx,miny,maxx,maxy";

3.WMTS Service

The full name of the WMTS service is the Web Map tile service, so the name Incredibles, unlike the previous WMS dynamic Plot, the WMTS service is based on the tile idea. WMTS supports the provision of certain standard services, such as:

Getcapabilities (Get the meta-information of the service, we can see the detailed configuration of transduction in this meta-information).

GetTile (get slices).

Getfeatureinfo (optional, gets the feature information of the point selection).

You can see that these operations are very similar to the WMS operation.

3.1 Examples

Let's take a look at the URL example of WMTS request Map Tile, here I use the URL in the world map as an example: Http://srv.zjditu.cn/ZJEMAP_2D/wmts? service=wmts&version=1.0.0&request=gettile&layer=zjemap&format=image/png&tilematrixset= tilematrixset0&tilematrix=17&style=default&tilerow=21747&tilecol=109282.

Observing the parameters contained in this URL, we can make the format, LAYER, request, SERVICE, STYLE, version according to the requirement, and change the Tilematrix, Tilerow and Tilecol before we get the tiles.

3.2 principle

WMTS Service and we have discussed the tile thought is consistent, observation parameters can be seen, Tilematrix, Tilerow, Tilecol is actually level, row, Col. So the WMTS service tile request URL also become logical can spell out: fixed format url+ "&tilematrix=" +level+ "&tilerow=" +row+ "&tilecol=" +col.

4. Common Map Server url--in maps with AGS services as an example

In AGS, when the published service is transduction, the request URL of the map becomes a fixed format. such as: http://172.29.0.74:8399/arcgis/rest/services/HFTile/MapServer/tile/2/957/834.

Obviously, after the tile is level, row, Col. So the URL of the AGS under the wording is: Restmapservice address/level/row/col.

5. Ask a few questions

Question one:

A map requires the first few levels of the map to originate from a service, and its service address is aurl. Several levels of the middle map from the B service, its service address is burl, the next few maps are from the C service, its service address is curl. How do we get the system to plot properly at each level at this time?

Question two:

A map needs to display both topographic and annotation layers, and the terrain map service comes from a service, and the annotation layer comes from the B service. How can I load two services normally, and let the annotation layer stack up properly on the topographic map?

Question three:

Or a map needs to display both topographic and annotation layers at the same time, but at this point the topographic map service is a WMTS service, and the annotation layer is a WMS service. How to get the tiles of two different services to overlay?

The question I only mention these three, this kind of question is particularly particularly many, but I think as long as we know the URL of the various services principles, coupled with a little bit of their own problem-solving ideas, should not be difficult to solve. In the later sections of the raster layer (tile layer) design, I'll give you a way to solve this problem, which can be used to solve some of these problems.

6. Summary

In this case, the entire series, we've talked about what the line number is, how to get the row number, and get the tile URL by the row number. It can be said that we are now distance how to display the raster image at the front, is ready to only owe East wind. So in the next chapter, I will lend this east wind to you. The next section is: Tiles in the front-end splicing display principle. We welcome your continued attention.

It's not only the freedom to drive your own car, but we can travel if we have both legs.

                                                         ,         &N Bsp       &NBSP,        ------Welcome reprint, but retain the copyright, please indicate the source in obvious place: http://www.cnblogs.com/ Naaovegis

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.