[data processing] Related configurations of the map

vividime-Club Show all floors Published on 2024-12-19 18:03:34 |Reading mode print Previous Topic Next Topic
1
Unresolved
Map Configuration
reply

Using props report

Exciting comments1

vividime-Club Show all floors Published on 2024-12-19 18:03:52
1.Overview
On the Management System > Map Configuration page, you can update map data, including add submap data, update map data, reset map data, delete map data, and synchronize map data.
Among them, add new submap data and update map data need to upload map data in .json format according to product requirements, and synchronize map data needs to get the IP of other nodes first.
Common map data formats are .geojson and .shp. If the map data format is .geojson, please refer to 1.1. If the map data format is .shp, please refer to 1.2.
1.1 Map data format conversion (.json)
If the downloaded geographic data is in geojson format, it can be completed by simply modifying it according to the following steps.
1)Prepare geojson map data in .json format, for example, you need to add a new province "Shandong 2", download the data as follows。
2)Modify the "name" attribute in "properties" and add the id attribute. name is the name of the region (here is an example of "Shandong2"), id is the unique number. is a unique number, you need to ensure that the id is not repeated.
"properties":{"name": "Shandong2", "id": "113123"}
Note that "properties" must have "name" and "id" attributes.
3)Change the file name to {name}-geo, name is the name attribute in the file. Here the file name is "shandong2-geo".
4)Create a folder "Shandong 2" and put the file "Shandong2-geo.json" into the folder, and compress the folder to "Shandong 2.rar" file.
5)The rest of the steps can be referred to in this chapter 1.3 and later.
1.2 Map data format conversion (.shp)
1.2.1 Preparation
•Prepare map data in .shp format, and understand the unique attributes of values in .shp map data, such as id, name.
•Download the map data conversion tool YHMapDataParser.jar, which is used to convert the .shp format data to json format.
•Unzip the downloaded "China provincial administrative divisions_shp.zip" map data.
•Create a new idName.properties file in the directory of the extracted file, and add the unique id and name properties of the map data in the file. If you need to generate localized Excel files under the shp2json folder, please add the parameter needLocal=true.
1.2.2 Step
Mothod 1: Interface conversion
1)Double click to open ParseGeoData-1.0-SNAPSHOT.jar, click "Shp->geoJson &localExcal" button, and then select the unzipped folder "D:\various versions\\" in the dialog box. 10.0\Map\China Administrative Regionshp", or you can directly fill in the path of the unzipped folder in the input box at the end of the dialog box.
2)Click on the "Confirm" button, the color of the button will be darkened, and when the color returns to light, the "shp2json" folder will be generated, which contains the converted "province_region- geo.json, province_region.xlsx" files.
3)In order to make it easier for users to change the language of the map data when switching the language of the product, please add the corresponding localization information in the columns of zh_CN, en_US and jp_JP respectively.
4)Click local excel -> json button, then select the unzipped folder "D:\Versions\10.0\Map\China Administrative Regionshp" in the pop-up dialog box, or fill in the path of the unzipped folder directly in the input box at the end of the dialog box.
5)Click on the "Confirm" button, the color of the button will be darkened, and when the color returns to light, the "excel2json" folder will be generated, which contains the converted "province_region -geo.json, province_region.alias" files.
6)In order to better understand the geographic data, it is recommended that users name the shp2json and excel2json folders with meaningful names, such as China, and then compress them into .zip files.
Method 2: Background conversion
1)Enter the command, java -jar YHMapDataParser.jar --help, in the cmd window to view the help notes.
jarName.jar: the name of map conversion tool jar package, i.e. YHMapDataParser.jar.
path: path of the map data file.
Type: the type of the converted data format, refer to tip for the description of different values.
2)Input the command: java -jar YHMapDataParser.jar D:\Versions\10.0\Maps\China Administrative Regionshp1, the interface returns the following information, at the same time D:\Versions\10.0\Maps\China Administrative Regionshp directory to generate "shp2json " folder, the folder contains the converted "provincial_region-geo.json, provincial_region.xlsx" file.
3)In order to make it easier for users to change the language of the map data when switching the language of the product, please add the corresponding localization information in the columns of zh_CN, en_US and jp_JP respectively.
4)Input the command: java -jar YHMapDataParser.jar D:\Versions\10.0\Maps\ChinaProvincialAdministrativeDistricts_shp2, the interface will return the following information, and at the same time, in the directory of D:\Versions\10.0\Maps\ChinaProvincialAdministrativeDistricts_shp, the directory will generate the "excel2json " folder, the folder contains the "province_region-geo.json, province_region.alias" files generated by the conversion.
5)In order to better understand the geographic data, it is recommended that users name the shp2json and excel2json folders with meaningful names such as China, and then compress them into RAR4 or ZIP files.
1.3 Add Submap Data
1)Select world in the left map catalog structure, and then click  Add Submap Data.
2)In the opened dialog box, select the prepared .json data format test zip file, and the Geographic Data dialog will pop up.
3)After clicking Confirm in the GeoData dialog, the new sub-map data will be loaded and displayed in the map directory on the left.
1.4 Update Map Data
1)Select China in the left map catalog structure to update the map data.
2)Select the prepared .json data China zip file in the dialog box that opens to bring up the Geographic Data dialog
After clicking Confirm in the GeoData dialog, the updated map data is loaded and displayed in the left map catalog.
1.5 Reset Map Data
1)Select the user-modified China in the left map catalog structure and click Reset.
2)China in the left map catalog is reset to the original data. If you delete the data of China-Sichuan and click Reset, the Sichuan data will be added again.
1.6 Synchronize Map Data
To synchronize map data from other nodes to the current node in a clustered deployment environment, click on the top of the map directory structure on the left. Click the Synchronize button on the left above the map directory structure, and in the pop-up dialog box, the IP address of other nodes.
1.7 Delete Map Data
Remove the map data in the catalog that users do not need. Select the map data to be deleted, click the Delete button, and the deleted map data will no longer be displayed on the directory structure.

reply

Using props report

Advanced mode
You need to log in before you can reply to the post login | Free registration

© 2024 VIVIDATA PTE. LTD. All Rights Reserved. Privacy Statement