Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use open source gdal slices in GIS

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use open source gdal slices in GIS, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

The base map of two-dimensional map is usually sliced (tile). Generally, the large image data is sliced into map slices through tools, stored in the form of a file, or stored in the database. Arcgis Server or Geoserver can also slice the image data in real time according to the range, and return to the client for display.

Sliced data can be published directly according to the catalog, or as tms or wmts services, open source 2D map engines such as leaflet, openlayers, or commercial Gaud and Baidu map engines, which can be read and displayed directly by api.

The following is to share an open source map slicing class library, using python language to call, the method is relatively simple, map slicing efficiency is also relatively high.

The URL of the open source class library is https://github.com/tehamalab/gdal2tiles

When developing, you need to install python's gdal class library first, which can be installed through conda or pip, then you need to install gdal2tiles's class library and install it through pip install gdal2tiles.

The method of calling is relatively simple, in which you need to configure some parameters, as described on the website.

Call code:

Import gdal2tiles

# set the level at which the image needs to be cut, set the recovery mode, and display the output of the generated slice

Options = {'zoom': (11,12),' resume': True,'verbose':True}

Gdal2tiles.generate_tiles ('imported image file'

'output slice folder', * * options)

The resulting slices are organized by directory:

In the folder, there are 3 web page files that can be opened for data preview directly in the browser.

These are all the contents of the article "how to use open source gdal slices in GIS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report