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 Block chain + GIS Technology

2025-03-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains the "blockchain + GIS technology how to use", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "blockchain + GIS technology how to use" it!

The development of blockchain is faster and faster, new platforms, architectures and algorithms are emerging, and the application acceptance is getting higher and higher. As a GIS platform, it can also make use of the characteristics of block chain to bring new possibilities to the application of geospatial information industry. SuperMap iObjects for Blockchain (hereinafter referred to as SMIB) is the first platform-level spatial information block chain product, although the function is still limited, but it is also a pioneer, introducing the ability of block chain to the professional GIS platform.

SuperMap iObjects for Blockchain (hereinafter referred to as SMIB) is a basic component of blockchain GIS based on distributed technology, which provides the functions of spatial data chain and chain management, and is suitable for the computing and development environment of Fabric architecture.

About Fabric:

Fabric is a project implementation of Super Book-HyperLedger, which is a widely used version of Super account.

HyperLedger was originally initiated by IBM and is now an open source software project managed by the Linux Foundation.

Quick Survey of SuperMap GIS 10i (2020) New Features

Added space block chain function to cover components, desktops, and server GIS products

New joint storage of block chain spatial data Fabric and IPFS

New functions of spatial block chain data query, editing and history tracing

New map services, data services and data history services that support spatial block chain

1. Download SuperMap iObjects for Blockchain

Then expand the download package using Unzip, and the directory structure is as follows:

├── License.txt ├── dist │ ├── com.supermap.blockchain.fabric-10.1.0.jar │ └── com.supermap.blockchain.fabric-runtime-10.1.0.jar ├── docs │ ├── FabricI?\ 201 ø A?\ 202c / I?\ 201IPFSI?\ 2014A?\ 202c / 2? e?\ 200Y?\ 200I?\ 201I?\ 201U?\ 206A, ©.pdf │ ├── FabricI?\ 201A ? ? The │ │ └── Utils.java │ └── ²?

I use MacOS big sur, the file name in the directory has some garbled code, which is estimated to be edited on the old windows. But it doesn't affect our taste!

2. Running routine

The installed samplecode directory contains some examples. Take the reading and writing of Feature as an example:

/ * * @ author oupp * @ date, 2020-5-26 21:37 * / import com.supermap.blockchain.fabric.*;import org.locationtech.jts.util.Assert;import java.util.HashMap;import java.util.List;import java.util.Map;/** * * / public class FeatureTest {private static String dtName = "datasetCreateTest"; public static void main (String [] args) {/ / addFeatureTest (); modifyFeatureTest (); / / deleteFeatureTest () } public static boolean addFeatureTest () {/ / get data source Datasource datasource = Utils.getDatasource (); / / construct Feature DataFeature feature = new DataFeature (); List fieldInfos = new java.util.ArrayList (); AttributeInfo fieldInfo = new AttributeInfo (); fieldInfo.setName ("mm"); fieldInfo.setType (AttributeType.DOUBLE); fieldInfo.setDefaultValue (2.4) FieldInfos.add (fieldInfo); feature.setAttributeInfos (fieldInfos); feature.setFieldValue (0,11); / / feature.setFeatureData ("MULTILINESTRING ((120.6689 27.98687, 120.66901 27.98684))", FeatureType.WKT); feature.setFeatureData ("MULTILINESTRING ((135.6689 27.98687, 135.66901 27.98684))", FeatureType.WKT) / / get the dataset and add objects Dataset dt = datasource.getDataset (dtName); if (dt = = null) {Assert.isTrue (false, "failed to add objects, dataset is empty");} String strKey = dt.addFeature (feature); if (strKey! = null) {System.out.println ("add record succeeded!") ; return true;} System.out.println ("failed to add record!") ; return false;} / * modify recordset * / public static void getFeatureTest () {/ / get data source Datasource datasource = Utils.getDatasource (); / / construct Feature information to be modified DataFeature feature = new DataFeature (); / / construct field information List fieldInfos = new java.util.ArrayList (); AttributeInfo fieldInfo = new AttributeInfo () FieldInfo.setName ("mm"); fieldInfo.setType (AttributeType.DOUBLE); fieldInfo.setDefaultValue (2.4); fieldInfos.add (fieldInfo); feature.setAttributeInfos (fieldInfos); feature.setFieldValue (0,8.5); feature.setFeatureData ("MULTILINESTRING ((100.6689 27.98687, 100.66901 27.5025))", FeatureType.WKT) / / get the dataset Dataset dt = datasource.getDataset (dtName); / / get the id Map map = new HashMap () of the Feature to be modified; map.put ("\" mm\ ", 11); DataFeatureIterator iterator = dt.getFeature (new QueryParameter (QueryType.GENERAL, map)); DataFeature feature1 = iterator.next (); String strKey = feature1.getId () String wktGeo = feature1.getFeatureData (). ToString (); System.out.println ("found data key is:" + strKey); System.out.println ("found data space information is:" + wktGeo);} / * * modify recordset * / public static boolean modifyFeatureTest () {/ / get data source Datasource datasource = Utils.getDatasource () / / construct Feature information to be modified: DataFeature feature = new DataFeature (); / / construct field information List fieldInfos = new java.util.ArrayList (); AttributeInfo fieldInfo = new AttributeInfo (); fieldInfo.setName ("mm"); fieldInfo.setType (AttributeType.DOUBLE); fieldInfo.setDefaultValue (2.4); fieldInfos.add (fieldInfo); feature.setAttributeInfos (fieldInfos) Feature.setFieldValue (0,8.5); feature.setFeatureData ("MULTILINESTRING ((100.6689 27.98687, 100.66901 27.5025)), FeatureType.WKT); / / get the dataset Dataset dt = datasource.getDataset (dtName); / / get the id Map map = new HashMap () of the Feature to be modified; map.put ("\ "mm\", 11) DataFeatureIterator iterator = dt.getFeature (new QueryParameter (QueryType.GENERAL, map)); DataFeature feature1 = iterator.next (); String strKey = feature1.getId (); / / modify Feature Boolean bModify = dt.modifyFeature (strKey, feature); if (bModify) {System.out.println ("modified successfully" + bModify); return true } System.out.println ("modification failed"); return false;} / * Delete recordset * / public static boolean deleteFeatureTest () {/ / get data source Datasource datasource = Utils.getDatasource (); / / get dataset Dataset dt = datasource.getDataset (dtName) / / get id Map map = new HashMap () of feature to be deleted; map.put ("\" mm\ ", 4); DataFeatureIterator iterator = dt.getFeature (new QueryParameter (QueryType.GENERAL, map)); DataFeature feature1 = iterator.next (); String strKey = feature1.getId (); / / Delete record Boolean bDelete = dt.deleteFeatureByKey (strKey) If (bDelete) {System.out.println ("record deleted successfully!") ; return true;} return false;}}

On the whole, it is relatively simple. However, because it is a development platform, it is still more complicated to use at present. In the future, the desktop software can directly access the data on the block chain, or it can be accessed in the browser through the server, or on the mobile side. It is expected that the function of geospatial information block chain is more and more perfect, and it can support more kinds of block chain platforms, and provide closer interoperability between different platforms and further binding with business applications.

3. Other instructions 3.1. System configuration requirements

Hardware recommended configuration:

Processor: dual core, 2.00 GHz or above

Memory: 4 GB or above

Hard disk: 80 GB or above

Network adapter: 100m or more network adapter

Display adapter: 512m or above video memory (install display adapter driver), OpenGL version: 3.0m

3.2. License description

3.2.1 General license

Use SuperMap GIS 10i series product licenses to verify the availability of the product. For the Windows platform, SuperMap Licensing Authority (SuperMap License Center) is provided to configure and manage licenses; on the Linux platform, command line configuration licenses are provided. In addition, cloud licensing is provided.

Under Windows and Linux operating systems, SuperMap GIS 10i series products offer two kinds of licenses: trial license and official license, which is divided into software license and hardware license. Trial license SuperMap GIS 10i series products provide a 90-day trial license by default. You can also apply for a trial license online at https://www.supermapol.com/web/pricing/triallicense. Users can view the trial license status of the corresponding products as long as they install the SuperMap GIS 10i series products and deploy the SuperMap Licensing Center on the Windows platform, or install the license driver on the Linux platform.

3.2.2 official license

Formal licenses are available in two forms: soft license and hardware license.

a. Soft license is to obtain a legal license to run the software offline or online, and activate it to this machine, which will take effect. Soft license can be divided into stand-alone soft license and network soft license. If you activate a stand-alone soft license, you can only provide license services for the local machine; if you activate a network soft license, you can provide license services for computers in the current network. Note that after the network soft license is activated on the license server, the network soft license cannot be transferred.

b. Hardware license is to obtain legal software operation license in the form of hardware encryption lock (referred to as "hardware lock").

You can contact the relevant sales staff to purchase a formal license.

3.2.3 Web Licensing

SuperMap GIS products support Web licensing starting with the 10i series, and Web licensing is a license that adapts to cloud environments. To use the Web license, you need to connect to an available Web license center. After connecting to the Web version Licensing, obtain a license through the Web version Licensing.

License acquisition method

For the official version of the Web license, please contact the sales to obtain the trial license. You can apply for the trial license online at https://www.supermapol.com/web/pricing/triallicense.

Use Web Licensin

1. Configure Web Licensing Center

You can download the installation package for the Web Licensing Center from the Hypermap Technical Resource Center at http://support.supermap.com.cn/DownloadCenter/ProductPlatform.aspx. The Readme document provided in the Web version license Center installation package will introduce you to the process of installing and using the Web version license Center, which you can refer to to install and use the Web version license Center.

two。 Enable Web Licensing

The activation of the Web license takes place in the Web version Licensing.

3. Configure the licensing environment

Configure BS_LICENSE_SERVER= [Native ip]: 9183 in the environment variable, such as set BS_LICENSE_SERVER=192.168.3.3:9183 in export BS_LICENSE_SERVER=192.168.3.3:9183,windows in Linux and System.setProperty in code ("BS_LICENSE_SERVER", "192.168.3.3vis9183")

Thank you for your reading, the above is the content of "how to use blockchain + GIS technology". After the study of this article, I believe you have a deeper understanding of how to use blockchain + GIS technology, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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